views:

1446

answers:

4

Can someone point me a good step-by-step tutorial to consuming an already running web service in java?

PS: I tried creating the classes with wsconsume, but it cries with
[ERROR] rpc/encoded wsdls are not supported in JAXWS 2.0. (my web service is rpc/encoded)

If I can consume web services entirely by hand (using no wizards), and understand how is it working, then I'll be happy.

Thanks!

Update: I have found out that rpc web services are not consumed using jbossws, but jboss-jaxrpc, which implements the JAX-RPC specification. I've found a guide for JAX-RPC here, but I'm still looking for other guides that could help.

A: 

If you have the WSDL and XSD files, you can use the Axis web-services library to create Java classes that will interact with the services they describe. From the stand-point of this library, you are creating a client application.

Steve Moyer
It's what I was doing (generated by the Eclipse wizard), but "the bosses" want to drop axis and use jbossws. :( Thanks anyway!
Pablo
A: 

Apache CXF is the easiest way to get webservices running. Specifically look at the Simple Frontend. The simple front end uses reflection to convert the method/data types to a webservice. It doesn't get much easier than that.

CXF is pretty stable, but does not include all the WS specifications (WS-Eventing for example).

Joshua
A: 

You can also consume web services with Spring WS.

tunaranch
+1  A: 

How about the JBossWS website? The details on the client side wsconsume tool are probally what you will look at first.

emeraldjava