hi,
at the moment i have the following problem. I try to establish a
connect to a SOAP-service. Therefore i need basicauth via http. I use
ksoap2 and HttpTransportBasicAuth.
The problem is, I do not know how i can start a call when i use
HttpTransportBasicAuth becouse the function "call" is not available.
private static final String SOAP_ACTION = "getVessels";
private static final String METHOD_NAME = "getVessels";
private static final String NAMESPACE = "http://xxx.com/";
private static final String URL = "http://xxx.com/soap/
android.wsdl";
void test() {
try {
HttpTransportBasicAuth(URL,"foo","bar");
HttpTransportSE androidHttpTransport = new HttpTransportSE
(URL);
androidHttpTransport.debug = true;
SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
request.addProperty("query", "aida");
SoapSerializationEnvelope envelope = new
SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.setOutputSoapObject(request);
androidHttpTransport.call(SOAP_ACTION, envelope);
Object result = envelope.getResponse();
//handle result here
//myExampleHandler.getResults();
} catch (Exception e) {
e.printStackTrace();
}
}
i hope someone can help me.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---