title: JAX-WS - NoSuchMethodError at getting Message in SOAP Handler
body: <p>I am using JDK 1.6, JAX-WS RI 2.2.5
  Things work perfect when no handler is added at service endpoint. But when a web method is called, after adding SOAP Handler at server side, and handler execute soapMessageContext.getMessage().toString(), the client get Internal Server Error 500 (which means server encountered an error while processing request). And at server side, following trace is printed:</p>
  
  <pre><code>Mar 14, 2012 4:26:15 PM com.sun.xml.ws.transport.http.servlet.WSServletDelegate doGet
  SEVERE: caught throwable
  java.lang.NoSuchMethodError: com.sun.istack.XMLStreamReaderToContentHandler.&lt;init&gt;(Ljavax/xml/stream/XMLStreamReader;Lorg/xml/sax/ContentHandler;ZZ[Ljava/lang/String;)V
  at com.sun.xml.ws.message.stream.StreamMessage.writePayloadTo(StreamMessage.java:355)
  at com.sun.xml.ws.message.stream.StreamMessage.writeTo(StreamMessage.java:462)
  at com.sun.xml.ws.message.AbstractMessageImpl.readAsSOAPMessage(AbstractMessageImpl.java:198)
  at com.sun.xml.ws.handler.SOAPMessageContextImpl.getMessage(SOAPMessageContextImpl.java:84)
  at com.myapp.jaxws.TestingSOAPHandler.handleMessage(TestingSOAPHandler.java:21)
  </code></pre>
  
  <p><br/> After some Googling, it SEEMS its libraries issue. The JAX-WS is also there in JDK 1.6 and I have also added into my project. But when I remove JAX-WS 2.2.5 libs from project, it triggers some classes missing error. </p>
  
  <p>Actually I am not sure, is it libs compatibility or duplication issue or something else. Any help would be highly appreciated.</p>
  
  <p>Here is the end point configuration:</p>
  
  <pre><code>&lt;endpoint name="TestingService" implementation="com.myapp.jaxws.TestingService" url-pattern="/jaxws/TestingService" enable-mtom="true"&gt;
  &lt;handler-chains xmlns="http://java.sun.com/xml/ns/javaee"&gt;
    &lt;handler-chain&gt;
        &lt;handler&gt;
            &lt;handler-name&gt;MyLogicalHandler&lt;/handler-name&gt;
            &lt;handler-class&gt;com.myapp.jaxws.TestingLogicalHandler&lt;/handler-class&gt;
        &lt;/handler&gt;
        &lt;handler&gt;
            &lt;handler-name&gt;MySOAPHandler&lt;/handler-name&gt;
            &lt;handler-class&gt;com.myapp.jaxws.TestingSOAPHandler&lt;/handler-class&gt;
        &lt;/handler&gt;
      &lt;/handler-chain&gt;
  &lt;/handler-chains&gt;
  &lt;/endpoint&gt;
  </code></pre>