axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Barham" <steve.bar...@formicary.net>
Subject Re: Axis 1.0 throws an exception while providing WSDL
Date Fri, 05 May 2006 11:58:37 GMT
Do you have an XML encoding declaration at the top of your WSDL?

eg.  <?xml version="1.0" encoding="utf-8"?>

Chances are that you are missing an encoding declaration (so the parser
defaults to UTF-8 encoding), and are using a non-UTF-8 encoding (eg.
ISO-8859-*).

UTF-8 uses between 1 and 4 bytes to encode a character, and uses the high
order bit of the first byte to indicate multibyte characters. So if your
actual encoding is a single byte per character, and uses characters beyond
127, then you will run into this problem.

What editor and environment did you use to produce the WSDL?

steve




>            I coded an axis2 service that I put in the Axis2 webapp.
>
>  The WSDL (UTF-8 encoded) in the aar contains accents (e.g.
> "pr&eacute;nom") in the XSD element annotations.
>  When I try to get WSDL from deployed service (MyService?wsdl) an
> Exception is thrown :
>  javax.servlet.ServletException: com.ctc.wstx.exc.WstxIOException: Invalid
> UTF-8 middle byte 0x6e (at char #1999, byte #-1); nested exception is:
> 	org.apache.axiom.om.OMException: com.ctc.wstx.exc.WstxIOException:
> Invalid UTF-8 middle byte 0x6e (at char #1999, byte #-1)
> 	org.apache.axis2.transport.http.AxisServlet.doGet(AxisServlet.java:111)
> 	javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
> 	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> cause m&egrave;re  org.apache.axis2.AxisFault:
> com.ctc.wstx.exc.WstxIOException: Invalid UTF-8 middle byte 0x6e (at char
> #1999, byte #-1); nested exception is:  	org.apache.axiom.om.OMException:
> com.ctc.wstx.exc.WstxIOException: Invalid UTF-8 middle byte 0x6e (at char
> #1999, byte #-1)
> 	org.apache.axis2.description.AxisService.getWSDL(AxisService.java:558)
> 	org.apache.axis2.description.AxisService.printWSDL(AxisService.java:533)
> 	org.apache.axis2.transport.http.ListingAgent.processListService(ListingAgent.java:144)
> 	org.apache.axis2.transport.http.ListingAgent.handle(ListingAgent.java:89)
> 	org.apache.axis2.transport.http.AxisServlet.doGet(AxisServlet.java:109)
> 	javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
> 	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)  It's seems
> to me that's a bug cause my WSDL is a valid XML file.


-- 
Steve Barham                       tel: +44 (0)7973 199 471
Systems Engineer
Formicary - delivering quality financial technology solutions
http://www.formicary.net/


Mime
View raw message