java调用PHP webservice问题

亵渎 发布于 2014/05/20 20:42
阅读 2K+
收藏 0

使用java调用PHP提供的webservice,函数有四个参数,功能主要是我输入一个邮箱地址,然后需要返回一个字符串,我的代码如下:

public String getKey(){
String url="http://ip/webservice/worg.php";
String result=null;
try {
RPCServiceClient serviceClient = new RPCServiceClient();
Options options=serviceClient.getOptions();
EndpointReference targetEPR = new EndpointReference(url);
options.setAction("http://ip/webservice/worg.php/get_ext_authkey");
options.setTo(targetEPR);
options.setProperty(HTTPConstants.CHUNKED, false);
QName qname=new QName("","get_ext_authkey");
Object[] param=new Object[]{"邮箱地址","","1",""};
Class[] classes = new Class[] { String.class };  
result=(String) serviceClient.invokeBlocking(qname, param,classes)[0];
System.out.println(result);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return result;
}
输出信息:
2014-5-20 14:02:46 org.apache.axiom.util.stax.dialect.StAXDialectDetector detectDialect
警告: Unable to determine dialect of the StAX implementation at jar:file:/D:/myeclips/plugins/com.genuitec.eclipse.ws.xfire_8.5.0.me201003052220/lib/webservices-rt.jar!/
org.apache.axis2.AxisFault: 100003
at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:531)
at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:375)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:421)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:555)
at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:531)
at org.apache.axis2.rpc.client.RPCServiceClient.invokeBlocking(RPCServiceClient.java:102)
at com.ToMail.getT(ToMail.java:83)
at com.ToMail.main(ToMail.java:93)
null

特别是这句错误org.apache.axis2.AxisFault: 100003是什么意思啊,在网上都找不到,各位大侠帮看看呀?谢谢

加载中
0
南湖船老大
南湖船老大
你可以先用 soapUI来确定,是web service那里的问题,还是你自己的问题
返回顶部
顶部