0

私は、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;

以下は、私のWebサービスのコードフラグメントを示しています

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);
4

1 に答える 1

1

このエラーは、新しいメソッドにアクセスできないことを明確に示しています。新しいメソッドで wsdl が更新されているかどうかを確認してください。

于 2013-06-10T15:05:39.657 に答える