Next, we shall create a
web service client class, which is just a Java class. The web service client may be used to invoke the web service. In contrast to the WebLogic test client generated automatically in an earlier section, the web service invocation in the client class that we shall generate in this section is specified as required. Select the project folder and select File | New | Other. In the New wizard select Java | Class. In the New Java Class wizard specify a package name (hellowebserviceclient
) in the Package field, specify a class name (HelloWSClient
) in the Name field, and click on Finish, as shown in the following screenshot:
A web service
client class hellowebserviceclient.HelloWSClient
gets generated, as follows:
In the Java client application create an instance of the HelloWSService
service:
HelloWSService service=new HelloWSService();
Obtain a proxy to the service from the service using the getHelloWSPort()
method:
hellowebserviceclient.HelloWS port...