I have a web app running on JBoss AS 4.2.3, default server configuration. I need to write a web service client that can talk to a soap encoded web service. I know that JBossWS does not support soap encoding, so I am struggling to find a workaround.
From my research I'm lead to believe that JAX-RPC is the one library that does support soap encoding, so have tried using a (JWSDP) wscompile produced client in JBoss 4.2.3.
When I include the JWSDP compatible JARs in the lib directory of my EAR, and my client code calls into the wscompile produced stub, the stub calls into (JWSDP) StreamingSender class and ultimately throws a ClassCastException:
1. java.lang.ClassCastException: org.jboss.ws.core.soap.SOAPMessageImpl 2. at com.sun.xml.rpc.client.StubBase._postSendingHook(StubBase.java:231) 3. at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:324)
How can I make JAX-RPC work on JBoss 4.2.3? Is it possible to manipulate the set of JARs from JWSDP that I am including in my web app to make JAX-RPC (supporting soap encoding) work on JBoss 4.2.3?
If no-one can offer the silver-bullet answer as to how to make JAX-RPC work on JBoss 4.2.3, maybe one of the following ideas will ring true with someone who can at least point me in the right direction to pursue.
* Change the class loader configuration to allow the JAX-RPC (and associated JWSDP) JAR files to work in my web app
* Remove the JBossWS module from the default configuration, and somehow just use JAX-RPC JARs from my web app rather than being loaded as a JBoss service (although I have concerns that the JAX-RPC dependant JARs from JWSDP would still conflict with other XML related JARs in JBoss AS)
* Switch to some other web service client library that supports soap encoding (that I'm not aware of) that can be configured to run on JBoss AS 4.2.3
I am relatively new to JBoss, so if one of the above ideas strikes you as ludicrous (just doesn't make sense), I apologize.
The jars from JWSDP 1.6 I included in my EAR's lib are: activation.jar, commons-beanutils.jar, commons-collections.jar, commons-digester.jar, commons-logging.jar, dom.jar, jaas.jar, jax-qname.jar, jaxp-api.jar, jaxrpc-api.jar, jaxrpc-impl.jar, jaxrpc-spi.jar, mail.jar, namespace.jar, relaxngDatatype.jar, saaj-api.jar, saaj-impl.jar, sax.jar, xercesImpl.jar, xsdlib.jar