On Thursday 10 March 2011 5:15:10 AM James Van wrote:
> 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.
With 2.0.3, I don't think there is anything you can do. That is ANCIENT
ANCIENT. Can I assume you mean to type 2.3.3? :-)
> 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: Some namespaces' prefix has been changed to ns1...ns2....
> 3: Some elements lost their namespace prefix.
With 2.3.3, you can do somethink like:
<jaxws:endpoint ..... >
<jaxws:properties>
<entry key="soap.env.ns.map">
<map>
<entry key="ns1" value="http://blah.blah"/>
<entry key="ns2" value="http://blah.blah2"/>
...
To define a bunch of namespaces written on the envelope. You MAY also need
set the property of:
"disable.outputstream.optimization", "true"
but I'm not really sure.
Dan
>
> I am expecting the response like below:
>
> <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
> xmlns:out="http://www.example.com/out/"
> xmlns:msg="http://www.example.com/msg/"
> xmlns:code="http://www.example.com/code/">
> <soap:Body>
> <out:OUTPUT>
> <msg:RESULT_MSG>MSG</msg:RESULT_MSG>
> <code:RESULT_CODE>CODE</code:RESULT_CODE>
> </out:OUTPUT>
> </soap:Body>
> </soap:Envelope>
>
> But this is what I got:
>
> <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
> <soap:Body>
> <ns1:OUTPUT xmlns:ns1="http://www.example.com/out/"
> xmlns="http://www.example.com/msg/"
> xmlns:ns3="http://www.example.com/code/">
> <RESULT_MSG>MSG</RESULT_MSG>
> <ns3:RESULT_CODE>CODE</ns3:RESULT_CODE>
> </ns1:OUTPUT>
> </soap:Body>
> </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 Van
>
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/How-to-customize-namespaces-position-and-p
> refix-in-CXF-response-tp3423069p3423069.html Sent from the cxf-user mailing
> list archive at Nabble.com.
--
Daniel Kulp
[email protected]
http://dankulp.com/blog
Talend - http://www.talend.com