2008년 3월 5일 수요일

Project Sample..(Client)

import java.net.MalformedURLException;
import java.net.URL;
import java.rmi.RemoteException;
import javax.xml.namespace.QName;
import javax.xml.rpc.ServiceException;
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;

public class HelloWorldClient
{
public static void main(String[] args) throws ServiceException, MalformedURLException, RemoteException
{
Service service = new Service();
Call call = (Call)service.createCall();
call.setTargetEndpointAddress(new URL("http://debianbox:8080/axis/HelloWorldService.jws"));
call.setOperationName(new QName("http://soapinterop.org/", "HelloWorld"));
String returnValue = (String)call.invoke(new Object[]{"My name is okjsp."});
System.out.println(returnValue);
}
}

댓글 없음:

댓글 쓰기