ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » SOAP parsing error

Post new topic  Reply to topic
 SOAP parsing error « View previous topic :: View next topic » 
Author Message
Campbell
PostPosted: Mon Feb 18, 2013 4:22 pm    Post subject: SOAP parsing error Reply with quote

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
View user's profile Send private message
Campbell
PostPosted: Mon Feb 18, 2013 4:23 pm    Post subject: Reply with quote

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
View user's profile Send private message
rekarm01
PostPosted: Mon Feb 18, 2013 6:11 pm    Post subject: Re: SOAP parsing error Reply with quote

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
View user's profile Send private message
Campbell
PostPosted: Mon Feb 18, 2013 7:38 pm    Post subject: Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Mon Feb 18, 2013 7:50 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20698
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
View user's profile Send private message Send e-mail
Campbell
PostPosted: Mon Feb 18, 2013 7:55 pm    Post subject: Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Mon Feb 18, 2013 8:09 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20698
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
View user's profile Send private message Send e-mail
Campbell
PostPosted: Mon Feb 18, 2013 9:10 pm    Post subject: Reply with quote

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
View user's profile Send private message
rekarm01
PostPosted: Tue Feb 19, 2013 1:39 am    Post subject: Reply with quote

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
View user's profile Send private message
Campbell
PostPosted: Wed May 08, 2013 7:20 pm    Post subject: Reply with quote

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
View user's profile Send private message
amanfredi
PostPosted: Fri Sep 20, 2013 2:24 pm    Post subject: Reply with quote

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
View user's profile Send private message
smdavies99
PostPosted: Fri Sep 20, 2013 11:07 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » SOAP parsing error
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.