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 » Double Escape In MB?

Post new topic  Reply to topic
 Double Escape In MB? « View previous topic :: View next topic » 
Author Message
DJGoodrich
PostPosted: Fri Jan 27, 2012 6:09 pm    Post subject: Double Escape In MB? Reply with quote

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:

&lt;CreateOutreachOpportunityRqst xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:noNamespaceSchemaLocation=&quot;CreateOutreachOppportunityRqst.xsd&quot;&gt;

The WAS developer is stating the message is arriving as follows:

&amp;lt;CreateOutreachOpportunityRqst xmlns:xsi=&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot; xsi:noNamespaceSchemaLocation=&amp;quot;CreateOutreachOppportunityRqst.xsd&amp;quot;&amp;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
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
fjb_saper
PostPosted: Fri Jan 27, 2012 6:51 pm    Post subject: Re: Double Escape In MB? Reply with quote

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:

&lt;CreateOutreachOpportunityRqst xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:noNamespaceSchemaLocation=&quot;CreateOutreachOppportunityRqst.xsd&quot;&gt;

The WAS developer is stating the message is arriving as follows:

&amp;lt;CreateOutreachOpportunityRqst xmlns:xsi=&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot; xsi:noNamespaceSchemaLocation=&amp;quot;CreateOutreachOppportunityRqst.xsd&amp;quot;&amp;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
View user's profile Send private message Send e-mail
smdavies99
PostPosted: Fri Jan 27, 2012 10:30 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.

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
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 » Double Escape In MB?
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.