JAX-WS: Hello World!!

Today we are going to see ho to create a WS which says Hello over Weblogic, with its IDE Eclipse OEPE.
We will create a New project > Web Service Project:

Create project

We created teh following class:

package services;import javax.jws.*;
@WebService
public class Hello {
@WebMethod
    public String sayHello(String name) {
        return "Hello, "+name+".";
    }
}

With these annotations we can serve the WS, and with right button on the classes and Run as > Run on Server. It launches the test WS application in the navigator:

WS Test

To access to WSDL: http://localhost:7001/wsc/HelloService?WSDL
To test every WSDL published: http://localhost:7001/wls_utc/begin.do

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.