From the course: Java EE 8: Web Services

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Consume SOAP services with Java clients

Consume SOAP services with Java clients - Java EE Tutorial

From the course: Java EE 8: Web Services

Start my 1-month free trial

Consume SOAP services with Java clients

- [Instructor] Having seen how to test a web service with SoapUI, you're now asking, how exactly does this help me use SOAP in my code, man? Well, let's see how to consume your SOAP service with a JAX-WS client. The WSDL, as you can see here, is the one true source of information regarding your web service, and that's all you need to get going along. The WS hyphen import tool will use this WSDL to generate all the code stubs that you need to consume the service. These stubs are actual Java classes and interfaces that will generate the X amount request and response payloads that you need for your SOAP messaging. I'll start with configuring WS import in the pom.xml file. Here we have it. The WS import tool is supplied by the JAX-WS-maven plugin. It's a plugin so it goes into the plugin section of the pom.xml file. Here we have the group ID is org.jdnet.jax-ws-commons. The artifact ID is jaxws-maven-plugin and the version number…

Contents