Author |
Message
|
Halloween |
Posted: Wed Dec 02, 2015 12:39 pm Post subject: problem creating SOAP tree from the bitstream |
|
|
Acolyte
Joined: 11 Mar 2015 Posts: 60
|
Hello,
I am trying to retrieve an XMLString message from SOAP message.
I am posting following message in SOAP UI and i want to retrieve the highlighted XML.
In the debugger after posting the message in SOAP UI, when comes out of SOAP input node, in the debugger it says "problem creating SOAP tree from the bitstream"
Can somebody help resolve it.
Code: |
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:ProcessMessage">
<soapenv:Header/>
<soapenv:Body>
<urn:processMessage>
[b] <in0><![CDATA[<advance-person-data xmlns="http://www.bmw.com/BWMS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.bmw.com/BWMS /ed/advance.xsd">
<header>
<sender>Siebel</sender>
<receiver>BWMS</receiver>
<case-id />
<crm-number>1530800001</crm-number>
<order-number>3756551</order-number>
<time-stamp>20151117091518</time-stamp>
</header>
<body>
<language>en</language>
<companions-number-of>0</companions-number-of>
<children-number-of>0</children-number-of>
<young-persons-number-of>0</young-persons-number-of>
</body>
</advance-person-data>
]]>
</in0>[/b]
</urn:processMessage>
</soapenv:Body>
</soapenv:Envelope> |
|
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Dec 02, 2015 2:44 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
It is not good practice to have a prefix the same as a well known prefix and not have the same definition...
Here urn or uri should not be the name of a prefix... it is used as a protocoll and should as such not be a prefix. Like you would not have http as a namespace prefix...
This will most probably lead to problems.  _________________ MQ & Broker admin |
|
Back to top |
|
 |
maurito |
Posted: Wed Dec 02, 2015 9:14 pm Post subject: |
|
|
Partisan
Joined: 17 Apr 2014 Posts: 358
|
You can use soap UI to validate the input message, that will give you some clue as to where the problem is. |
|
Back to top |
|
 |
Halloween |
Posted: Thu Dec 03, 2015 7:00 am Post subject: Problem creating SOAP tree |
|
|
Acolyte
Joined: 11 Mar 2015 Posts: 60
|
Hello guys,
The problem is not with uri or urn or prefix.
This is my XML string which business is sending
<in0><![CDATA[<advance-person-data xmlns="http://www.bmw.com/BWMS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.bmw.com/BWMS /ed/advance.xsd">
<header>
<sender>Siebel</sender>
<receiver>BWMS</receiver>
<case-id />
<crm-number>1530800001</crm-number>
<order-number>3756551</order-number>
<time-stamp>20151117091518</time-stamp>
</header>
<body>
<language>en</language>
<companions-number-of>0</companions-number-of>
<children-number-of>0</children-number-of>
<young-persons-number-of>0</young-persons-number-of>
</body>
</advance-person-data>
]]>
</in0>
When i add this string between process message, it has trouble creating or building SOAP tree.
If i remove it, it just give the perfect outcome XML as blank tag named process message with domain XMLNSC after i trigger it from SOApUI and it falls out from SOAPUI
Any idea why this is an issue with XMLstring data
I cant avoid it. Its business that is sending me |
|
Back to top |
|
 |
maurito |
Posted: Thu Dec 03, 2015 7:08 am Post subject: Re: Problem creating SOAP tree |
|
|
Partisan
Joined: 17 Apr 2014 Posts: 358
|
Halloween wrote: |
Hello guys,
The problem is not with uri or urn or prefix.
This is my XML string which business is sending
<in0><![CDATA[<advance-person-data xmlns="http://www.bmw.com/BWMS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.bmw.com/BWMS /ed/advance.xsd">
<header>
<sender>Siebel</sender>
<receiver>BWMS</receiver>
<case-id />
<crm-number>1530800001</crm-number>
<order-number>3756551</order-number>
<time-stamp>20151117091518</time-stamp>
</header>
<body>
<language>en</language>
<companions-number-of>0</companions-number-of>
<children-number-of>0</children-number-of>
<young-persons-number-of>0</young-persons-number-of>
</body>
</advance-person-data>
]]>
</in0>
When i add this string between process message, it has trouble creating or building SOAP tree.
If i remove it, it just give the perfect outcome XML as blank tag named process message with domain XMLNSC after i trigger it from SOApUI and it falls out from SOAPUI
Any idea why this is an issue with XMLstring data
I cant avoid it. Its business that is sending me |
have you used SOAP UI to validate the message you are sending as suggested in my previous post ? |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Dec 03, 2015 7:14 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
So a CDATA section is not turned into a message tree.
If you need to send the contents of the CDATA section as a real set of XML tags, you need to convert it to a message tree. _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
timber |
Posted: Thu Dec 03, 2015 7:24 am Post subject: |
|
|
 Grand Master
Joined: 25 Aug 2015 Posts: 1292
|
mqjeff is correct...and just to be 100% clear on this, IIB is doing exactly what it *should* do. The content of a CDATA section is text. Not XML tags. So the XML parser must treat the contents exactly like any other tag content. It just gets put into the message tree as a string.
If you want to create a message tree from that string, you can use ESQL's CREATE...PARSE DOMAIN 'XMLNSC' to do that. In other ESBs or languages you would need to do something equivalent. |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Dec 03, 2015 7:36 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
timber wrote: |
mqjeff is correct... |
It's a bad habit. _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
Halloween |
Posted: Thu Dec 03, 2015 7:36 am Post subject: |
|
|
Acolyte
Joined: 11 Mar 2015 Posts: 60
|
The question is, how can i convert it to message tree.
It is coming directly out of the SOAP input node and gives this error.
Besides, that even when i pass just simple one XML tag with field value instead of CDATA stuffs and couple of elements like business is sending, still gives me the error.
Even i pass string values just bunch of characters, again the same error.
It does not give me the error only when i pass blank value in process message.
My requirement is to get this XML string, and pass this XML to some queue. I would also need to store each one of these XML string element into database. |
|
Back to top |
|
 |
timber |
Posted: Thu Dec 03, 2015 7:47 am Post subject: |
|
|
 Grand Master
Joined: 25 Aug 2015 Posts: 1292
|
You have not quoted the error yet. So it's hard to suggest how to fix it  |
|
Back to top |
|
 |
maurito |
Posted: Thu Dec 03, 2015 10:10 am Post subject: |
|
|
Partisan
Joined: 17 Apr 2014 Posts: 358
|
The most likely reason for the SOAP input node to reject the message is that it does not conform to the WSDL, so I will insist: have you validated the message in SOAP UI. If you try and it fails, then it is an invalid message and there is nothing you can do in IIB. |
|
Back to top |
|
 |
Halloween |
Posted: Fri Dec 04, 2015 6:46 am Post subject: Problem creating SOAP tree from bitstream |
|
|
Acolyte
Joined: 11 Mar 2015 Posts: 60
|
Thanks You guys.
I resolved it. It was not conforming to WSDL. The element was not confirming to structure in WSDL.
Now i will parse the string to XML and then use JCN to store elements into db
Thanks guys |
|
Back to top |
|
 |
|