You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Wesley Mesquita <we...@gmail.com> on 2008/12/01 18:09:51 UTC

Is there any workaround over invalid character in responses?

Hi all,

I am having troubles with the the exception:

org.apache.axiom.om.OMException: com.ctc.wstx.exc.WstxIOException: Invalid
UTF-8
 middle byte 0x64 (at char #538, byte #127)
        at
org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.jav
a:239)
        at
org.apache.axiom.om.impl.llom.OMElementImpl.buildNext(OMElementImpl.j
ava:552)
        at
org.apache.axiom.om.impl.llom.OMElementImpl.getFirstOMChild(OMElement
Impl.java:563)
        at
org.apache.axiom.om.impl.llom.OMElementImpl.getFirstElement(OMElement
Impl.java:823)
        at
org.apache.axiom.soap.impl.llom.SOAPBodyImpl.hasFault(SOAPBodyImpl.ja
va:89)
        at
org.apache.axis2.description.OutInAxisOperationClient.handleResponse(
OutInAxisOperation.java:340)

Using axis2-1.3 with stubs generated by eclipse wtp.


So, we think there is just one character in the responses that is not UTF-8
(ã, very commom in portuguese), but we don´t have much to do on the server
side (just send reports). This is breaking other tests with the application,
so would very intersting to  workaround this for now.

I tried a lot of things, read a lot of mailing lists, but nothing has
worked.

I have been trying to convert non-UTF-8 chars to some kind of garbage just
do complete the trasaction, but did not word. We only can see the data in
the SOAP envelope using sniffers;

Thanks in advance for any help.



-- 
Wesley Mesquita
Computer Engineering Student
Institute of Computing
University of Campinas (UNICAMP)
Mobile: +55 19 93455420
LinkedIn: http://www.linkedin.com/in/wesleymesquita

Re: Is there any workaround over invalid character in responses?

Posted by Wesley Mesquita <we...@gmail.com>.
"Perhaps the server side can change the encoding to UTF-16?"

We suggested this (and other things) to them, but I think they are having
difficulties change encoding in some place between their db and ws server.

"having looked around a bit I guess the encoding of the SOAP-response is not
UTF-8 at all, but plain old ascii. Still the fault would be on the server
side and there is little you can do about it on the client side.
Mind you the <encoding="UTF-8"> tag does not force anything but is meant as
a hint only"

So, I think this is happening because either the http and soap header are
tagged as utf-8, but th client cannot read data into the envelope.

"Maybe you should ask this question on the Woodstox list (Woodstox is
the XML parser used by default by Axis2). It could be that there is a
way to tell the parser to ignore invalid UTF-8 sequences."

Before this I gonna update the woodsotx jars today to see what happens.

thanks all for the replys.

On Tue, Dec 2, 2008 at 10:57 AM, Andreas Veithen
<an...@gmail.com>wrote:

> Wesley,
>
> Maybe you should ask this question on the Woodstox list (Woodstox is
> the XML parser used by default by Axis2). It could be that there is a
> way to tell the parser to ignore invalid UTF-8 sequences.
>
> Andreas
>
> On Mon, Dec 1, 2008 at 18:09, Wesley Mesquita <we...@gmail.com>
> wrote:
> > Hi all,
> >
> > I am having troubles with the the exception:
> >
> > org.apache.axiom.om.OMException: com.ctc.wstx.exc.WstxIOException:
> Invalid
> > UTF-8
> >  middle byte 0x64 (at char #538, byte #127)
> >         at
> > org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.jav
> > a:239)
> >         at
> > org.apache.axiom.om.impl.llom.OMElementImpl.buildNext(OMElementImpl.j
> > ava:552)
> >         at
> > org.apache.axiom.om.impl.llom.OMElementImpl.getFirstOMChild(OMElement
> > Impl.java:563)
> >         at
> > org.apache.axiom.om.impl.llom.OMElementImpl.getFirstElement(OMElement
> > Impl.java:823)
> >         at
> > org.apache.axiom.soap.impl.llom.SOAPBodyImpl.hasFault(SOAPBodyImpl.ja
> > va:89)
> >         at
> > org.apache.axis2.description.OutInAxisOperationClient.handleResponse(
> > OutInAxisOperation.java:340)
> >
> > Using axis2-1.3 with stubs generated by eclipse wtp.
> >
> >
> > So, we think there is just one character in the responses that is not
> UTF-8
> > (ã, very commom in portuguese), but we don´t have much to do on the
> server
> > side (just send reports). This is breaking other tests with the
> application,
> > so would very intersting to  workaround this for now.
> >
> > I tried a lot of things, read a lot of mailing lists, but nothing has
> > worked.
> >
> > I have been trying to convert non-UTF-8 chars to some kind of garbage
> just
> > do complete the trasaction, but did not word. We only can see the data in
> > the SOAP envelope using sniffers;
> >
> > Thanks in advance for any help.
> >
> >
> >
> > --
> > Wesley Mesquita
> > Computer Engineering Student
> > Institute of Computing
> > University of Campinas (UNICAMP)
> > Mobile: +55 19 93455420
> > LinkedIn: http://www.linkedin.com/in/wesleymesquita
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>


