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 "Martin Smith (JIRA)" <ji...@apache.org> on 2007/09/05 03:28:45 UTC

[jira] Created: (AXIS2-3167) Axis2, GSoap, and Character Sets

Axis2, GSoap, and Character Sets
--------------------------------

                 Key: AXIS2-3167
                 URL: https://issues.apache.org/jira/browse/AXIS2-3167
             Project: Axis 2.0 (Axis2)
          Issue Type: Bug
          Components: transports
    Affects Versions: 1.3
            Reporter: Martin Smith


Hello Axis folks! I apologize ahead of time if my issue isn't really an Axis bug, but one with gSOAP.

Long story short, Axis2-1.3 and HttpClient-3.1 by irself choke on the encoding of characters I get back from a gSOAP server. I've detailed some of my analysis at http://dev.grub.org/cgi-bin/trac.cgi/ticket/3.

>From what I can tell, this issue came up in the past with Axis 1, but I can't tell how it was fixed: http://issues.apache.org/jira/browse/AXIS-1268

It's also come up directly at gSOAP's issue tracker:
http://sourceforge.net/tracker/index.php?func=detail&aid=1561294&group_id=52781&atid=468021

In 2003, someone suggested using gSOAP's I_PROMISE_TO_USE_REAL_UTF8 flag (not the real flag name :): 
http://mail-archives.apache.org/mod_mbox/xml-xalan-c-users/200306.mbox/%3C001801c334f6$124189b0$0300a8c0@xenia%3E

Here's a trace from Axis2 minus the authentication header:
[DEBUG] EntityEnclosingMethod - Request body sent
[DEBUG] header - << "HTTP/1.1 200 OK[\r][\n]"
[DEBUG] header - << "Date: Wed, 05 Sep 2007 01:24:27 GMT[\r][\n]"
[DEBUG] header - << "Server: Apache/1.3.28 (Unix)[\r][\n]"
[DEBUG] header - << "Last-Modified: Wed, 05 Sep 2007 01:24:27 GMT[\r][\n]"
[DEBUG] header - << "Content-Length: 281[\r][\n]"
[DEBUG] header - << "Content-Type: text/xml; charset=utf-8[\r][\n]"
[DEBUG] content - << "[0x1f][0x8b][0x8][0x0]"
[DEBUG] content - << "[0x0][0x0][0x0][0x0][0x0][0xff][0x95][0x91][0xcd]n[0x83]0[0x10][0x84][0xef]}[\n]"
[DEBUG] content - << "[0xcb]wp[0xd2]^*[0x4][0x8e][0xda][0x88][0x9c][0xda][0xa6][0x12]m[0xd5]+[0x82]%[0xb1]d[0xd6][0x96]mBx[0xfb][0x9a][0x10] Q[0xf]io[0xfb]3[0xdf]hG[0x1b][0xaf][0x8e][0xb5]$[0x7]0V(L[0xe8]2\P[0x2]X[0xa8]R[0xe0].[0xa1][0x9f][0x1f][0x9b][0xe0][0x91][0xae][0xf8]][0x9c]m[0x9f][0xde][0x83][0xf4][0xed]+J[0xf1][0x0]Ri [0x9e]C[0x1b][0x8d][0xf3][0x84][0xee][0x9d][0xd3][0x11]c[0xb6][0xd8]C[0x9d][0xdb][0xd0][0xaf][0xad][0xca]u[0xa8][0xcc][0x8e][0xf5][0x5][0x83]3[0xc8][0xe8]5[0xba][0xfe][0xb]:[0x1c]4[0xa1]G+&[0xaa]m[0xdb][0xb0]}8[0x89][0xef][0x17][0x8b]%[0xfb]~}[0xc9]NF[0x81]@[0xeb]r,`[0xa6][0xca][0xdb][0xd4](F[0x9b][0xd0][0xc6]`T([0xdd]Q>[0xe7]Vew[0xd1]n[0xf2]F:2[0xb5][0xe3][0xa5][0x99][0xeb]$[0xfc]'[0x18][0x8f][0xab][0xde][0xc9][0xb7][0xc0]'[0xb7][0xb5][0x14][0x80].f[0xf3]jPYg<[0xc4]S,[0x89][0xaa]H%$[0x10]e[0x8]*"P7."[[\r]&w[0xfe][0xa1]~[0xe0][0xc0][0x98]F;({[0x89][0x13]u_4[0xa3][0xe7][0xd9](f[0xd7]y.[0x7]C^[0xf6][0xeb][0xff][0xfc][0x7][\r][0xbc][0x9a]_:[0x2][0x0][0x0]"
Exception in thread "main" org.apache.axis2.AxisFault: Invalid UTF-8 start byte 0x8b (at char #2, byte #-1)
	at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417)
	at org.apache.axis2.builder.SOAPBuilder.processDocument(SOAPBuilder.java:63)
	at org.apache.axis2.transport.TransportUtils.createDocumentElement(TransportUtils.java:160)
	at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:111)
	at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:87)
	at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:326)
	at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:389)
	at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:211)
	at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
	at org.grub.schema.grubd.GrubServiceStub.GrubService2(GrubServiceStub.java:384)
	at org.mbs3.grub.GrubTest.main(GrubTest.java:42)
