<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    Invalid byte 1 of 1-byte UTF-8 sequence
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="http://community.jboss.org/people/meselfe">Scale It</a> in <i>JBoss Web Services</i> - <a href="http://community.jboss.org/message/580207#580207">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>I get an error "Invalid byte 1 of 1-byte UTF-8 sequence." when I deploy a pojo with jaxws webservice annotations on jbossws native.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre class="jive-pre"><code class="jive-code jive-java">org.apache.xerces.xni.XNIException: Parser should stop: [domain:http:<font color="darkgreen">//www.w3.org/TR/1998/REC-xml-19980210]::[key=InvalidByte]::Message=Invalid byte 1 of 1-byte UTF-8 sequence.</font>
&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.jboss.ws.metadata.wsdl.xmlschema.JBossXSErrorHandler.fatalError(JBossXSErrorHandler.java:78)
&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.apache.xerces.impl.xs.opti.SchemaParsingConfig.parse(Unknown Source)
&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.apache.xerces.impl.xs.opti.SchemaParsingConfig.parse(Unknown Source)
&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.apache.xerces.impl.xs.opti.SchemaDOMParser.parse(Unknown Source)
&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.apache.xerces.impl.xs.traversers.XSDHandler.getSchemaDocument(Unknown Source)
&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.apache.xerces.impl.xs.traversers.XSDHandler.resolveSchema(Unknown Source)
&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.apache.xerces.impl.xs.traversers.XSDHandler.constructTrees(Unknown Source)
&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.apache.xerces.impl.xs.traversers.XSDHandler.parseSchema(Unknown Source)
&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.apache.xerces.impl.xs.XMLSchemaLoader.loadSchema(Unknown Source)
&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.apache.xerces.impl.xs.XMLSchemaLoader.loadGrammar(Unknown Source)
&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.jboss.ws.tools.JavaToXSD.parseSchema(JavaToXSD.java:183)
&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.jboss.ws.tools.wsdl.WSDL11Reader.processTypes(WSDL11Reader.java:394)
&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.jboss.ws.tools.wsdl.WSDL11Reader.processTypes(WSDL11Reader.java:409)
&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.jboss.ws.tools.wsdl.WSDL11Reader.processDefinition(WSDL11Reader.java:175)
&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory.parse(WSDLDefinitionsFactory.java:128)
&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.jboss.ws.metadata.umdm.ServiceMetaData.getWsdlDefinitions(ServiceMetaData.java:295)
&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.jboss.ws.metadata.builder.jaxws.JAXWSWebServiceMetaDataBuilder.buildWebServiceMetaData(JAXWSWebServiceMetaDataBuilder.java:166)
&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.jboss.ws.metadata.builder.jaxws.JAXWSServerMetaDataBuilder.setupProviderOrWebService(JAXWSServerMetaDataBuilder.java:50)
&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.jboss.ws.metadata.builder.jaxws.JAXWSMetaDataBuilderJSE.buildMetaData(JAXWSMetaDataBuilderJSE.java:63)
&#160;
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>The java methods exposed as @webmethods take objects as input that have been generated from XSD using JAXB "xjc". The original XSDs are encoded in utf-8 and use international characters. My guess is that while generating the WSDL jboss somehow rebuilds the original XSD types and tries to insert them in a piece of XML thats not utf-8? Maybe the WSDL itself? I noticed the WSDL that jbossws generates has no XML declaration &lt;?xml version="" encoding=""...&gt;! Is there some way to let jboss know it should use utf-8 all the way through?</p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/580207#580207">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JBoss Web Services at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>