I have no luck finding another way. You can try posting in the CXF forum if the handler way does not work for you.

On 06/22/2010 12:20 PM, William Tam wrote:
There is a way of adding the XML header by using JAXWS handler. http://stackoverflow.com/questions/1614431/webservicice-with-apache-cxf-and-custom-headers

But, let me see if there is a easier way to it without requiring handler.

On 06/21/2010 11:50 AM, S. Ali Tokmen wrote:
Hello

I have routes that use CAMEL-CXF. When I call these routes via SoapUI, JAX-WS, JAX-RPC or even Microsoft C# these work perfectly.

BUT, when I try with PHP (whether NuSOAP or the new SoapClient), I have a PHP error like:

   Error:sendSms: SoapFault exception: [Client] looks like we got no
   XML document in [...]

If I look at the HTTP response generated by CAMEL-CXF, its response looks like:

   HTTP/1.1 200 OK
   Server: Apache-Coyote/1.1
   Content-Type: multipart/related; type="application/xop+xml";
   boundary="uuid:7de96b4c-37f3-4835-9519-7adad8ce8114";
   start="<[email protected]>"; start-info="text/xml"
   Content-Length: 1235
   Date: Mon, 21 Jun 2010 15:32:15 GMT


   --uuid:7de96b4c-37f3-4835-9519-7adad8ce8114
   Content-Type: application/xop+xml; charset=UTF-8; type="text/xml";
   Content-Transfer-Encoding: binary
   Content-ID: <[email protected]>

<soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";><soap:Body>[...]</soap:Body></soap:Envelope>
   --uuid:7de96b4c-37f3-4835-9519-7adad8ce8114--

As a result, the SOAP content doesn't start with:

<?xml version="1.0" encoding="utf-8"?>

... and I think that's what making PHP fail.

Any ideas on putting the XML header in front of the SOAP response?

Cheers

Reply via email to