JSoap
JSoap copied to clipboard
Never onSuccess, never onError
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...
I have the same issue
Same problem here
Same issue.