Author |
Message
|
Campbell |
Posted: Mon Feb 18, 2013 4:22 pm Post subject: SOAP parsing error |
|
|
Novice
Joined: 18 Feb 2013 Posts: 11
|
Hi,
The system insists i have at least one post before posting a URL so the real problem description is in the next post. |
|
Back to top |
|
 |
Campbell |
Posted: Mon Feb 18, 2013 4:23 pm Post subject: |
|
|
Novice
Joined: 18 Feb 2013 Posts: 11
|
Hi,
I have created a Web Service and a user is trying to connect to it but the SOAP parser does not recognize any of the fields in the body when the namespace is defined on the <body> tag. If I remove the namespace it works fine.
This one works:
Code: |
<s:Envelope xmlns:s="http://schemas.xmlsoap.org /soap/envelope/">
<s:Header>
<wsse:Security xmlns:wsse="http://docs.oasis-open.
org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:UsernameToken>
<wsse:Username>someone</wsse:Username>
<wsse:Password Type="wsse:PasswordText">secretstuff</wsse:
Password>
</wsse:UsernameToken>
</wsse:Security>
</s:Header>
<s:Body>
<GetCustomerDetails xmlns="http://some_place">
<CustomerNumber xmlns=""/>
<LicenceNumber xmlns="">1234567</LicenceNumber>
<AddressType xmlns="">B</AddressType>
<EffectiveDate xmlns=""/>
<AccessingProgram xmlns="">1234</AccessingProgram>
<AccessingMap xmlns=""/>
<AgencyAudit xmlns="">1234</AgencyAudit>
<UserAudit xmlns="">Frank</UserAudit>
</GetCustomerDetails>
</s:Body>
</s:Envelope> |
this one does NOT work:
Code: |
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<wsse:Security xmlns:wsse="http://docs.oasis-open.
org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:UsernameToken>
<wsse:Username>someone</wsse:Username>
<wsse:Password Type="wsse:PasswordText">secretstuff</wsse:
Password>
</wsse:UsernameToken>
</wsse:Security>
</s:Header>
<s:Body [b]xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:
xsd="http://www.w3.org/2001/XMLSchema"[/b]>
<GetCustomerDetails xmlns="http://some_place">
<CustomerNumber xmlns=""/>
<LicenceNumber xmlns="">1234567</LicenceNumber>
<AddressType xmlns="">B</AddressType>
<EffectiveDate xmlns=""/>
<AccessingProgram xmlns="">1234</AccessingProgram>
<AccessingMap xmlns=""/>
<AgencyAudit xmlns="">1234</AgencyAudit>
<UserAudit xmlns="">Frank</UserAudit>
</GetCustomerDetails>
</s:Body>
</s:Envelope> |
We are using Message Broker Toolkit version:
Version: 8.0.0.1
Build id: 8.0.0.1-IFix-20130131-1239
The user trace shows that all of the fields are parsed as being empty when the namespace is defined on the body tag.
I have raised a PMR as it appears to be a bug in the parser but thought possibly someone here might have some ideas.
Cam |
|
Back to top |
|
 |
rekarm01 |
Posted: Mon Feb 18, 2013 6:11 pm Post subject: Re: SOAP parsing error |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 1415
|
Campbell wrote: |
I have created a Web Service and a user is trying to connect to it but the SOAP parser does not recognize any of the fields in the body when the namespace is defined on the <Body> tag. |
The SOAP 1.1 standard states that the SOAP Envelope element "MAY contain namespace declarations ...". It does not make a similar statement for either the SOAP Header or SOAP Body elements.
Is message validation enabled? Does it generate an error for the message with the extra namespace declarations? |
|
Back to top |
|
 |
