I'm trying to access a soap webservice from a jsp page. I need something simple and lightweight as this is a mockup.

Thanks in advance.

+1  A: 

u can use spring's functionality. look at the section "17.5.2. Accessing web services using JAX-RPC" @ http://static.springsource.org/spring/docs/2.5.6/reference/remoting.html.

Or if you are not using spring, then generate stubs using the tooling provided by ur J2ee/JEE SDK to invoke the service

JAXRPC != SOAP though
+1  A: 

While Java6 has a built-in webservice implementation, it is, in my opinion, overly complex and hard to use. My preference would be for Spring-WS, which is leightweight and easier to use.


I would use JAX-WS.

Pablo Santa Cruz
+2  A: 

I think Apache CXF and its ability to code generation could be the easier way in Java. Were you to use Groovy and GSP, you could use GroovyWS, which relies upon CXF under the hood, and allows litteraly no-brainer call to web-services (which is by the way possible in most of the cases thanks to support for scripting languages of JVM).

+3  A: 

If you have Java 6 or newer, you could use the built-in JAX-WS implementation. Sun has a guide on how to use it to build services. It appears that the client implementation is in Part 2.

Although they show how to generate the webservices client using the NetBeans IDE, you can also use the wsimport command-line client to do it, which is in the Java bin folder.

I believe the Eclipse SoapUI plugin can also generate JAX-WS web service artifacts.

R. Bemrose

Thanks guys, very informative, quick responses.


For web-service, I suggest Apache's Axis2 Engine. It's opnesource, you've the source so that you can learn more....

Axis2 is an absolute monster
@skaffman: +1 though it is perhaps not quite as bad as Axis1. Axis1 still scares me with just how awful it was.
Donal Fellows