You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by Matt McGrillis <ma...@mcgsoftware.co.uk> on 2017/07/31 15:13:07 UTC

FW: cxf problem


Hi I’m trying to set up a nabble account and post the following:  Can you help?

Hi, 

I have a SOAP client and I need to set the default namespace - which I am doing with a TransformOutInterceptor as such: 

                        Map<String, String> outTransformMap = Collections.singletonMap("Test", 
                                        "Test"); 
                        org.apache.cxf.interceptor.transform.TransformOutInterceptor transformOutInterceptor = new org.apache.cxf.interceptor.transform.TransformOutInterceptor(); 
                        transformOutInterceptor.setDefaultNamespace("http://test"); 
                        transformOutInterceptor.setOutTransformElements(outTransformMap); 
                        ClientProxy.getClient(client).getEndpoint().getOutInterceptors().add(transformOutInterceptor); 

This is working fine, however, by running the transformation it is removing all the SOAP attachments and changing the Content Type of the message from mime to text/xml.   

Can anyone help?  Is this a bug or am I missing something?  I've tried changing the phases at which the interceptor is run, but with to avail. 

Many thanks 
Matt




Sent from Mail for Windows 10



Re: FW: cxf problem

Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi

It might be related to the fact the SOAP message has the associated 
attachments.

Can you please try some test request with some simple SOAP sayHello just 
to narrow it down ?

Cheers, Sergey
On 31/07/17 18:13, Matt McGrillis wrote:
> 
> 
> Hi I’m trying to set up a nabble account and post the following:  Can you help?
> 
> Hi,
> 
> I have a SOAP client and I need to set the default namespace - which I am doing with a TransformOutInterceptor as such:
> 
>                          Map<String, String> outTransformMap = Collections.singletonMap("Test",
>                                          "Test");
>                          org.apache.cxf.interceptor.transform.TransformOutInterceptor transformOutInterceptor = new org.apache.cxf.interceptor.transform.TransformOutInterceptor();
>                          transformOutInterceptor.setDefaultNamespace("http://test");
>                          transformOutInterceptor.setOutTransformElements(outTransformMap);
>                          ClientProxy.getClient(client).getEndpoint().getOutInterceptors().add(transformOutInterceptor);
> 
> This is working fine, however, by running the transformation it is removing all the SOAP attachments and changing the Content Type of the message from mime to text/xml.
> 
> Can anyone help?  Is this a bug or am I missing something?  I've tried changing the phases at which the interceptor is run, but with to avail.
> 
> Many thanks
> Matt
> 
> 
> 
> 
> Sent from Mail for Windows 10
> 
>