I am attempting to test a RM client as a stand alone jar file using JbossWS-native against a service which is deployed in a Jboss 5.0 container. I have a simple client which I generated using wsconsume. I am following the directions from
http://jbossws.jboss.org/mediawiki/index.php?title=WS_Reliable_Messaging
and am adding the Addressing and RM Handlers to the client port. When I run (with only jars from $JBOSS_HOME/client on my classpath) I get the following exception:
javax.xml.ws.WebServiceException: java.lang.ClassCastException: com.sun.xml.ws.handler.SOAPMessageContextImpl cannot be cast to org.jboss.ws.core.CommonMessageContext
at com.sun.xml.ws.handler.ClientSOAPHandlerTube.callHandlersOnRequest(ClientSOAPHandlerTube.java:168)
at com.sun.xml.ws.handler.HandlerTube.processRequest(HandlerTube.java:100)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:559)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:518)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:503)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:400)
at com.sun.xml.ws.client.Stub.process(Stub.java:235)
at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:120)
at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:230)
at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:210)
at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:103)
at $Proxy27.runAction(Unknown Source)
I appear to be doing the same code as the samples. Are thee other examples I could look at?
OK.. I had not used the wsrunclient.sh in the JBOSS_HOM/bin directory. Using this script, instead of my own script, allowed me to get past this issue.