问题
Exception in thread "main" org.apache.axis2.AxisFault: The endpoint reference (EPR) for the Operation not found is /services/MyTest?wsdl and the WSA Action = . If this EPR was previously reachable, please contact the server administrator. 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.saien.pojo.RPCClient.main(RPCClient.java:68)
回答1:
It happens because the source WSDL in each operation has not defined the SOAPAction value.
e.g.
<soap12:operation soapAction="" style="document"/>
His is important for the WSO2 server.
If you have created the service on netbeans or another, don't forget to set the value action on the tag @WebMethod
Example:
@WebMethod(action = "hello", operationName = "hello")
This will create the SOAPAction value by itself.
回答2:
Did you publish the WSDL of the proxy service? If not, go to "Design View" of the proxy, under "Basic Settings" you can find "Publishing WSDL" dropdown. Select "Specify Source URL" from the dropdown, for WSDL URI, enter the wsdl of the Axis2 service for the moment. Save the settings and try accessing the proxy.
Check if this fixes the issue.
来源:https://stackoverflow.com/questions/18049942/the-endpoint-reference-epr-for-the-operation-not-found