You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by cnnfntop <wo...@yahoo.com> on 2011/03/21 21:56:56 UTC

CXF within Jboss 6: body/envelope namespaces question

Hi,
We just upgraded from jboss 4.2.2 to Jboss 6 which uses CXF internally from what 
I understand.
 
Our  webservice comes up OK and we can call it however the responses are  
different, in particular the namespaces (soap: vs env:). This is  breaking some 
of our clients (which are hard coded to this kind of env: prefix, yes its bad). 


How can we fix this via server side configuration?

For example:
 
On JBOSS 4.2.2 a response looks like this:
 
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/";>
   <env:Header/>
   <env:Body>
      <ns2:isTitleAvailableResponse xmlns:ns2="http://users.mysite.com/";>
         <return>true</return>
      </ns2:isTitleAvailableResponse>
   </env:Body>
</env:Envelope>
 
 
On JBOSS 6 a response looks like this (we need it to look like 4.2.2 above)
 
 
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
  
<soap:Body>
      <ns2:isTitleAvailableResponse xmlns:ns2="http://users.mysite.com/";>
         <return>true</return>
      </ns2:isTitleAvailableResponse>
   </soap:Body>
</soap:Envelope>

Re: CXF within Jboss 6: body/envelope namespaces question

Posted by Daniel Kulp <dk...@apache.org>.
With the version of CXF that is currently built into JBoss, it's a bit 
difficult.  You would need to write an interceptor that would create a 
Map<String, String> of prefix/namespace mappings that you want stuck on the 
envelope and then save that on the message with the key "soap.env.ns.map".   
You would likely also need to set "disable.outputstream.optimization" to 
Boolean.TRUE.

With 2.3.4/2.4, this will become easier as an interceptor won't be required.  
Normal endpoint properties will work.    

Dan


On Monday 21 March 2011 4:56:56 PM cnnfntop wrote:
> Hi,
> We just upgraded from jboss 4.2.2 to Jboss 6 which uses CXF internally from
> what I understand.
> 
> Our  webservice comes up OK and we can call it however the responses are
> different, in particular the namespaces (soap: vs env:). This is  breaking
> some of our clients (which are hard coded to this kind of env: prefix, yes
> its bad).
> 
> 
> How can we fix this via server side configuration?
> 
> For example:
> 
> On JBOSS 4.2.2 a response looks like this:
> 
> <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/";>
>    <env:Header/>
>    <env:Body>
>       <ns2:isTitleAvailableResponse xmlns:ns2="http://users.mysite.com/";>
>          <return>true</return>
>       </ns2:isTitleAvailableResponse>
>    </env:Body>
> </env:Envelope>
> 
> 
> On JBOSS 6 a response looks like this (we need it to look like 4.2.2 above)
> 
> 
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
> 
> <soap:Body>
>       <ns2:isTitleAvailableResponse xmlns:ns2="http://users.mysite.com/";>
>          <return>true</return>
>       </ns2:isTitleAvailableResponse>
>    </soap:Body>
> </soap:Envelope>

-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog
Talend - http://www.talend.com