Caused by: com.ctc.wstx.exc.WstxIOException: Invalid UTF-8 start byte 0x8b (at char #2, byte #-1)
	at com.ctc.wstx.stax.WstxInputFactory.doCreateSR(WstxInputFactory.java:548)
	at com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:604)
	at com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:629)
	at com.ctc.wstx.stax.WstxInputFactory.createXMLStreamReader(WstxInputFactory.java:324)
	at org.apache.axiom.om.util.StAXUtils.createXMLStreamReader(StAXUtils.java:175)
	at org.apache.axis2.builder.SOAPBuilder.processDocument(SOAPBuilder.java:51)
	... 9 more
Caused by: java.io.CharConversionException: Invalid UTF-8 start byte 0x8b (at char #2, byte #-1)
	at com.ctc.wstx.io.UTF8Reader.reportInvalidInitial(UTF8Reader.java:299)
	at com.ctc.wstx.io.UTF8Reader.read(UTF8Reader.java:185)
	at com.ctc.wstx.io.ReaderBootstrapper.initialLoad(ReaderBootstrapper.java:245)
	at com.ctc.wstx.io.ReaderBootstrapper.bootstrapInput(ReaderBootstrapper.java:132)
	at com.ctc.wstx.stax.WstxInputFactory.doCreateSR(WstxInputFactory.java:543)
	... 14 more


I tried going the direct HttpClient route, but I get jibberish and a similar exception. Wireshark also complains about the encoding, but is there any way I could maintain compatibility here, without asking the gSOAP service provider to turn on the play nice flag?

Thank you!!!

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Closed: (AXIS2-3167) Axis2, GSoap, and Character Sets

Posted by "Martin Smith (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-3167?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Smith closed AXIS2-3167.
-------------------------------

    Resolution: Invalid

Turns out the server was gzipping responses, but not providing any indication it was doing so. Now I need to find out how to account for this in Axis2, but that's an issue I can tackle! :)

> Axis2, GSoap, and Character Sets
> --------------------------------
>
>                 Key: AXIS2-3167
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3167
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: transports
>    Affects Versions: 1.3
>            Reporter: Martin Smith
>
> Hello Axis folks! I apologize ahead of time if my issue isn't really an Axis bug, but one with gSOAP.
> Long story short, Axis2-1.3 and HttpClient-3.1 by irself choke on the encoding of characters I get back from a gSOAP server. I've detailed some of my analysis at http://dev.grub.org/cgi-bin/trac.cgi/ticket/3.
> From what I can tell, this issue came up in the past with Axis 1, but I can't tell how it was fixed: http://issues.apache.org/jira/browse/AXIS-1268
> It's also come up directly at gSOAP's issue tracker:
> http://sourceforge.net/tracker/index.php?func=detail&aid=1561294&group_id=52781&atid=468021
> In 2003, someone suggested using gSOAP's I_PROMISE_TO_USE_REAL_UTF8 flag (not the real flag name :): 
> http://mail-archives.apache.org/mod_mbox/xml-xalan-c-users/200306.mbox/%3C001801c334f6$124189b0$0300a8c0@xenia%3E
> Here's a trace from Axis2 minus the authentication header:
> [DEBUG] EntityEnclosingMethod - Request body sent
> [DEBUG] header - << "HTTP/1.1 200 OK[\r][\n]"
> [DEBUG] header - << "Date: Wed, 05 Sep 2007 01:24:27 GMT[\r][\n]"
> [DEBUG] header - << "Server: Apache/1.3.28 (Unix)[\r][\n]"
> [DEBUG] header - << "Last-Modified: Wed, 05 Sep 2007 01:24:27 GMT[\r][\n]"
> [DEBUG] header - << "Content-Length: 281[\r][\n]"
> [DEBUG] header - << "Content-Type: text/xml; charset=utf-8[\r][\n]"
> [DEBUG] content - << "[0x1f][0x8b][0x8][0x0]"
> [DEBUG] content - << "[0x0][0x0][0x0][0x0][0x0][0xff][0x95][0x91][0xcd]n[0x83]0[0x10][0x84][0xef]}[\n]"
> [DEBUG] content - << "[0xcb]wp[0xd2]^*[0x4][0x8e][0xda][0x88][0x9c][0xda][0xa6][0x12]m[0xd5]+[0x82]%[0xb1]d[0xd6][0x96]mBx[0xfb][0x9a][0x10] Q[0xf]io[0xfb]3[0xdf]hG[0x1b][0xaf][0x8e][0xb5]$[0x7]0V(L[0xe8]2\P[0x2]X[0xa8]R[0xe0].[0xa1][0x9f][0x1f][0x9b][0xe0][0x91][0xae][0xf8]][0x9c]m[0x9f][0xde][0x83][0xf4][0xed]+J[0xf1][0x0]Ri [0x9e]C[0x1b][0x8d][0xf3][0x84][0xee][0x9d][0xd3][0x11]c[0xb6][0xd8]C[0x9d][0xdb][0xd0][0xaf][0xad][0xca]u[0xa8][0xcc][0x8e][0xf5][0x5][0x83]3[0xc8][0xe8]5[0xba][0xfe][0xb]:[0x1c]4[0xa1]G+&[0xaa]m[0xdb][0xb0]}8[0x89][0xef][0x17][0x8b]%[0xfb]~}[0xc9]NF[0x81]@[0xeb]r,`[0xa6][0xca][0xdb][0xd4](F[0x9b][0xd0][0xc6]`T([0xdd]Q>[0xe7]Vew[0xd1]n[0xf2]F:2[0xb5][0xe3][0xa5][0x99][0xeb]$[0xfc]'[0x18][0x8f][0xab][0xde][0xc9][0xb7][0xc0]'[0xb7][0xb5][0x14][0x80].f[0xf3]jPYg<[0xc4]S,[0x89][0xaa]H%$[0x10]e[0x8]*"P7."[[\r]&w[0xfe][0xa1]~[0xe0][0xc0][0x98]F;({[0x89][0x13]u_4[0xa3][0xe7][0xd9](f[0xd7]y.[0x7]C^[0xf6][0xeb][0xff][0xfc][0x7][\r][0xbc][0x9a]_:[0x2][0x0][0x0]"
> Exception in thread "main" org.apache.axis2.AxisFault: Invalid UTF-8 start byte 0x8b (at char #2, byte #-1)
> 	at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417)
> 	at org.apache.axis2.builder.SOAPBuilder.processDocument(SOAPBuilder.java:63)
> 	at org.apache.axis2.transport.TransportUtils.createDocumentElement(TransportUtils.java:160)
> 	at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:111)
> 	at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:87)
> 	at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:326)
> 	at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:389)
> 	at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:211)
> 	at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
> 	at org.grub.schema.grubd.GrubServiceStub.GrubService2(GrubServiceStub.java:384)
> 	at org.mbs3.grub.GrubTest.main(GrubTest.java:42)
> Caused by: com.ctc.wstx.exc.WstxIOException: Invalid UTF-8 start byte 0x8b (at char #2, byte #-1)
> 	at com.ctc.wstx.stax.WstxInputFactory.doCreateSR(WstxInputFactory.java:548)
> 	at com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:604)
> 	at com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:629)
> 	at com.ctc.wstx.stax.WstxInputFactory.createXMLStreamReader(WstxInputFactory.java:324)
> 	at org.apache.axiom.om.util.StAXUtils.createXMLStreamReader(StAXUtils.java:175)
> 	at org.apache.axis2.builder.SOAPBuilder.processDocument(SOAPBuilder.java:51)
> 	... 9 more
> Caused by: java.io.CharConversionException: Invalid UTF-8 start byte 0x8b (at char #2, byte #-1)
> 	at com.ctc.wstx.io.UTF8Reader.reportInvalidInitial(UTF8Reader.java:299)
> 	at com.ctc.wstx.io.UTF8Reader.read(UTF8Reader.java:185)
> 	at com.ctc.wstx.io.ReaderBootstrapper.initialLoad(ReaderBootstrapper.java:245)
> 	at com.ctc.wstx.io.ReaderBootstrapper.bootstrapInput(ReaderBootstrapper.java:132)
> 	at com.ctc.wstx.stax.WstxInputFactory.doCreateSR(WstxInputFactory.java:543)
> 	... 14 more
> I tried going the direct HttpClient route, but I get jibberish and a similar exception. Wireshark also complains about the encoding, but is there any way I could maintain compatibility here, without asking the gSOAP service provider to turn on the play nice flag?
> Thank you!!!

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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