axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sébastien Arod <sa...@sunopsis.com>
Subject Re: Axis 1.0 throws an exception while providing WSDL
Date Tue, 09 May 2006 07:18:44 GMT
Bug reported http://issues.apache.org/jira/browse/AXIS2-676

Davanum Srinivas a écrit :
> Please log a bug report (http://issues.apache.org/jira/) and upload 
> your wsdl.
>
> thanks,
> dims
>
> On 5/5/06, Sébastien Arod <sarod@sunopsis.com> wrote:
>>  Steve Barham a écrit :
>>  I create my WSDL with JAXP/DOM : Here is the java code to write DOM
>> document to file
>>
>>  Transformer xformer = 
>> TransformerFactory.newInstance().newTransformer();
>>  xformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8"); //$NON-NLS-1$
>>  OutputStream os = new FileOutputStream(getWSDLFile());
>>  Writer writer = new OutputStreamWriter(os, "UTF8");
>> //$NON-NLS-1$
>>  xformer.transform(new DOMSource(mDocument), new StreamResult(writer));
>>  os.close();
>>
>>  Furthermore I check the generated XML file with XML Schema Validator
>> (http://www.w3.org/2001/03/webdata/xsv) that doesn't find
>> any errors.
>>  I can send you the WSDL if it can help.
>>
>>  Seb
>>
>>
>>  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.
>>
>>
>>
>>
>>
>
>
> -- 
> Davanum Srinivas : http://wso2.com/blogs/
>


Mime
View raw message