Issue with marshalling of SOAP CXF webservice request
<p>I am calling a SOAP webserive using </p>

<p>I am facing an issue with WebService request call, where the request string (XML) is getting formatted while send.</p>

<p>Expected Request:</p>

<pre><code>&lt;soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"&gt;
&lt;soap:Body&gt;
&lt;ns2:serviceRequest xmlns:ns2="urn:example.com/xml/schemas/v1_0/"&gt;
&lt;referenceNum&gt;5361610270000002&lt;/referenceNum&gt;
&lt;client&gt;ABCD&lt;/client&gt;
&lt;serviceName&gt;GET.PERSONAL.DETAIL&lt;/serviceName&gt;
&lt;UserId&gt;USER_1234&lt;/UserId&gt;
&lt;data&gt;&lt;![CDATA[&lt;ns2:getDetailRequest xmlns:ns2="urn:example.com/xml/schemas/v1_0/"&gt;
&lt;HEADER&gt;
&lt;serviceName&gt;GET.PERSONAL.DETAIL&lt;/serviceName&gt;
&lt;serviceType&gt;SYNC&lt;/serviceType&gt;
&lt;serviceVersion&gt;1.0&lt;/serviceVersion&gt;
&lt;/HEADER&gt;
&lt;/ns2:getDetailRequest&gt;]]&gt;
&lt;/data&gt;
&lt;/ns2:serviceRequest&gt;
&lt;/soap:Body&gt;
&lt;/soap:Envelope&gt;
</code></pre>

<p>Actual Request Sent:</p>

<pre><code>&lt;soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"&gt;
&lt;soap:Body&gt;
&lt;ns2:serviceRequest xmlns:ns2="urn:example.com/xml/schemas/v1_0/"&gt;
&lt;referenceNum&gt;5361610270000002&lt;/referenceNum&gt;
&lt;client&gt;ABCD&lt;/client&gt;
&lt;serviceName&gt;GET.PERSONAL.DETAIL&lt;/serviceName&gt;
&lt;UserId&gt;USER_1234&lt;/UserId&gt;
&lt;data&gt;&amp;lt;![CDATA[&amp;lt;ns2:getDetailRequest xmlns:ns2="urn:example.com/xml/schemas/v1_0/"&amp;gt;
&amp;lt;HEADER&amp;gt;
&amp;lt;serviceName&amp;gt;GET.PERSONAL.DETAIL&amp;lt;/serviceName&amp;gt;
&amp;lt;serviceType&amp;gt;SYNC&amp;lt;/serviceType&amp;gt;
&amp;lt;serviceVersion&amp;gt;1.0&amp;lt;/serviceVersion&amp;gt;
&amp;lt;/HEADER&amp;gt;
&amp;lt;/ns2:getAccountDetailRequest&amp;gt;]]&amp;gt
&lt;/data&gt;
&lt;/ns2:serviceRequest&gt;
&lt;/soap:Body&gt;
&lt;/soap:Envelope&gt;
</code></pre>

<p>I am using Apache CXF (SOAP) for webservice call. Marshaling of Java Object is handled internally by CXF and JAXB libraries.</p>

<p>Has anyone faced such issue where elements inside &lt;[CDATA[ ]]> gets formatted during marshaling or How to fix this ?</p>