-- 
Wesley Mesquita
Computer Engineering Student
Institute of Computing
University of Campinas (UNICAMP)
Mobile: +55 19 93455420
LinkedIn: http://www.linkedin.com/in/wesleymesquita

Re: Is there any workaround over invalid character in responses?

Posted by Andreas Veithen <an...@gmail.com>.
Wesley,

Maybe you should ask this question on the Woodstox list (Woodstox is
the XML parser used by default by Axis2). It could be that there is a
way to tell the parser to ignore invalid UTF-8 sequences.

Andreas

On Mon, Dec 1, 2008 at 18:09, Wesley Mesquita <we...@gmail.com> wrote:
> Hi all,
>
> I am having troubles with the the exception:
>
> org.apache.axiom.om.OMException: com.ctc.wstx.exc.WstxIOException: Invalid
> UTF-8
>  middle byte 0x64 (at char #538, byte #127)
>         at
> org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.jav
> a:239)
>         at
> org.apache.axiom.om.impl.llom.OMElementImpl.buildNext(OMElementImpl.j
> ava:552)
>         at
> org.apache.axiom.om.impl.llom.OMElementImpl.getFirstOMChild(OMElement
> Impl.java:563)
>         at
> org.apache.axiom.om.impl.llom.OMElementImpl.getFirstElement(OMElement
> Impl.java:823)
>         at
> org.apache.axiom.soap.impl.llom.SOAPBodyImpl.hasFault(SOAPBodyImpl.ja
> va:89)
>         at
> org.apache.axis2.description.OutInAxisOperationClient.handleResponse(
> OutInAxisOperation.java:340)
>
> Using axis2-1.3 with stubs generated by eclipse wtp.
>
>
> So, we think there is just one character in the responses that is not UTF-8
> (ã, very commom in portuguese), but we don´t have much to do on the server
> side (just send reports). This is breaking other tests with the application,
> so would very intersting to  workaround this for now.
>
> I tried a lot of things, read a lot of mailing lists, but nothing has
> worked.
>
> I have been trying to convert non-UTF-8 chars to some kind of garbage just
> do complete the trasaction, but did not word. We only can see the data in
> the SOAP envelope using sniffers;
>
> Thanks in advance for any help.
>
>
>
> --
> Wesley Mesquita
> Computer Engineering Student
> Institute of Computing
> University of Campinas (UNICAMP)
> Mobile: +55 19 93455420
> LinkedIn: http://www.linkedin.com/in/wesleymesquita
>

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Re: Is there any workaround over invalid character in responses?

Posted by WJ Krpelan <kr...@yahoo.com>.
Hi,
short of rewriting AXIS2 on the client side, I see no method to come to terms with invalid UTF-8 sequences coming with the SOAP-response.
Invalid UTF-8 is not meant to work of course.
Perhaps the server side can change the encoding to UTF-16?
Wolfgang


--- On Mon, 12/1/08, Wesley Mesquita <we...@gmail.com> wrote:

