Generate webservice client using eclipse

Use eclipse to generate the client process of webservice see the document in the attachment

 

Calling code after production code:

 

 

public class Main {

 

public static void main(String[] args) {

 

 

try {

 

String url ="http://localhost:8080/goods-background/services/org.goods.api.face.BaseService?wsdl";

BaseServiceStub stub = new BaseServiceStub(url);

 

GetInfoE getInfo2 = new GetInfoE();

GetInfo param = new GetInfo();

PackBody packBody = new PackBody ();

packBody.setBCode("1234");

packBody.setBType("111");

 

ReqModermBody reqModermBody = new ReqModermBody();

reqModermBody.setCode("99");

reqModermBody.setName("boce");

packBody.setReqModermBody (reqModermBody);

param.setArg0 (packBody);

 

getInfo2.setGetInfo(param);

GetInfoResponseE resonse = stub.getInfo(getInfo2);

PackBody res = resonse.getGetInfoResponse().get_return();

 

System.out.println("bCode="+res.getBCode()

+";btype="+res.getBType()+";code="+res.getReqModermBody().getName());

 

} catch (Exception e) {

// TODO Auto-generated catch block

e.printStackTrace ();

}

 

 

 

 

}

 

}

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326638604&siteId=291194637