You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Willem Jiang <wi...@gmail.com> on 2014/05/04 09:45:01 UTC

Re: camel-cxf component is encoding(base64) by default

If you want to handle the message stream yourself, you may need to use MESSAGE data format instead of using POJO data format. Otherwise camel-cxf will decode/encode the code for you.


Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English)
          http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang
Weibo: 姜宁willem


On Wed, Apr 30, 2014 at 6:26 AM, ravi.4indra <ra...@gmail.com> wrote:
Hi ,

I am consuming the web service using the camel-cxf component. Below is how
the element defined in
wsdl.

<xs:element name="elementA"
ns1:expectedContentTypes="application/octet-stream" type="xs:base64Binary"
xmlns:ns1="http://www.w3.org/2005/05/xmlmime"/>

javaCode:
element A is encoded base64 String
DataHandler dataHandler = new DataHandler(elementA, "text/plain");

I am observing that camel-cxf component is encoding the encoded base64
String in SOAP request. Is this the default behaviour of camel-cxf component
? Is there a way I can stop camel-cxf from encoding as i want to pass in the
encoded Base64.

Any Help in Appreciated

Thanks
Ravi



--
View this message in context: http://camel.465427.n5.nabble.com/camel-cxf-component-is-encoding-base64-by-default-tp5750705.html
Sent from the Camel - Users mailing list archive at Nabble.com.



Re: camel-cxf component is encoding(base64) by default

Posted by Willem Jiang <wi...@gmail.com>.
Normally CXF interceptors can take care of the message marshalling (encoding base 64) and unmarshalling (decoding base 64) out of box.
But in camel-cxf we have some data formats which can help user deal with the low level message.
You can find more information about these data formats here[1]

[1]https://camel.apache.org/cxf.html

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.iteye.com (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On June 15, 2014 at 10:29:38 PM, ravi.4indra (ravi.4indra@gmail.com) wrote:
> loos like it's the cxf behaviour to decode the base64. but I could not find
> this in cxf docs.
>  
>  
>  
> --
> View this message in context: http://camel.465427.n5.nabble.com/camel-cxf-component-is-encoding-base64-by-default-tp5750705p5752303.html  
> Sent from the Camel - Users mailing list archive at Nabble.com.
>  


Re: camel-cxf component is encoding(base64) by default

Posted by "ravi.4indra" <ra...@gmail.com>.
loos like it's the cxf behaviour to decode the base64. but I could not find
this in cxf docs.



--
View this message in context: http://camel.465427.n5.nabble.com/camel-cxf-component-is-encoding-base64-by-default-tp5750705p5752303.html
Sent from the Camel - Users mailing list archive at Nabble.com.