You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by James Van <th...@gmail.com> on 2011/03/10 05:46:44 UTC

How to customize namespaces' position and prefix in CXF response

Hi CXF Users, Developers,

I have a CXF v2.0.3 with several services published on it. Servies' stubs
and skeletons was generated by wsdl files which provide by a third party.

Now I got these problems:

1: The reponse soap message put all the namespaces declaration into the
first child element of SOAPBody instead of SOAPEnvelope.
2: All the namespaces' prefix has been changed to ns1...ns2.... 

I am expecting the response like below:

&lt;soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
xmlns:example="http://www.example.com/">
   &lt;soap:Body>
      &lt;example:OUTPUT> 
         &lt;example:RESULT>MESSAGE_CONTENT 
      &lt;/example:OUTPUT> 
   &lt;/soap:Body>
&lt;/soap:Envelope>

But this is what I got:

&lt;soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
   &lt;soap:Body>
      &lt;ns1:OUTPUT xmlns:ns1="http://www.example.com/"> 
         &lt;ns1:RESULT>MESSAGE_CONTENT 
      &lt;/ns1:OUTPUT> 
   &lt;/soap:Body>
&lt;/soap:Envelope>

BTW, I've seen this thread: 
http://cxf.547215.n5.nabble.com/Help-find-example-configuring-soap-envelope-namespace-is-SoapOutInterceptor-the-only-way-td3242428.html
But it did not work for me. The wsdl I am using only defines SOAP1.1

Any thoughts would be greatly appreciated.

Thanks

James

--
View this message in context: http://cxf.547215.n5.nabble.com/How-to-customize-namespaces-position-and-prefix-in-CXF-response-tp3422756p3422756.html
Sent from the cxf-user mailing list archive at Nabble.com.