Unable to retrive data from any webservice-- using KSoap2
SUBSCRIBE KVM-INTEREST Anonymous <[email protected]>
| Newsgroups | gmane.comp.java.sun.kvm |
|---|---|
| Message-ID | <LISTSERV%[email protected]> |
Hi
I'm trying to use KSoap2 to communicate with the webservices. but every time
getting exception : org.ksoap2.SoapFault
at org.ksoap2.transport.HttpTransport.call(+357)
and enveloper.getResponse() returns
--SoapFault-faultCode,Server.userException,IllegalArgumentException and
ClassCastException
I checked it with network monitor and it the envelope it is sending looks
strange also the response code of the response is 500 -- Internal Server Error.
Following is the code which i'm trying:
public void run(){
try {
SoapObject rpc =
new SoapObject("urn:Convert", "convertLength");
rpc.addProperty("fromUnit", "Meters");
rpc.addProperty("fromValue", "1000");
rpc.addProperty("toUnit", "Kilometers");
SoapSerializationEnvelope envelope =
new SoapSerializationEnvelope(SoapEnvelope.VER10);
envelope.bodyOut = rpc;
HttpTransport ht = new
HttpTransport("http://www.blackberry.com:80/webservices/ConvertAxis/services/Convert");
ht.debug = true;
ht.call("", envelope);
System.out.println(""+envelope.getResponse());
//resultItem.setText("" + envelope.getResult());
}
catch (Exception e) {
e.printStackTrace();
resultItem.setLabel("Error:");
resultItem.setText(e.toString());
}
I have also attached the wsdl file.
I tried searching for it on google , but couldn't find any good tutorials.
Please help!!
===========================================================================
To unsubscribe, send email to [email protected] and include in the body
of the message "signoff KVM-INTEREST". For general help, send email to
[email protected] and include in the body of the message "help".