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

XML Encoding

  • 1.  XML Encoding

    Posted Tue October 23, 2012 11:25 PM

    While exposing the webService I defined string as an output. But in run time from the service it populates this String as an XML.
    When I run the service from an external client I am getting this XML encrypted like <![CDATA[ ]]>.

    Is there anyway I can avoid this encryption?
    I do not have any option to redefine the WSDL.

    Thanks,
    Vishal.


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


  • 2.  RE: XML Encoding

    Posted Wed October 24, 2012 05:59 PM

    Can you provide some details about what the service is doing to create the output variable? It’s hard to know what is causing the markup to be added without seeing the steps.

    As an aside, the placing of CDATA markers around XML is not “encryption”. It is simply markup syntax to indicate that the text within is to be treated as plain text, not as XML markup.


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


  • 3.  RE: XML Encoding

    Posted Wed October 24, 2012 06:26 PM

    Allow me to rephrase it :
    In WSDL’s response we have a STRING defined, but this string is coming out to be a XML. And we need this XML to come as an XML in the output, but as webMethods places CDATA around this String to ensure that it is treated as a string not xml. I just wanted to confirm is there anyway I can make sure this String comes out as XML without this CDATA appended to it.

    It is just a single place where I am making a call of docToXMLString, while making a call to this service I am ensuring that encoding is marked as false.

    Hope this describes my issue better. :slight_smile:


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


  • 4.  RE: XML Encoding

    Posted Wed October 24, 2012 07:21 PM

    Do you have the response schema/doctype associated to the WS response?

    Can you sample here how is the data received in that field with <!CDATA> you explained?

    HTH,
    RMG


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


  • 5.  RE: XML Encoding

    Posted Wed October 24, 2012 07:23 PM

    Do you have the response schema/doctype associated to the WS response?

    Can you sample here more how the data received in that field or whole XML wrapped in that string with <!CDATA> with UTF-8 XML you explained?

    When you said encryption is that sender is sending like that in the response or you think webMethods doing it in the pipeline?

    HTH,
    RMG


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


  • 6.  RE: XML Encoding

    Posted Wed October 24, 2012 07:36 PM

    Yes I do have a Schema associated with WS response.

    Here is what I am getting:

    For all fields which are properly defined are fine, but the one defined as string coming as XML has defined it under CDATA… I understand this is bound to happen, just wanted to confirm if we can avert it.

    <=!=[=C=D=A=T=A=[ Success Mail Request ID-TEST soapUI-111 2008-02-22 10:01:01 SAE SAE]=]=>
    #webmethods-Protocol-and-Transport
    #webMethods
    #Integration-Server-and-ESB


  • 7.  RE: XML Encoding

    Posted Wed October 24, 2012 07:40 PM

    See I pasted normal : <![CDATA[ but got appended with <=!=[=C=D=A=T=A=[


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


  • 8.  RE: XML Encoding

    Posted Wed October 24, 2012 07:41 PM

    YES then you can work with who ever owns the schema and mimic that to get in proper format:

    HTH,
    RMG


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


  • 9.  RE: XML Encoding

    Posted Wed October 24, 2012 08:25 PM

    So you want the response to look like:

    <PayLoad>
    <OutPut>
    <Response>
    <getProfile>
    <ResponseType>Success</ResponseType>
    <RequestID>Mail Request ID-TEST soapUI-111</RequestID>
    <MessageDateTime>2008-02-22 10:01:01</MessageDateTime>
    <SenderID>SAE</SenderID>
    <ReceiverID>SAE</ReceiverID>
    </getProfile>
    </Response>
    </OutPut>
    </PayLoad>

    Do you have 2 different document types involved here? If is defined as a string, then it cannot contain raw XML–that would violate the schema definition. Can you share the schema definitions? Are they yours? Or are they defined by a partner?


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