From the course: Java EE 8: Web Services

Unlock the full course today

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

Java SOAP client

Java SOAP client - Java EE Tutorial

From the course: Java EE 8: Web Services

Start my 1-month free trial

Java SOAP client

- [Instructor] Now that wsimport has generated all these files for us, we just need to use this to call the SOAP Web Service. I've gone ahead and created this java class, and added a main method for us to execute the code. In this main method, I'll now use the generated source files to call the SOAP Web Service. We have the following files, I'm going to use MySOAPEndpointService, which is a serviceClient, get a new MySOAPEndpointService, let's have that imported. Following that, I also know that a MySOAPEndpoint class has been generated, so that's the port, which is going to be the serviceClient, and, on the serviceClient, I'm going to call the getMySOAPEndpointPort. Don't worry about what all this means for now, just follow along. Going to just change that to the appropriate package, let's put that in an import, and I want that to be MySOAPEndpoint, that's exactly right, save that, and now, we're going to build the…

Contents