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 » SOAPInput node, XMLNSC and message validation

Post new topic  Reply to topic
 SOAPInput node, XMLNSC and message validation « View previous topic :: View next topic » 
Author Message
CHF
PostPosted: Tue Oct 27, 2009 10:35 am    Post subject: SOAPInput node, XMLNSC and message validation Reply with quote

Master

Joined: 16 Dec 2003
Posts: 297

We are trying to transition from HTTPInput node to SOAPInput node and I am facing a strange issue.

I created a messageSet from WSDL and drag and dropped on to the message flow to create the SOAPInput node, sub-flow with Extract and routing logic and SOAPReply nodes.

By default, validation is enabled with 'content and value' on the SOAPInput node.

The issue I am facing is that, if the order of elements in the SOAP message do not match to messageSet, I am getting a XMLNSC parser exception. Below is the exception message.

I am getting a good response, with below SOAP XML -
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:WSQuery">
<soapenv:Header/>
<soapenv:Body>
<urn:SearchHistory>
<urn:AccountNumber>8811053803</urn:AccountNumber>
<urn:AccountType>DEP</urn:AccountType>
<urn:SourceCode>VO0</urn:SourceCode>
</urn:SearchHistory>
</soapenv:Body>
</soapenv:Envelope>


But if I change order of an element, I am getting below exception.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:WSQuery">
<soapenv:Header/>
<soapenv:Body>
<urn:SearchHistory>
<urn:AccountType>DEP</urn:AccountType>
<urn:AccountNumber>8811053803</urn:AccountNumber>
<urn:SourceCode>VO0</urn:SourceCode>
</urn:SearchHistory>
</soapenv:Body>
</soapenv:Envelope>


BIP2230E: Error detected whilst processing a message in node 'com.MSGFLOW.Extract'.
The message broker detected an error whilst processing a message in node 'com.MSGFLOW.Extract'. An exception has been thrown to cut short the processing of the message.
See the following messages for details of the error. : /build/S610_P/src/DataFlowEngine/PluginInterface/ImbJniNode.cpp: 1024: ImbJniNode::evaluate: ComIbmSOAPExtractNode: com/MSGFLOW/MAIN_INPUT#FCMComposite_1_13.gen/com/MSGFLOW/MAIN_INPUT#FCMComposite_1_1
BIP3614E: A SOAP logical tree cannot be built from the message bitstream.
The bitstream is not a valid Web service message.
Review further error messages for an indication to the cause of the error. : /build/S610_P/src/WebServices/WSLibrary/ImbSOAPParser.cpp: 1978: ImbSOAPParser::createSoapShapedTree: :
BIP5009E: XML Parsing Errors have occurred.
Errors have occurred during parsing of XML.
Review further error messages for an indication to the cause of the errors. : /build/S610_P/src/MTI/MTIforBroker/GenXmlParser4/ImbXMLNSCParser.cpp: 953: ImbXMLNSCParser::parseRightSibling: :
BIP5025E: XML schema validation error ''cvc-complex-type.2.4.e: Unexpected element. Element "urn:AccountNumber" is not one of the choices.'' on line '7' column '29' when parsing element ''/XMLNSC/http://schemas.xmlsoap.org/soap/envelope/:Envelope/http://schemas.xmlsoap.org/soap/envelope/:Body/urn:WSQuery:Search''. Internal error codes: 5008, 2.
This error was reported by the XMLNSC parser. The XML document being parsed is not valid according to the message definitions in the message set.
The XML document has violated the rules expressed in the message definition files in the message set. : /build/S610_P/src/MTI/MTIforBroker/GenXmlParser4/ImbXMLNSCDocHandler.cpp: 550: ImbXMLNSCDocHandler::handleParseErrors: ComIbmSOAPInputNode: com/MSGFLOW/MAIN_INPUT#FCMComposite_1_12
_________________
CHF
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
smdavies99
PostPosted: Tue Oct 27, 2009 10:49 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

AFAIK, this is what you should expect.

You have defined an order for the XML fields. If the incoming message does not follow that ordering you will get an exception as you are seeing.

If you are likely to get messages with fields in 'random' order then you will have to revert to self describing XML messages.
_________________
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
CHF
PostPosted: Tue Oct 27, 2009 11:19 am    Post subject: Reply with quote

Master

Joined: 16 Dec 2003
Posts: 297

Will it matter if I disable validation?
_________________
CHF
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
kimbert
PostPosted: Tue Oct 27, 2009 12:04 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

As designed. In XML Schema, if you want your fields to be unordered you have three options:
a) change from <sequence> to <all>. This is only possible if all members of the <sequence> are elements ( groups are not allowed within an <all> group )
b) change from <sequence> to a repeating choice. This makes the validation less strict, because it allows several occurrences of some members and/or zero occurrences of other members.
c) switch off validation.Note that this will also switch off the checking of element/attribute values (enumerations, ranges ) and will cause the entire message tree to be built using CHARACTER data, not the types declared in the XML schema.
Back to top
View user's profile Send private message
CHF
PostPosted: Tue Oct 27, 2009 1:54 pm    Post subject: Reply with quote

Master

Joined: 16 Dec 2003
Posts: 297

Thanks. That's helpful and I did more reading on info center about the same.
_________________
CHF
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » SOAPInput node, XMLNSC and message validation
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.