views:

28

answers:

0

I am using JAX-WS 2.1 and I have built a web service using JAX-WS via the development tools in Netbeans 6.0. It seems that everything builds correctly and starts correctly, however on the first web service request after restarting Tomcat, I get the following exception:

SEVERE: Couldn't create SOAP message due to exception: Unable to create StAX reader or writer com.sun.xml.ws.protocol.soap.MessageCreationException: Couldn't create SOAP message due to exception: Unable to create StAX reader or writer at com.sun.xml.ws.encoding.SOAPBindingCodec.decode(SOAPBindingCodec.java:365) at com.sun.xml.ws.transport.http.HttpAdapter.decodePacket(HttpAdapter.java:277) at com.sun.xml.ws.transport.http.HttpAdapter.access$500(HttpAdapter.java:93) at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:457) at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:244) at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:135) at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doGet(WSServletDelegate.java:129) at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doPost(WSServletDelegate.java:160) at com.sun.xml.ws.transport.http.servlet.WSServlet.doPost(WSServlet.java:75) at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697) at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690) at java.lang.Thread.run(Thread.java:619)

I imagine someone has seen this error before, can anyone tell me what I am doing wrong and why I am only getting it on the initial web service request?

Soap request:

<soapenv:Envelope 
    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
    xmlns:xsd="ws.companynamehere.com/xsd"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:ns2="ws.companynamehere.com/xsd">
<soapenv:Header/>
<soapenv:Body>
    <ns2:Pickup>
        <contact>
            <company>DEMO COMPANY</company> 
            <name>DEMO COMPANY</name> 
            <phone>1111111111</phone> 
            <email>[email protected]</email> 
        </contact>
        <shipper>
            <shipperName>DEMO</shipperName>
            <address>123 TEST AVE</address> 
            <city>SOMEWHERE</city> 
            <state>SC</state> 
            <zip>99999</zip> 
            <pickupContactName>Test</pickupContactName> 
            <phone>9999999999</phone> 
            <email>[email protected]</email> 
            <email2 /> 
            <email3 /> 
            <fax  /> 
            <requestPickupDate>20101008</requestPickupDate> 
            <requestPickupTime>1200</requestPickupTime>  
        </shipper>
        <consignees>
            <Consignee>
                <name>TEST</name> 
                <destZip>99999</destZip> 
                <weight>1234</weight> 
                <pieces>1</pieces> 
                <pkgType>PL</pkgType> 
            </Consignee>
        </consignees>
    </ns2:Pickup>
</soapenv:Body>
</soapenv:Envelope>

Soap response (1st try only):

<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"&gt;
   <S:Body>
      <S:Fault xmlns:ns4="http://www.w3.org/2003/05/soap-envelope"&gt;
         <faultcode>S:Client</faultcode>
         <faultstring>Couldn't create SOAP message due to exception: Unable to create StAX reader or writer</faultstring>
      </S:Fault>
   </S:Body>
</S:Envelope>