Campbell |
Posted: Mon Feb 18, 2013 7:38 pm Post subject: |
|
|
Novice
Joined: 18 Feb 2013 Posts: 11
|
Validation is set to "Content and Value" on the SOAP input node but no exception occurs. The message gets passed along the flow but the tree is never built by the parser so all of the variables are empty.
I also noticed what you said about the SOAP standards and in addition to that the soapenv11.xsd delivered with the toolkit actually says this:
"Prose in the spec does not specify that attributes are allowed on the Body element"
The XML is being created as standard by Visual Studio 2010 and is not being manipulated at all so I believe it is SOAP compliant. Certainly if WMB was not able to accept a standard web service call from a Visual Studio application I am sure I would have heard of it. |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Feb 18, 2013 7:50 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Traditionally you'd need to move those xml declarations into the xml root element (first & last child of soapenv:Body)  _________________ MQ & Broker admin |
|
Back to top |
|
 |
Campbell |
Posted: Mon Feb 18, 2013 7:55 pm Post subject: |
|
|
Novice
Joined: 18 Feb 2013 Posts: 11
|
I agree that they are not where i would put them however this SOAP envelope is automatically generated. |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Feb 18, 2013 8:09 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Campbell wrote: |
I agree that they are not where i would put them however this SOAP envelope is automatically generated. |
Then you need to set the name declarations on the soapenv:Envelope element. I don't recall wether it is legal to put it on the soapenv:Body...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
Campbell |
Posted: Mon Feb 18, 2013 9:10 pm Post subject: |
|
|
Novice
Joined: 18 Feb 2013 Posts: 11
|
You seem to be implying that i should change my WSDL to include these namespaces on the envelope (if i misunderstood please let me know).
It seems maybe I wasn't clear enough with my description of the scenario so here is some additional information.
In my WSDL I have not set the namespaces on the body they are created on the envelope.
The WSDL was generated using WMB toolkit version 8. I then provided the WSDL to some developers who used it to discover my web service in Visual Studio and create a client application to use the service.
The client application builds a SOAP message and it includes the namespaces on the body tag. This is the default action of Visual Studio (I have recreated this myself) and the programmer does not build the SOAP message it is created automatically.
I am trying to get Broker to ignore or accept the tags or at least I would like to determine how it should be behaving in this situation. I thought it would just accept the tags but if it does not then I thought it would create a soap fault but it doesn't do that either. It just rolls on as if nothing has happened but the parser never builds the tree. |
|
Back to top |
|
 |
rekarm01 |
Posted: Tue Feb 19, 2013 1:39 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 1415
|
Campbell wrote: |
Validation is set to "Content and Value" on the SOAP input node but no exception occurs. The message gets passed along the flow but the tree is never built by the parser so all of the variables are empty. |
If the Parse Timing is "On Demand", the message flow might not validate the entire message. It might be useful to see the Trace node output for Root, along with the input message. (The Trace node would also force full parsing and validation ...)
Campbell wrote: |
The WSDL was generated using WMB toolkit version 8. |
How exactly did the toolkit generate the WSDL? There are quite a few different options, some more interoperable than others. Try using the WS-I Validator to check the generated wsdl against the WS-I Basic Profile, for any potential interoperability issues.
Campbell wrote: |
The XML is being created as standard by Visual Studio 2010 and is not being manipulated at all so I believe it is SOAP compliant. |
And Visual studio may have its own set of options. It seems a bit unusual that it's generating unused namespace declarations for xsi and xsd. |
|
Back to top |
|
 |
Campbell |
Posted: Wed May 08, 2013 7:20 pm Post subject: |
|
|
Novice
Joined: 18 Feb 2013 Posts: 11
|
Update: IBM provided a fix for this and it is included as part of Fix Pack 2. |
|
Back to top |
|
 |
amanfredi |
Posted: Fri Sep 20, 2013 2:24 pm Post subject: |
|
|
Newbie
Joined: 20 Sep 2013 Posts: 1
|
Are you sure that this problem was fixed on the release 8.0.0.2? I am experiencing this problem with version 8.0.0.2. |
|
Back to top |
|
 |
smdavies99 |
Posted: Fri Sep 20, 2013 11:07 pm Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
If you look at the IBM site where you download the fixpack you can see the list of APARS that were included in each release. Scan that and see if there is a fix in it that relates to this problem.
If it isn't then raise a PMR with IBM and reference this thread. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
|