You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by Anoop Prasad <an...@gmail.com> on 2009/07/01 18:30:07 UTC

Re: Soap message encoding

Dear Dan,

Now Im facing a different problem. The Client sends SOAP Message which has
UTF-16 encoded XMLdocument. My Server's
service handler can process only UTF-8 encoded data. Naturally we can
transform UTF-16 to UTF-8 while accessing data in the handler's
Implementation.
But im looking for a solution where I can make interceptors work for me
here.
What i want is to have an Interceptor attached to the in-chain before the
de-serialization, which can directly convert the UTF-16 doc to UTF-8,so that
the objects will have
the data represented in UTF-8. Similarly attach an out-chain interceptor to
convert the UTF-8 XML document to UTF-16 document after the serialzation.

I'd like to know which is the most efficient way to achieve this using
existing CXF utilities. Please advice !
Also, I want this to work on various trasnports like HTTP,HTTPSand JMS.



anoopPrasad

Re: Soap message encoding

Posted by Daniel Kulp <dk...@apache.org>.
To be completely honest, I'm very confused by this.   Under pretty much every 
circumstance I can think of, the service objects will get the data as "String" 
objects, which are aren't encoded.    The service really should have no 
knowledge (or need for such knowledge) of how the data was represented on the 
wire.

The exception being attachments where you would get a DataSource or similar, 
but in that case, you have complete control over it in the object.

I guess I'd need more details about how the encoding is impacting the stuff 
the Servers handler is doing.

Dan


On Wed July 1 2009 12:30:07 pm Anoop Prasad wrote:
> Dear Dan,
>
> Now Im facing a different problem. The Client sends SOAP Message which has
> UTF-16 encoded XMLdocument. My Server's
> service handler can process only UTF-8 encoded data. Naturally we can
> transform UTF-16 to UTF-8 while accessing data in the handler's
> Implementation.
> But im looking for a solution where I can make interceptors work for me
> here.
> What i want is to have an Interceptor attached to the in-chain before the
> de-serialization, which can directly convert the UTF-16 doc to UTF-8,so
> that the objects will have
> the data represented in UTF-8. Similarly attach an out-chain interceptor to
> convert the UTF-8 XML document to UTF-16 document after the serialzation.
>
> I'd like to know which is the most efficient way to achieve this using
> existing CXF utilities. Please advice !
> Also, I want this to work on various trasnports like HTTP,HTTPSand JMS.
>
>
>
> anoopPrasad

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