XML Encoding

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.

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.

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:

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

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

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]=]=>

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

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

HTH,
RMG

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?