Organizational Research By

Surprising Reserch Topic

Experts Most Trusted Topic


soap ui auth implementation in android project using -'java,android,web-services,authentication,soap'


soap ui auth implementation in android project  using -'java,android,web-services,authentication,soap'

I have been seaching for a two week, but i could not find any appropriate solution
to my problem.

I am trying to access HP Service Manager web service in my Android project. The webservice requires authentication. I am able to access this webservice by using SOAP UI.
File-> New Soap project and then, at the bottom there is Auth and Security Related Settings. i wrote username and password in order to access web service.
Sor far, everything is okey.

But in Eclipse, i am confused. My problem is that  I want to access the web service with a android device.I don't know how to authenticate to the webservice?

I checked a lot of web pages but still it is not clear. In some questions,
people used these methods:

Basic HTTP authentication using KSOAP for android

But in some questions, people used this (Bindind Provider)
http://www.mkyong.com/webservices/jax-ws/application-authentication-with-jax-ws/

Which one can be used? What are actually they? What is the difference?
This code above does not work because service says NO AUTH. This is normal. How
can I access?

    SoapObject request = new SoapObject(NAMESPACE2, METHOD_NAME2);

    PropertyInfo QueryProp = new PropertyInfo();


    QueryProp.setName("Query");
    QueryProp.setValue(query);
    QueryProp.setType(double.class);
    request.addProperty(QueryProp);

    SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
    //envelope.dotNet = true;
    envelope.setOutputSoapObject(request);
    HttpTransportSE androidHttpTransport = new HttpTransportSE(URL2);


    try {
        androidHttpTransport.call(SOAP_ACTION2, envelope);
        SoapPrimitive response = (SoapPrimitive) envelope.getResponse();
        Log.i("myApp", response.toString());
        kayit = response.toString();

    } catch (Exception e) {
        e.printStackTrace();
    }

    

asked Sep 7, 2015 by rajesh
0 votes
27 views



Related Hot Questions



Walkin Jobs Opening



Government Jobs Opening


...