AxisFault:给定的SOAPAction urn:anonOutInOp与操作不匹配

时间:2016-04-27 05:52:36

标签: web-services soap wsdl cxf axis2

我做了很多关于我的问题的搜索,例如Axis2 WebService Client: The given SOAPAction does not match an operationApache CXF - The given SOAPAction does not match an operation

我对网络服务技术很陌生,好吧,这是datail:Launch Webservice Interface with CXF Framework, And We wrote client code with Axis2 Framework,如下所示:

try {
       RPCServiceClient client = new RPCServiceClient();
       Options options = client.getOptions();   
       String address = "http://ip:port/yaoxie/service/orderInfoBean?wsdl"; 
       EndpointReference epf = new EndpointReference(address);  
       options.setTo(epf); 
       QName qname = new QName("http://spring.orderInfo/", "debitOrder");
       String par = "<orgs>test</orgs>";
       System.out.println("start to call");
       Object[] result = client.invokeBlocking(qname, new Object[] { par }, new Class[] { String.class });
       System.out.println("finished");
       System.out.println(result[0]);
    } catch (AxisFault e) {
       e.printStackTrace();
    }

这是WSDL描述信息:WSDL info

然后我收到了这个错误:

org.apache.axis2.AxisFault: The given SOAPAction urn:anonOutInOp does not match an operation.
at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:435)
at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:371)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:417)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
at com.triffic.Axis2Demo.Axis2DemoTest.testClient(Axis2DemoTest.java:49)
at com.triffic.Axis2Demo.Axis2DemoTest.main(Axis2DemoTest.java:82)

我该怎么办,我们将不胜感激。

1 个答案:

答案 0 :(得分:0)

尝试

    options.setAction("OperationName")

您应该可以通过查看wsdl文件获取operationName