axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anne Thomas Manes" <atma...@gmail.com>
Subject Re: web-service String parameter encoding problem
Date Sat, 25 Mar 2006 16:18:39 GMT
The embedded XML document must be escaped. That's why it looks funny.

Anne

On 3/24/06, Anna Krajewska <a.krajewska@wasko.pl> wrote:
>
> Hi
>
> I have a problem with String parameter encoding. I have a web-service that
> takes as a parameter java.lang.String which is serialized xml DOM
> document. This document has proper header:
>
> <?xml version="1.0" encoding="UTF-8" ?>
>
> but when I try to save my SOAPEnvelope with my own created BaseHandler:
>
> Handler serviceHandler = msgContext.getService();
> MessageContext msgctx = msgContext.getCurrentContext();
> org.apache.axis.Message msg = msgctx.getCurrentMessage();
> File file = new File("C:\\envelope.xml");
> FileOutputStream fos = new FileOutputStream(file);
> msg.writeTo(fos);
> fos.flush();
> fos.close();
>
> the whole SOAPEnvelope looks good but the xml document (String parameter)
> looks terrible. I don't know how to force axis to write that string for me
> also in UTF-8 encoding to the envelope - just as the whole envelope is
> encoded. Is it possible anyway?
>
> HELP!
>
> ania
>
>
>
>
>

Mime
View raw message