|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Double Escape In MB? |
« View previous topic :: View next topic » |
Author |
Message
|
DJGoodrich |
Posted: Fri Jan 27, 2012 6:09 pm Post subject: Double Escape In MB? |
|
|
Apprentice
Joined: 12 Dec 2001 Posts: 30 Location: SW Florida
|
Currently working a customer in MB v6.1 who's requirement indicate to take a section of the SOAP XML and replace the <, > & " with the escaped equivalents. That is done and when used the deployable WSDL to create the sub-flow to issue the SOAP Request, the WAS (v6.1) the message is arriving with what appears to be an extra escaped character. I've recived the initial XML as a BLOB, used a REPLACE and it appears to be valid. Testing with the same message via SOAPui doe not produce the extra escape characters.
The elements in the WSDL are defined with XSD :string
From the MB trace I see the following being sent within the proper XML element:
This first bit of the the message data being passed to requestXML prior to the SOAP Request Node call:
<CreateOutreachOpportunityRqst xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="CreateOutreachOppportunityRqst.xsd">
The WAS developer is stating the message is arriving as follows:
&lt;CreateOutreachOpportunityRqst xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:noNamespaceSchemaLocation=&quot;CreateOutreachOppportunityRqst.xsd&quot;&gt
I can not find anywhere in the MB trace or debugger that this is occurring within MB and we seem to have reached an impasse.
Thank you for any and all assistance. I can provide more details of full SOAP message & WSDL is necessary. |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Jan 27, 2012 6:51 pm Post subject: Re: Double Escape In MB? |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
DJGoodrich wrote: |
Currently working a customer in MB v6.1 who's requirement indicate to take a section of the SOAP XML and replace the <, > & " with the escaped equivalents. That is done and when used the deployable WSDL to create the sub-flow to issue the SOAP Request, the WAS (v6.1) the message is arriving with what appears to be an extra escaped character. I've recived the initial XML as a BLOB, used a REPLACE and it appears to be valid. Testing with the same message via SOAPui doe not produce the extra escape characters.
The elements in the WSDL are defined with XSD :string
From the MB trace I see the following being sent within the proper XML element:
This first bit of the the message data being passed to requestXML prior to the SOAP Request Node call:
<CreateOutreachOpportunityRqst xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="CreateOutreachOppportunityRqst.xsd">
The WAS developer is stating the message is arriving as follows:
&lt;CreateOutreachOpportunityRqst xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:noNamespaceSchemaLocation=&quot;CreateOutreachOppportunityRqst.xsd&quot;&gt
I can not find anywhere in the MB trace or debugger that this is occurring within MB and we seem to have reached an impasse.
Thank you for any and all assistance. I can provide more details of full SOAP message & WSDL is necessary. |
What appears to be happening here is that you have an xml content as value of an xml element. Then you are setting that escaped content again as xml element and you get the double escaped stuff.
You should probably just parse the content and then create the blob including the outer xml tags... if the blob is still needed...
Do not put a XML as BLOB with an element representing an XML into an element. This way spells trouble or double escaped xml...
If an xml element contains another XML part it will escape the xml tags.
To avoid this PARSE the XML part and attach it correctly in the tree...
Just my $0.02  _________________ MQ & Broker admin |
|
Back to top |
|
 |
smdavies99 |
Posted: Fri Jan 27, 2012 10:30 pm Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
Why are you not considering using a properly valid XML structure?
You might be better off using a structure that uses CDATA than trying to FIX something that IMHO is broken. _________________ 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 |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|