My Oracle Support Banner

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

Last updated on SEPTEMBER 25, 2020

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.

<DATE> 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://<DOMAINNAME>/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://<DOMAINNAME>/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.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Body>
<echoRequest xmlns="http://<DOMAINNAME>/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://<DOMAINNAME>/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

Changes

 

Cause

To view full details, sign in with your My Oracle Support account.

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


In this Document
Symptoms
Changes
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.