开发者

Triggering SOAP requests in a Maven Mojo

I have a WSDL 开发者_如何学Gowhich 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?


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:

  • Introducing JAX-WS 2.0 With the Java SE 6 Platform, Part 1
  • Creating a Simple Web Service and Client with JAX-WS
  • Getting Started with JAX-WS Web Services
  • Developing JAX-WS Web Service Clients

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