[WLS10.3.4]CDATA Segment In Soap Request Ignored When Transformed To A String (Doc ID 1360583.1)

Last updated on JUNE 09, 2016

Applies to:

Oracle Weblogic Server - Version 10.3.4 and later
Information in this document applies to any platform.

Symptoms

On WLS 10.3.4 deploying a webservice and invoking it from client we notice that the Segment in soap request ignored when transformed to a string.

If a request contains <FieldA>outside cdata <![CDATA[inside <data>cdata]]></FieldA>, the transformed string will become <FieldA>outside cdata </FieldA>. I.e. the CDATA segment is completely missing in the result.


Below is the snippet from WLS 10.3.4 log with webservice debug enabled.

<ServletDebugUtil.printRequest:34>
** S T A R T I N P U T S T R E A M **
Sep 13, 2011 4:01:13 PM com.sun.xml.ws.transport.http.HttpAdapter
fixQuotesAroundSoapAction
INFO: Received WS-I BP non-conformant Unquoted SoapAction HTTP header:
INFO com.sun.xml.ws.transport.http.HttpAdapter Received WS-I BP
non-conformant Unquoted SoapAction HTTP header:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Body>
<echoRequest xmlns="http://test.ibm.com/xsd">
<arg0>outside cdata <![CDATA[<data>inside cdata</data>]]></arg0>
</echoRequest>
</soapenv:Body>
</soapenv:Envelope>** E N D I N P U T S T R E A M **

When trying to parse this xml with javax.xml.transform.Transformer notice
below snippet on WLS 10.3.4

=====================Request payload================

<?xml version="1.0" encoding="UTF-8"?><echoRequest
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns="http://test.ibm.com/xsd">
<arg0>outside cdata </arg0>
</echoRequest>

====================================================



Notice that the elements defined in the CDATA segment are not visible after transformation.

This issue is not evident in releases prior to WLS 10.3.4
For instance when the same use case was tested against WLS 10.3.3,we notice below expected result.

<ServletDebugUtil.printRequest:34>
** S T A R T I N P U T S T R E A M **
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Body>
<echoRequest xmlns="http://test.ibm.com/xsd">
<arg0>outside cdata <![CDATA[<data>inside cdata</data>]]></arg0>
</echoRequest>
</soapenv:Body>
</soapenv:Envelope>

When trying to parse this xml with javax.xml.transform.Transformer notice
below snippet on WLS 10.3.0

=====================Request payload================

<?xml version="1.0" encoding="UTF-8"?><echoRequest
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns="http://test.ibm.com/xsd">
<arg0>outside cdata <data>inside cdata</data></arg0>
</echoRequest>
====================================================



Notice that the elements defined in the CDATA segment are visible on WLS 10.3.3

In order to replicate the issue,please refer to attached test case - testcase.zip.Refer to Readme text file for instructions.

 

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms