JAVA 调用Axis2 code generator 生成的webservice
以下代码为调用 JAVA 调用Axis2 code generator 生成的webservice的代码。
package test; import java.rmi.RemoteException; import org.apache.axis2.AxisFault; import soap.*; import type.*; public class soap { public static void main(String[] args) throws RemoteException { ScfMobileSoapStub stu = new ScfMobileSoapStub(null, "http://192.168.10.26:8081/upccService/ScfPccSoapServiceEndpointPort"); GetSubscriber inParam = new GetSubscriber(); SInSubscriberParaVO parm = new SInSubscriberParaVO(); SPccSubscriber par = new SPccSubscriber(); SAVP savap[] = new SAVP[1]; savap[0] = new SAVP(); savap[0].setKey("111111111211"); savap[0].setValue("111111111111"); par.setAttribute(savap); parm.setSubscriber(par); inParam.setInPara(parm); GetSubscriberResponse resp = stu.getSubscriber(inParam); System.out.println(resp.getResult().getResultCode()); System.out.println(resp.getResult().getSubscriber()[0].getAttribute()[0].getKey()); System.out.println(resp.getResult().getSubscriber()[0].getAttribute()[0].getValue()); } }
补充:软件开发 , Java ,