php 调用php webservice
生活随笔
收集整理的這篇文章主要介紹了
php 调用php webservice
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
[代碼] [Java]代碼 RPCServiceClient serviceClient = new RPCServiceClient();Options options = serviceClient.getOptions();EndpointReference targetEPR = new EndpointReference(http://www.haokk111.info "http://172.16.11.89/justvshopping/api/erp/soap_server.php");// 將option綁定到該效力地址 options.setTo(targetEPR);// 添加具體要調(diào)用的方法,這個可以從該效力的wsdl文件中得知// 第一個參數(shù)是該效力的targetNamespace,第二個為你所要調(diào)用// 的operation稱謂QName opAdd =new QName("urn", "chanage_order_state");//設(shè)置返回值類型Class[] returnTypes = new Class[] {String.class};//設(shè)置調(diào)用的參數(shù)Object[] opAddArgs = new Object[] {"localhost","root"};//調(diào)用效力,獲得返回值Object[] response = serviceClient.invokeBlocking(opAdd, opAddArgs, returnTypes);String res = (String)response[0];if (res == null) {System.out.println("wrong");return;}System.out.println(res); http://www.star1234.info
轉(zhuǎn)載于:https://www.cnblogs.com/fpqqchao/archive/2013/04/15/3021384.html
總結(jié)
以上是生活随笔為你收集整理的php 调用php webservice的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 最大字段和各种不同算法实现(参考编程珠玑
- 下一篇: Android中使用DOM解析xml时出