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. About iPhone OS and SDK

Hi everyone,
Can anybody let me know what is development language used by Apple  for 
developing there applications?


Pramod K.Shinde

Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

2. About memory leak / GC

Hi, Anyone encounter such problem? Use eclipse to profile your
application, and monitor your memory heap size usage.

Your application works like this, Activity A start subactivity B, B
call setResult(), finish() and return to A, then do previous action
again and again.

I call System.gc() just before B call fnish(), the eclipse heap
monitor will refresh its value.

The result is, even the subactivity B was killed totally (from logcat
log), the memory usage always keep increasing. GC seems not work.

Okay... I suppose it will not do real gc before the memory usage
haven't reach a certain value, but the final result of this kind of
actions (close and start subactivity) is the memory leak.


3. About Media file

4. Smack

5. Moving files from one machine to another and getting eclipse to read it

6. android LBS emulation

7. Any answers for this...