Hi,
One workaround should work is that you can add an interceptor for your cxf bc provider out interceptor chain, set the namespace to 2004/08
something like

      AddressingBuilder builder = AddressingBuilder.getAddressingBuilder();
      AddressingProperties maps = builder.newAddressingProperties();
((AddressingPropertiesImpl)maps).exposeAs("http://schemas.xmlsoap.org/ws/2004/08/addressing";);
      //associate MAPs with request context
      Map<String, Object> requestContext = new Map<String, Object>();
requestContext.put(CLIENT_ADDRESSING_PROPERTIES, maps); then bind this request context to your outgoing soap message

then bind the requestContext to your outgoing soapmessage, you should ensure this interceptor get invoked before MAPAggregator and MAPCodec

Freeman

servicer-mixer wrote:
Hi,

I have the security and saaj configured on the outgoing messages. The
security works fine. I think I have nailed the problem down to a mismatch in
ws-addressing namespaces. The external service uses
http://schemas.xmlsoap.org/ws/2004/08/addressing while cxf uses
http://www.w3.org/2005/08/addressing.

When I disable addressing interceptors, the headers are passed through to
the external service and i get the expected reply on the consumer end.

This is still not exactly what I'm looking for, but it should work for now.

I've been trying to figure out how to change ws-addressing namespace used by
cxf, but haven't had much luck... Something about ws-policy configuration
with which I'm not yet familiar.

Here is the provider cxf config as it is now:

  <bean id="cxf" class="org.apache.cxf.bus.CXFBusImpl">
      <property name="inInterceptors">
         <list>
            <ref bean="loggingIn" />
         </list>
      </property>
      <property name="inFaultInterceptors">
         <list>
            <ref bean="loggingIn" />
         </list>
      </property>
      <property name="outInterceptors">
         <list>
            <bean
class="org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor" />
            <ref bean="securityInterceptor" />
            <ref bean="loggingOut" />
         </list>
      </property>
      <property name="outFaultInterceptors">
         <list>
            <ref bean="loggingOut" />
         </list>
      </property>
   </bean>

Thanks

Reply via email to