SOAP Response Data being partially encoded

Hello,

When I want to return a string , in SOAP response data to the caller, in SOAP UI I see that the response being returned is partially encoded like & lt;abc name=“first”>, & lt;cde gender=“male”>

Is there a way we can return the message completely encoded like & lt;abc name=& quot;first& quot;& gt;, & lt;cde gender=& quot;male& quot;& gt; ? FYI, I have intentionally included spaces after &.

Thanks,
Sai.

That’s soap handler’s default behavior.

If it’s a string field (xml as the content), you can call
WmPublic/pub.string:HTMLEncode
to encode the whole string before returning to the caller via SOAP.

Thanks for your reply.

Yes, I tried encoding using pub.string:HTMLEncode before sending the response. Then the Response in SOAP UI looks like <!CDATA [[ & lt;abc name=& quot;first& quot;& gt;, & lt;cde gender=& quot;male& quot;& gt; ]] which appears wrong to me. When it’s already encoded why does IS wrap it within CDATA section or is it SOAP UI that’s doing it? Is there a way to tell server to stop putting the response in CDATA when the string is already encoded?

Thanks.

both encoded or CDATA should be transparent for client system, easy to handle.

For the reason why, WM is using AXIS2 for SOAP handling, I guess there must be some hard coding for these behavior.
You may want to open a ticket with SAG for possibility of customization.

Yes, I’m trying to find “how to customize” on my own if I can, before opening a ticket to them. If any one has any ideas, please share.

Thank you.