| jds@home.com 2005-03-30, 7:09 pm |
| Running thru webservices toolkit for Easerver 4.2, Winxp servpac 2
Greets all:
I am trying to write a webservice using JAX-RPC. Since I discovered you
can use the Webservices Toolkit I was hoping to make it work together.
I know theres a webservice tool but im not sure what to do with it, and
were to put the webservice beans, and how to deploy them. Should i use
WST from easerver? or should i use JWSDP from sun? Can some one give me
a step by step of what to do? I wrote the server side part.
Heres the bean, the IF and the service.
public class ActiveShip
{
String uic;
String name;
public ActiveShip()
{
}
public static void main(String[] args)
{
}
public String getName()
{
return name;
}
public String getUic()
{
return uic;
}
public void setName(String string)
{
name = string;
}
public void setUic(String string)
{
uic = string;
}
}
package com.icthree.ws;
import java.rmi.RemoteException;
public class ActiveShipService implements ActiveShipServiceIF
{
public ActiveShip[] getActiveShip(String
uic) throws
RemoteException
{
ActiveShip[] shiparray = new ActiveShip[3];
if (uic. compareToIgnoreCase(
"xxx") != 0)
throw new RemoteException("invalid uic");
if (uic == null)
throw new RemoteException("no uic provided");
ActiveShip a = new ActiveShip();
ActiveShip b = new ActiveShip();
ActiveShip c = new ActiveShip();
a.setName("uss enterprise");
b.setName("tanker hasbeen");
c.setName("Pvt Polops");
a.setUic("uicaa");
b.setUic("uicbb");
c.setUic("uicccc");
shiparray[0] = a;
shiparray[1] = b;
shiparray[2] = c;
return shiparray;
}
public static void main(String[] args)
{
}
}
package com.icthree.ws;
import java.rmi.Remote;
import java.rmi.RemoteException;
public interface ActiveShipServiceIF extends Remote
{
public ActiveShip[] getActiveShip(String
uic) throws
RemoteException;
}
|