Altering the SOAP XML Request format


XML & Web services: Altering the SOAP XML Request format

  1. Altering the SOAP XML Request format (3 messages)

    Hi, I am facing a problem for creating a webservice and the way the input/output parameters appear in the SOAP request. --------------------------- Software Used: 1. JDK 1.3.1_08 2. BEA Weblogic 7.0 Platform : Solaris 8 ---------------------------- The Structure of the SOAP request required is <CustomerDate xsi:type="xsd:dateTime">2001-12-17T09:30:47.0Z ABC 173 59816321-8EAF-CA04-0FDE-6423DA9641EE E1 12345 64 To achieve this a class “WebSvcInputParams? was created as below ----------------------Source Code ------------------------- /* WebSvcInputParams Package com.websvc Public class WebSvcInputParams { Private Date Customerdate = null; Private String CustomerName = null; Private int SeqNo = 0; Private String GUID = null; OrderDetails[] OrderDetailsArray = new OrderDetails[1]; /* Get and Set methods*/ /** * @return */ public OrderDetails[] getOrderDetailsArray() { return OrderDetailsArray; } /** * @param detailses */ public void setOrderDetailsArray(OrderDetails[] detailses) { OrderDetailsArray = detailses; } … … … }//end of class Public class OrderDetails implements Serializable { Private String RequestedPortType = null; Private int AssetID = 0; Private int InterfaceSpeed = 0 /* Get and Set methods */ … … … }//end of class --------------Source Code ends --------------------------- However when the request appears in the Web Service Client, the XML tag for each attribute has its first alphabet converted to lowercase. It seems the web container does so. The request appears as below in the client. customerDate xsi:type="xsd:dateTime">2001-12-17T09:30:47.0Z ABC 173 59816321-8EAF-CA04-0FDE-6423DA9641EE E1 12345 64 FTIP12345 Is there a way I can override this so that the SOAP request should follow the format mentioned as required. However I cannot use a higher version of Java and Weblogic. Please help me in this regard. Thanks and Regards, Rohit S

    Threaded Messages (3)

  2. Re: Altering the SOAP XML Request format[ Go to top ]

    Interestingly this might be still be a bug in 9.0 search for CR218519 in the above link : you might not like the workaround or solution...but that is reality... snippet from known_resolved issues : CR218519 Applicable to jwsc, wsdlc, and clientgen: Web Service interfaces, implementations and parameter types with upper case package names may have problems building and running in some operating systems. Workaround or Solution: BEA strongly recommends that you use lowercase letters for the package names. 9.0 9.2 Bhagvan K
  3. Modifying the codec files[ Go to top ]

    Hi, To achieve this, I considered the following approach 1. Unjarred the .ear file that was created by the ant task. 2. Manually modified the web-services.xml file to reflect the required format. 3. Modified the Codec files for each element type as below Before Modifying: new weblogic.xml.schema.binding.util.runtime.PropertyInfo("java:com.ivpn","seqNo",null),"","int",null), "seqNo", int.class, false, true), After Modifying: new weblogic.xml.schema.binding.util.runtime.PropertyInfo("java:com.ivpn","SeqNo",null),"","int",null), "SeqNo", int.class, false, true), 4. Compiled the files manually. 5. Recreated the war file and the ear file. Is this the correct approach? Is there any other way how this can be solved?
  4. Re: Modifying the codec files[ Go to top ]

    Your approach looks ok. but I was thinking you will regenerate after changed wsdl - lower case package names... and build the jar, war and ear... Bhagvan K