I use JDK 1.6, JAX-WS RI 2.2.5 Everything works fine when the handler is not added to the service endpoint. But when the web method is called, after adding the SOAP handler on the server side and the handler, soapMessageContext.getMessage () is executed. ToString (), the client receives an internal server 500 error (which means the server encountered an error while processing the request). The server side displays the following trace:
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.<init>(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)
After some Googling, he WILL VISIT his problems with the library. JAX-WS is also present in JDK 1.6, and I also added to my project. But when I remove JAX-WS 2.2.5 libs from the project, it causes some classes to fail.
Actually, I'm not sure if this is a compatibility or duplication problem for libs or something else. Any help would be greatly appreciated.
Here is the endpoint configuration:
<endpoint name="TestingService" implementation="com.myapp.jaxws.TestingService" url-pattern="/jaxws/TestingService" enable-mtom="true"> <handler-chains xmlns="http://java.sun.com/xml/ns/javaee"> <handler-chain> <handler> <handler-name>MyLogicalHandler</handler-name> <handler-class>com.myapp.jaxws.TestingLogicalHandler</handler-class> </handler> <handler> <handler-name>MySOAPHandler</handler-name> <handler-class>com.myapp.jaxws.TestingSOAPHandler</handler-class> </handler> </handler-chain> </handler-chains> </endpoint>
source share