IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

Sending CDATA in request for SOAP call

  • 1.  Sending CDATA in request for SOAP call

    Posted Tue November 11, 2014 08:02 PM

    Hi All,

    We have an external web Service based on SOAP to which we have to pass a XML in a string element. We created a webservice consumer in Integration server.

    We are wrapping the XML string in CDATA as follows:

    <![CDATA[ ]]>

    Using CDATA means that the content should not be encoded or be treated as plain string. But looks like webMethods SOAP processor still encodes the content and changes it to something like below:

    <![CDATA[ ]]>

    Is there a way to stop the encoding? We are using INtegration sever 7.1.3 and it uses the service pub.client:soapClient

    Thanks and Regards,
    Ninad Patil


    #webMethods
    #Integration-Server-and-ESB
    #webmethods-Protocol-and-Transport


  • 2.  RE: Sending CDATA in request for SOAP call

    Posted Wed November 12, 2014 11:05 AM

    Are you not able to decode it? is the customer sending encoding=“UTF-8” in the soap request?

    HTH,
    RMG


    #webMethods
    #Integration-Server-and-ESB
    #webmethods-Protocol-and-Transport


  • 3.  RE: Sending CDATA in request for SOAP call

    Posted Tue January 20, 2015 09:15 PM

    I know this post is a couple months old, but it’s the closest to the issue I am having.

    I’m trying to return HTMLEncoded XML in a string element, but the Integration Server is “re-encoding” the data, invalidating the format.

    &lt becomes &amplt

    What are my options?

    Thanks,
    David


    #Integration-Server-and-ESB
    #webMethods
    #webmethods-Protocol-and-Transport


  • 4.  RE: Sending CDATA in request for SOAP call

    Posted Wed January 21, 2015 02:13 AM

    When you use the service pub.xml:documentToXMLString to create an xml string specify the input “encode” to false, which means do not HTML?encode the data.


    #webmethods-Protocol-and-Transport
    #webMethods
    #Integration-Server-and-ESB


  • 5.  RE: Sending CDATA in request for SOAP call

    Posted Wed January 21, 2015 11:33 AM

    That part is done. I have pub.flow:debugLog after that shows the message exactly the way I want it, but when the data is returned, there is extra encoding. I had to add an extra space [here] after the &'s so that they would show.

    from the log, which is the last line in my flow service:

    & lt;Header DateTime="2015-01-14

    what is returned in soapUI

    & amp;lt;Header DateTime="2015-01-14

    I have seen several posts that detail that there may be something wrong with the WSDL definition I’ve created, but I don’t know what other data type besides string to use, because for all intents, that’s how I want the data treated.


    #Integration-Server-and-ESB
    #webmethods-Protocol-and-Transport
    #webMethods


  • 6.  RE: Sending CDATA in request for SOAP call

    Posted Wed January 21, 2015 05:05 PM

    David,

    yes when you set encoding to true it outputs any ampersand with &

    Is that what you don’t want to appear in the output?

    HTH,
    RMG


    #webMethods
    #webmethods-Protocol-and-Transport
    #Integration-Server-and-ESB


  • 7.  RE: Sending CDATA in request for SOAP call

    Posted Wed January 21, 2015 05:15 PM

    I have the encode set to false on the docToXML before I do the trace log.
    I can’t use the encode option as I need the quotes to remain as is in the response node.

    I have 2 distinct solution paths I have been working down.

    A:Currently the IS is automatically encoding the less-than symbol, but not the greater-than symbol. I’m assuming what ever is controlling this is actually my problem.

    B: Because it was only encoding the lt symbol, I tried to manually encod the gt and lt symbols. Then what happens is the IS encodes the ampersands.


    #webMethods
    #webmethods-Protocol-and-Transport
    #Integration-Server-and-ESB


  • 8.  RE: Sending CDATA in request for SOAP call

    Posted Wed January 21, 2015 05:58 PM

    I believe the service is designed by default html encoded format in the output which should be widely accepted by the apps part of the html encoded style.So may be you can use replace service function for each lt and gt and amp; how ever it is forced way of taking out the encoding style in the XML.

    HTH,
    RMG


    #Integration-Server-and-ESB
    #webmethods-Protocol-and-Transport
    #webMethods


  • 9.  RE: Sending CDATA in request for SOAP call

    Posted Wed January 21, 2015 06:12 PM

    Perhaps I should change the line of thinking to “Why isn’t it encoding the greater than sign, rather than how do i get it to not encode the less-than and amp symbols”


    #webMethods
    #Integration-Server-and-ESB
    #webmethods-Protocol-and-Transport


  • 10.  RE: Sending CDATA in request for SOAP call

    Posted Thu January 22, 2015 02:46 PM