views:

17

answers:

1

I have a WSDL which I need to trigger some commands from. I need to do this as part of a Maven Plugin (Mojo)

I'm a relative newbie to SOAP so what I want to know is this:

1) Is this possible? Can the SOAP calls be run from a Maven Plugin or does it require a container or something else?

2) If so, what tools should I use to do this? I've read about Apache Axis and have seen that it's capable of building a lot of things from the WSDL itself. Is this the sort of tool I should use? Do Mojos have a built in SOAP executor?

3) If not, what are my alternatives?

A: 

Is this possible? Can the SOAP calls be run from a Maven Plugin or does it require a container or something else?

Yes, that's possible, you do not require any kind of container to run a SOAP client.

If so, what tools should I use to do this? I've read about Apache Axis and have seen that it's capable of building a lot of things from the WSDL itself. Is this the sort of tool I should use? Do Mojos have a built in SOAP executor?

I would consider using a JAX-WS stack like JAX-WS RI which is included in Java 6. Much easier and much more elegant. Here are some tutorials to get started:

In short, use wsimport to generate and compile the web service artifacts needed to connect to the service and use them from the Mojo.

Pascal Thivent
Hmmm... I can't always assume I'll be running on Java 6. Some projects that this Maven piece will be running through will be running on Java 5. Is that going to be a huge problem for JAX-WS?
Drew
@Drew You can provide the JAX-WS implementation (either JAX-WS RI or Apache CXF).
Pascal Thivent