-
1. Re: WSDOCServiceStepByStep help
ibsscott Jul 28, 2005 7:14 PM (in response to ibsscott)I'm thinking the problem is that my client does not have access to the jaxrpc-mapping.xml file and that I will need a J2EE client to help out. Any thoughts? Is there any other way to do this? Does a J2ee client limit me to only talking to java clients? How would a non-java app send me an xml doc?
-
2. Re: WSDOCServiceStepByStep help
nehring Jul 28, 2005 7:35 PM (in response to ibsscott)The WSDL document is the contract between the server and client. Unless you're using non-standard SOAP types, i.e. passing serialized objects, the client and server language/technology doesn't matter. Passing opaque objects may require the client to be a particular technology and would require the client to know how to deserialize the objects.
So, given just the WSDL file, you should be able to use Java, .Net, Perl, etc, to talk to the server. I commonly use Perl clients to test J2EE and .Net webservices. You should be able to get the WSDL file by tacking "?wsdl" to the end of the web service URL in a browser. -
3. Re: WSDOCServiceStepByStep help
thomas.diesler Jul 29, 2005 4:19 AM (in response to ibsscott)Your JWSDP client want to cast to an Apache Axis Message. Why is that?
java.lang.ClassCastException: org.apache.axis.Message at com.sun.xml.rpc.client.dii.CallInvokerImpl._postSendingHook(CallInvokerImpl.java:305) at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:324) at com.sun.xml.rpc.client.dii.CallInvokerImpl.doInvoke(CallInvokerImpl.java:103)
-
4. Re: WSDOCServiceStepByStep help
ibsscott Jul 29, 2005 11:42 AM (in response to ibsscott)I'm not sure why. The request is received on the server succesfully. I just can't unwrap it on the client side. My client looks like this:
URL url = new URL("http://localhost:8080/fifalmonk/fifalmonk/WebServiceSession?wsdl");
QName qname = new QName("http://com/fifalmonk/webservice/WebServiceSession.wsdl",
"WebServiceSession");
ServiceFactory factory = ServiceFactory.newInstance();
Service service = factory.createService( url, qname );
WebServiceSessionEndpoint endpoint= (WebServiceSessionEndpoint) service.getPort(WebServiceSessionEndpoint.class);
... build Transaction bean here....
WebServiceSessionEndpoint_process_RequestStruct request = new WebServiceSessionEndpoint_process_RequestStruct(transactionDocument);
WebServiceSessionEndpoint_process_RequestStruct request = new WebServiceSessionEndpoint_process_RequestStruct(transactionDocument);
WebServiceSessionEndpoint_process_ResponseStruct response = (WebServiceSessionEndpoint_process_ResponseStruct)endpoint.process(request);
I also tried this and got the same result.
Object o = endpoint.process(request);
Something in here is causing the problem:
at com.sun.xml.rpc.client.dii.CallInvokerImpl._postSendingHook(CallInvokerImpl.java:305)
I'm using the -gen:server artifacts to wrap and unwrap the request and response because when I tried to regenerate the client classes with wscompile based on the server's wsdl, it tried to create a constructor with too many parameters. My original beans have a lot of fields. The classes it created would not compile. I shouldn't need to recreate the classes anyways since they were used to build the wsdl in the first place and I have them already. -
5. Re: WSDOCServiceStepByStep help
anil.saldhana Jul 31, 2005 3:35 AM (in response to ibsscott)On the client side, you are not using the jbossws client but are using the Sun implementation.
Try using the client jar for jboss ws4ee in the client directory of jboss instance. -
6. Re: WSDOCServiceStepByStep help
stetsonab Dec 22, 2005 10:12 AM (in response to ibsscott)ibsscott, did you ever get this problem figured out? I have exactly the same error showing up when trying to run my test client. I tested my webservices with a SOAP Message Console, and they are running fine.
Here is the exact error that is being thrown.
java.lang.ClassCastException
at com.sun.xml.rpc.client.dii.CallInvokerImpl._postSendingHook(CallInvokerImpl.java:305)
at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:324)
at com.sun.xml.rpc.client.dii.CallInvokerImpl.doInvoke(CallInvokerImpl.java:103)
at com.sun.xml.rpc.client.dii.BasicCall.invoke(BasicCall.java:492)
at com.sun.xml.rpc.client.dii.CallInvocationHandler.doCall(CallInvocationHandler.java:121)
at com.sun.xml.rpc.client.dii.CallInvocationHandler.invoke(CallInvocationHandler.java:85)
at $Proxy0.login(Unknown Source)
at com.wcom.rrs.remote.client.TestClient.main(TestClient.java:34)
If you or anyone out there could help me, it would be greatly appreciated. -
7. Re: WSDOCServiceStepByStep help
ibsscott Dec 22, 2005 11:21 AM (in response to ibsscott)I decided to wait until the next generation of web services is released. The only reliable way I could use was to pass it as a String and then Marshal it into xml.
-
8. Re: WSDOCServiceStepByStep help
jason.greene Dec 22, 2005 12:59 PM (in response to ibsscott)Is there a reason why you guys are using the sun client instead of the jboss ws client?
-Jason -
9. Re: WSDOCServiceStepByStep help
stetsonab Dec 22, 2005 2:51 PM (in response to ibsscott)Maybe that is where the problem is....maybe the code is referencing the wrong Jar file. Here are the jars that I have in my classpath...
jboss\client\jboss-jaxrpc.jar
jboss\client\jboss-saaj.jar
jboss\client\jboss-ws4ee.jar
jboss\client\jboss-common-client.jar
jboss\client\commons-discovery.jar
jboss\client\commons-logging.jar
jboss\client\wsdl4j.jar
from the WebServices Developer Pack I am using
jwsdp\jaxrpc\lib\jaxrpc-api.jar
jwsdp\jaxrpc\lib\jaxrpc-spi.jar
jwsdp\jaxrpc\lib\jaxrpc-impl.jar
jwsdp\jwsdp-shared\lib\jax-qname.jar
jwsdp\jwsdp-shared\lib\activation.jar
jwsdp\jwsdp-shared\lib\mail.jar
Based on Anil's suggestion from an earlier post I added
jboss\client\jboss-ws4ee-client.jar to my classpath which did not seem to make any difference. I still got the class cast error. So please let me know if I use a wrong jar file, if there are conflicting jars in my classpath, and which one I should use. Your help is appreciated! -
10. Re: WSDOCServiceStepByStep help
maleszka Dec 28, 2005 5:04 AM (in response to ibsscott)The problem is in the jboss jars. Make sure that the jwsdp\jaxrpc\lib\jaxrpc-*.jar are loaded first and don't put the jboss-jaxrpc.jar in the CLASSPATH.
I had the same problem and fixed it by using only the Sun libs of the jwsdp tools. I also used the saaj jars of the Sun jwsdp tools instead of the JBoss one.
Bert -
11. Re: WSDOCServiceStepByStep help
jason.greene Dec 29, 2005 3:18 PM (in response to ibsscott)"stetsonab" wrote:
Maybe that is where the problem is....maybe the code is referencing the wrong Jar file. Here are the jars that I have in my classpath...
Based on Anil's suggestion from an earlier post I added
jboss\client\jboss-ws4ee-client.jar to my classpath which did not seem to make any difference. I still got the class cast error. So please let me know if I use a wrong jar file, if there are conflicting jars in my classpath, and which one I should use. Your help is appreciated!
If you are wanting to use the JBoss webservices stack for a client, then you do not want ANY jwsdp jars in your classpath. You only need the JBoss WS Client jars which are documented here:
http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossWSFAQ
-Jason -
12. Re: WSDOCServiceStepByStep help
thomas.diesler Jan 4, 2006 9:41 AM (in response to ibsscott)
From the WebServices Developer Pack I am using
jwsdp\jaxrpc\lib\jaxrpc-api.jar
jwsdp\jaxrpc\lib\jaxrpc-spi.jar
jwsdp\jaxrpc\lib\jaxrpc-impl.jar
jwsdp\jwsdp-shared\lib\jax-qname.jar
jwsdp\jwsdp-shared\lib\activation.jar
jwsdp\jwsdp-shared\lib\mail.jar
Why?
There is an FAQ about the client jars to use.
http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossWSFAQ -
13. Re: WSDOCServiceStepByStep help
stetsonab Jan 4, 2006 8:39 PM (in response to ibsscott)Thanks to everyone who replied. You guys are great!