Hi,
I don't think the transform feature will help you here because it
can't be used to empty the content or set the status code.

What might work in CXF 2.4 is to set the http status code in the
message through your interceptor that is invoked for the partial
response (the empty response to your oneway request) that is sent back
to the servlet entry during the oneway processing.

you can set the status of this message

message.put(Message.RESPONSE_CODE, 202);

regards, aki

2012/8/29 ychawla <[email protected]>:
> Hello All,
> I am currently using cxf 2.4.x and locked into ServiceMix 4.4.1.  I am
> having issues with .NET integration because a one way operation is sending
> back a WS-Addressing message.  I realize that an upgrade to CXF 2.5.x will
> solve this problem.  However I don't have this option now.
>
> Can I somehow handle this in an interceptor?  I would like to change the
> HTTP status to 202 and remove the soap message.
>
> I tried something like this, but I don't think I quite know how to modify
> the message:
>
>
> public class RemoveSoapMessageForOneWayResponse extends
> AbstractSoapInterceptor {
>
>     public RemoveSoapMessageForOneWayResponse() {
>         super(Phase.PRE_STREAM);
>         addBefore(Arrays.asList(StaxOutInterceptor.class.getName(),
> AttachmentOutInterceptor.class.getName()));
>     }
>
>     @Override
>     public void handleMessage(SoapMessage message) throws Fault {
>
>          message.setContent(String.class, "");
>     }
>
>     protected <T> T createSoapMessage(Class<T> messageType) {
>         // create your message
>         return null;
>     }
>
> }
>
> I was also thinking of using the transformation capabilities:
> http://cxf.apache.org/docs/transformationfeature.html
>
> However, I couldn't see how to limit this to a single CXF endpoint.  My
> application currently has many CXF endpoints.
>
> Any ideas on what to try next?
>
> Thanks,
> Yogesh
>
>
>
> --
> View this message in context: 
> http://cxf.547215.n5.nabble.com/WS-Addressing-and-One-Way-tp5646635p5713278.html
> Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to