package com.test.webservice.client;
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 TestClent {
public static void main(String[] args) {
try {
String endpoint = "https://www.cmsz.com:7088/getdbpwd/getdbpwdservice";
Service service = new Service();
Call call = (Call)service.createCall();
call.setTargetEndpointAddress(endpoint);
call.setOperationName(new QName(
"urn:getdbpwd", "getdbpwd"));
call.addParameter( "pmsDBUser",null,javax.xml.rpc.ParameterMode.IN);
call.setReturnClass(String.class);
String temp = (String)call.invoke(new Object[]{"pubdba"});
System.out.println("result: " + temp);
} catch (ServiceException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (RemoteException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}package com.test.webservice.client;
import jav