axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xinjun Chen" <xjchen...@gmail.com>
Subject Re: Converting from UTF-8 to ISO-8859-I with Axis2 and Java
Date Wed, 01 Nov 2006 13:59:25 GMT
Hi Manuel,

Thanks for your reply.
Inside request and response HTTP headers, the encoding are UTF-8. When I use
Ethereal to capture the data on the wire which has not yet been processed by
Axis2, I do see hex e2 80 99.
Inside my Axis2 client, I use OperationClient.

OperationClient mepClient = outInOperation.createClient(serviceContext,
options);
mepClient.execute(true);
MessageContext response = mepClient.getMessageContext(
WSDLConstants.MESSAGE_LABEL_IN_VALUE);
SOAPEnvelope envelope = response.getEnvelope();
log.debug("ResponseEnvelope:\n" + envelope.toStringWithConsume());

Inside the log file, what I see are ? and not the expected RIGHT SINGLE
QUOTATION.
Am I correct to print envelope.toStringWithConsume() into a log file.

In fact I also tried to write the contents of envelope.toStringWithConsume()
into a file specifying UTF-8 as encoding. But when I open that file, the hex
value is already 0x3F (?).


Regards,
Xinjun


On 11/1/06, Manuel Mall <manuel@apache.org> wrote:
>
> On Wednesday 01 November 2006 20:27, Xinjun Chen wrote:
> > Hi,
> >
> > I have the similar problem.
> > I am using the Axis2 client, when the end service send RIGHT SINGLE
> > QUOTATION MARK (U+2019, or 0xE2 0x80 0x99, or e28099). From Ethereal,
> > I can see the bytes e2 80 99. However, Axis2 just convert it to
> > question mark (0x3F). I am not sure whether it is also caused by this
> > bug.
> >
>
> Yes, could be a similar / related problem.
>
> What encoding is set in the XML prolog of the message?
>
> How did you determine that Axis2 converts it to a question mark?
>
> Manuel
>
> > I am going to rollout the project. Is there any estimated timeline
> > for the resolve of this problem?
> >
> > Thank you.
> >
> > Regards,
> > Xinjun
> >
> >
> > On 11/1/06, Davanum Srinivas < davanum@gmail.com
> > <mailto:davanum@gmail.com>  > wrote:
> >
> > Bruno,
> >
> > Please log a JIRA bug with your sample.
> >
> > thanks,
> > dims
> >
> > On 11/1/06, Manuel Mall < manuel@apache.org
> > <mailto:manuel@apache.org> >
> >
> > wrote:
> > > On Wednesday 01 November 2006 13:43, Bruno Negrao wrote:
> > > > Bruno,
> > > >
> > > > encoding issues in my experience can be very tricky to debug.
> > > > Never rely on any characters you see on the screen or in print to
> > > > figure out the actual encoding used. The tool which displays /
> > > > prints may have weaved its own encoding/decoding 'magic' and may
> > > > show you distorted results. Look at the actual byte stream and
> > > > check how the characters are actually encoded in it, i.e. how
> > > > does the message appear 'on the wire'.
> > > >
> > > > Manuel
> > > >
> > > >
> > > > Manuel,
> > > >
> > > > I already tried my tests without tcpmon in the middle and the
> > > > problems persisted anyway.
> > >
> > > Bruno,
> > >
> > > you may well be correct that the problem is in Axis but to be sure
> > > I would recommend you use a 'proper' protocol analyser, e.g.
> > > Ethereal (  <http://www.ethereal.com/> www.ethereal.com) worked
> > > well for me in
> >
> > the past when I needed to look
> >
> > > at 'bytes on the wire'.
> > >
> > > Manuel
> > >
> > > > But I'll check there on the server side if at least the words
> > > > were correctly stored as iso-8859-1.
> > > >
> > > > But this does not dismiss my observation about
> > > > response.getXMLStreamReader().getCharacterEncodingScheme()
> > > >
> > > > That method should definitely return "iso-8859-1" instead of
> >
> > "utf-8".
> >
> > > > I believe this is a proof that axis2 is not doing what it was
> > > > supposed to.
> > > >
> > > > I'd ask you to carefully read my previous posting and analyze
> > > > those evidences I showed.
> > > >
> > > > Thank you,
> > > > bruno.
> > >
> > > -------------------------------------------------------------------
> > >-- To unsubscribe, e-mail:
> > > <mailto:axis-user-unsubscribe@ws.apache.org>
> >
> > axis-user-unsubscribe@ws.apache.org
> >
> > > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> > <mailto:axis-user-help@ws.apache.org>
> >
> >
> >
> >
> > --
> > Davanum Srinivas : http://www.wso2.net <http://www.wso2.net/>
> > (Oxygen for Web Service Developers)
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail:  <mailto:axis-user-unsubscribe@ws.apache.org>
> > axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> > <mailto:axis-user-help@ws.apache.org>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>

Mime
View raw message