【问题标题】:axis+android error : org.apache.axis2.engine.DispatchPhase.checkPostConditions轴+机器人错误:org.apache.axis2.engine.DispatchPhase.checkPostConditions
【发布时间】:2013-06-06 00:27:49
【问题描述】:

我开发了通过 apache axis 2 web 服务与 DB 通信的 Android 应用程序。 我的其他方法运行正确。但我的新方法 MySalesAll 未调用并给出错误。 请帮我解决这个问题。谢谢

[ERROR] The endpoint reference (EPR) for the Operation not found is http://172.16.20.240:8080/axis2/services/TSR_WEB_SERVICE and the WSA Action = http://mainSer
vice/MySalesAll. If this EPR was previously reachable, please contact the server administrator.
org.apache.axis2.AxisFault: The endpoint reference (EPR) for the Operation not found is http://172.16.20.240:8080/axis2/services/TSR_WEB_SERVICE and the WSA Act
ion = http://mainService/MySalesAll. If this EPR was previously reachable, please contact the server administrator.
        at org.apache.axis2.engine.DispatchPhase.checkPostConditions(DispatchPhase.java:102)
        at org.apache.axis2.engine.Phase.invoke(Phase.java:329)
        at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:262)
        at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:168)
        at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172)
        at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:146)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
        at java.lang.Thread.run(Thread.java:619)
[WARN] Deprecated usage of OMElement#declareNamespace(String,String) with empty prefix

上面显示了我的错误 下面是我在 android 应用程序中的代码。我使用 ksoap 完成该任务

private static String SOAP_ACTION = "http://mainService/MySalesAll";
private static String NAMESPACE = "http://mainService";
private static String METHOD_NAME = "MySalesAll";
private static String URL = "http://172.xx.xx.xxx:8080/axis2/services/LKB_WEB_SERVICE?wsdl";

....

SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(
        SoapEnvelope.VER11);
envelope.setOutputSoapObject(request);
envelope.dotNet = true;
try {
    HttpTransportSE androidHttpTransport = new HttpTransportSE(
            URL);
    androidHttpTransport.call(
            SOAP_ACTION, envelope);//ERROR comes in this line when debug
    SoapObject result = (SoapObject) envelope.bodyIn;

下面显示了我的网络服务中的代码片段

public String MySalesAllDetails(String strInputUserMobile,
        String strInputUserName, String strInputUserPassword,
        String strFromDate, String strToDate, String city) {

    String stringResult = new Sales().getMySalesAll(strInputUserMobile,
            strInputUserName, strInputUserPassword, strFromDate, strToDate,
            city).toString();
    System.out.println("HERE IS THE RESULT" + stringResult);

【问题讨论】:

  • 我忘记更新我工作的 tomcat web 应用程序文件夹中的 aar 文件。这就是问题 :-) 我只是在我自己的 localhost 中运行它。现在它已排序谢谢大家

标签: android apache axis2 wso2


【解决方案1】:

错误清楚地表明您的新方法不可访问,请检查您的 wsdl 是否使用您的新方法更新。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-01-14
    • 2019-01-12
    • 2021-06-02
    • 2021-12-14
    • 2015-12-12
    • 2021-08-14
    • 2018-11-11
    • 2023-03-17
    相关资源
    最近更新 更多