标签:
xfire客户端调用写法:
Client client = new Client(new URL("http://192.168.0.x:xxxx/cemabenteng/Services/ProBaseDataTransmit?wsdl"));
Object[] results = client.invoke("dataTransmit", new Object[]{ "123" });
cxf客户端调用写法:
JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory.newInstance();
Client client = dcf.createClient("http://192.168.0.x:xxxx/cemabenteng/Services/ProBaseDataTransmit?wsdl");
Object[] res = client.invoke("dataTransmit", "0");
xfire客户端调用cxf服务端时如果遇到无法传递参数时,需在cxf端得接口加上注解:
void dataTransmit(@WebParam(name="sbdProData",targetNamespace="http://www.cemabenteng.webapp.webservice/" ) String sbdProData);
后续再补充。
标签:
原文地址:http://www.cnblogs.com/uip001/p/5832518.html