hi,

i try to establish a connection to a SOAP-Service. Therefore i use
ksoap2. I need Authentification so i tryed the class
HttpTransportBasicAuth. The Problem is, that i do not know how i
should use this class the make a call. The class
HttpTransportBasicAuth do not know the function call.

here are some examplecode:

        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 androidHttpTransport = new
HttpTransportBasicAuth(URL,"xxx","xxx");

                androidHttpTransport.debug = true;

                SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
                request.addProperty("query", "aida");

                SoapSerializationEnvelope envelope = new
SoapSerializationEnvelope(SoapEnvelope.VER11);
                envelope.setOutputSoapObject(request);

                HttpTransportBasicAuth.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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to