> From: Wesley Mesquita <we...@gmail.com>
> Subject: Is there any workaround over invalid character in responses?
> To: axis-dev@ws.apache.org
> Date: Monday, December 1, 2008, 6:09 PM
> Hi all,
> 
> I am having troubles with the the exception:
> 
> org.apache.axiom.om.OMException:
> com.ctc.wstx.exc.WstxIOException: Invalid
> UTF-8
>  middle byte 0x64 (at char #538, byte #127)
>         at
> org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.jav
> a:239)
>         at
> org.apache.axiom.om.impl.llom.OMElementImpl.buildNext(OMElementImpl.j
> ava:552)
>         at
> org.apache.axiom.om.impl.llom.OMElementImpl.getFirstOMChild(OMElement
> Impl.java:563)
>         at
> org.apache.axiom.om.impl.llom.OMElementImpl.getFirstElement(OMElement
> Impl.java:823)
>         at
> org.apache.axiom.soap.impl.llom.SOAPBodyImpl.hasFault(SOAPBodyImpl.ja
> va:89)
>         at
> org.apache.axis2.description.OutInAxisOperationClient.handleResponse(
> OutInAxisOperation.java:340)
> 
> Using axis2-1.3 with stubs generated by eclipse wtp.
> 
> 
> So, we think there is just one character in the responses
> that is not UTF-8
> (ã, very commom in portuguese), but we don´t have much to
> do on the server
> side (just send reports). This is breaking other tests with
> the application,
> so would very intersting to  workaround this for now.
> 
> I tried a lot of things, read a lot of mailing lists, but
> nothing has
> worked.
> 
> I have been trying to convert non-UTF-8 chars to some kind
> of garbage just
> do complete the trasaction, but did not word. We only can
> see the data in
> the SOAP envelope using sniffers;
> 
> Thanks in advance for any help.
> 
> 
> 
> -- 
> Wesley Mesquita
> Computer Engineering Student
> Institute of Computing
> University of Campinas (UNICAMP)
> Mobile: +55 19 93455420
> LinkedIn: http://www.linkedin.com/in/wesleymesquita


      

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Re: Is there any workaround over invalid character in responses?

Posted by WJ Krpelan <kr...@yahoo.com>.
Hi,
having looked around a bit I guess the encoding of the SOAP-response is not UTF-8 at all, but plain old ascii. Still the fault would be on the server side and there is little you can do about it on the client side.
Mind you the <encoding="UTF-8"> tag does not force anything but is meant as a hint only
Wolfgang



--- On Mon, 12/1/08, Wesley Mesquita <we...@gmail.com> wrote:

> From: Wesley Mesquita <we...@gmail.com>
> Subject: Is there any workaround over invalid character in responses?
> To: axis-dev@ws.apache.org
> Date: Monday, December 1, 2008, 6:09 PM
> Hi all,
> 
> I am having troubles with the the exception:
> 
> org.apache.axiom.om.OMException:
> com.ctc.wstx.exc.WstxIOException: Invalid
> UTF-8
>  middle byte 0x64 (at char #538, byte #127)
>         at
> org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.jav
> a:239)
>         at
> org.apache.axiom.om.impl.llom.OMElementImpl.buildNext(OMElementImpl.j
> ava:552)
>         at
> org.apache.axiom.om.impl.llom.OMElementImpl.getFirstOMChild(OMElement
> Impl.java:563)
>         at
> org.apache.axiom.om.impl.llom.OMElementImpl.getFirstElement(OMElement
> Impl.java:823)
>         at
> org.apache.axiom.soap.impl.llom.SOAPBodyImpl.hasFault(SOAPBodyImpl.ja
> va:89)
>         at
> org.apache.axis2.description.OutInAxisOperationClient.handleResponse(
> OutInAxisOperation.java:340)
> 
> Using axis2-1.3 with stubs generated by eclipse wtp.
> 
> 
> So, we think there is just one character in the responses
> that is not UTF-8
> (ã, very commom in portuguese), but we don´t have much to
> do on the server
> side (just send reports). This is breaking other tests with
> the application,
> so would very intersting to  workaround this for now.
> 
> I tried a lot of things, read a lot of mailing lists, but
> nothing has
> worked.
> 
> I have been trying to convert non-UTF-8 chars to some kind
> of garbage just
> do complete the trasaction, but did not word. We only can
> see the data in
> the SOAP envelope using sniffers;
> 
> Thanks in advance for any help.
> 
> 
> 
> -- 
> Wesley Mesquita
> Computer Engineering Student
> Institute of Computing
> University of Campinas (UNICAMP)
> Mobile: +55 19 93455420
> LinkedIn: http://www.linkedin.com/in/wesleymesquita


      

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org