JSoap icon indicating copy to clipboard operation
JSoap copied to clipboard

Never onSuccess, never onError

Open misskbar opened this issue 9 years ago • 3 comments

Hi, I`ve been trying to connect to this ws but I don't know what I'm doing wrong...

The call never gets into onSuccess, never gets into onError but I can see the full response onDebugMessage....

public static void getCelsius(String fahrenheit) { String url="http://www.w3schools.com/webservices/tempconvert.asmx"; String namespace="http://www.w3schools.com/webservices/"; String method = "FahrenheitToCelsius"; String soap_action = "http://www.w3schools.com/webservices/FahrenheitToCelsius";

    SOAPManager.get(namespace, url, method, soap_action, new FahrenheitToCelsius("21"),   FahrenheitToCelsiusResponse.class, new JSoapCallback() {
        @Override
        public void onDebugMessage(String title, String message) {
            super.onDebugMessage(title, message);
        }

        @Override
        public void onSuccess(Object result) {
              FahrenheitToCelsiusResponse res = (FahrenheitToCelsiusResponse) result;
              System.out.println("There!" + res);
        }

        @Override
        public void onError(int error) {
           switch (error) {
               case JsoapError.NETWORK_ERROR:
                    Log.v("JSoapExample", "Network error");
                    break;
                case JsoapError.PARSE_ERROR:
                   Log.v("JSoapExample", "Parsing error");
                    break;
                default:
                    Log.v("JSoapExample", "Unknown error" + error);
                  break;
            }
        }
    });
}

This is my respose class

@JSoapClass(namespace = "http://www.w3schools.com/webservices/")

public class FahrenheitToCelsiusResponse extends SOAPDeserializable {

@JSoapResField(name = "FahrenheitToCelsiusResult")
private String celsius;

public String getCelsius() {
    return celsius;
}

public void setCelsius(String celsius) {
    this.celsius = celsius;
}

}

And this is the wsdl

http://www.w3schools.com/webservices/tempconvert.asmx?WSDL

Please help...

misskbar avatar Aug 07 '15 17:08 misskbar

I have the same issue

Netstep avatar Apr 04 '17 18:04 Netstep

Same problem here

ghost avatar Sep 08 '17 16:09 ghost

Same issue.

gaynor avatar Mar 19 '18 14:03 gaynor