Problem passing parameters with KSOAP2 at a PHP webservice

by Octavian Pascu » Thu, 12 May 2011 09:00:09 GMT

Sponsored Links
 Hi everyone,

I have the following code which calls a PHP webservice. The code
connects to the service, but the paramters are not passed well.
Because I've noticed that I have problems passing the parameters, I
had modified the method to return the parameters, and for the next
code it returnes "m m"(basicly it returns the first letter of the
first parameter twice).

    String SOAP_ACTION = "urn:server#userAuth";
    String METHOD_NAME = "userAuth";

    SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);

//        I've tried this too but with no results
//        request .addProperty("usr",  "");
//        request .addProperty("pass", "xxxxxxxxxxxxxxxxxxxxxx");

    PropertyInfo p1 = new PropertyInfo();
    p1.type = PropertyInfo.STRING_CLASS;

    PropertyInfo p2 = new PropertyInfo();
    p2.type = PropertyInfo.STRING_CLASS;

    SoapSerializationEnvelope envelope = new

    HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);, envelope);

    Object result = (Object)envelope.getResponse();
    return result.toString();

To make an ideea, here is the php code...

$server = new nusoap_server;
$server->configureWSDL('server', 'urn:server');
$server->wsdl->schemaTargetNamespace = 'urn:server';
            array('usr' => 'xsd:string', 'pass' => 'xsd:string'),
            array('return' => 'xsd:string'),

function userAuth($value){


        return $a;




Other Threads

1. install application from sdcard, how?!

so, now, i have my apk i copied from my desktop sitting on the sdcard.
i just cannot find a way to install it on the g1. i am sure there
going to be plenty customers asking this question.
the problem is, i don't know the answer for them. for me, i can use
adb, or simply load it on my server and download it from the server
using g1 brower.
but, it is not simple for a customer.
can anybody show me how to do it?!!!!



2. chmod unexpected permission error when logged into an actual device

You can't do this on a device. On devices root is disabled.

Android Team @ Google


3. Viewing Market Comments

4. Suggestion

5. Broken link to Tutorial on

6. Need help debugging Light Racer

7. How to add button to MediaController?