How to create a Web Service for this client?
Hello!I'm trying to learn how to write Web Services.
I need to create a Web Service built on Axis from Apache that respond to my client below on.
I have the following problems:
1) I do not manage to config my Orion server for Axis. I think I need to put it in a web server.
2) I have not found any nice example for a Web Service that would respond to something that look like my client.
So if you could help me with this it would be great!
I have created the Client like:
import java.net.*;
import org.apache.axis.client.*;
import javax.xml.namespace.*;
public class SoapWsdlClient
{
public SoapWsdlClient()
{
try
{
Service service = new Service();
Call call = (Call)service.createCall();
call.setTargetEndpointAddress(new URL("http://localhost/axis/services/TimeService"));
call.setOperationName(new QName("http://localhost/axis/services/TimeService", "getTime"));
String time = (String) call.invoke( new Object[] { "getTime" } );
System.out.println("Time from server:" + time);
}
catch (Exception e)
{
e.printStackTrace();
}
}
public static void main(String[] args)
{
SoapWsdlClient SoapWsdlClient = new SoapWsdlClient();
}
}