1. Are you ready for the Galaxy S20? Here is everything we know so far!

getting parameter value in webservices method in android

Discussion in 'Android Development' started by sudhakarvel, Oct 29, 2010.

  1. sudhakarvel

    sudhakarvel Lurker
    Thread Starter

    can you anyone help me

    Here my code

    private static final String METHOD_NAME = "getCityList";
    private static final String SOAP_ACTION = "http://service.com/" + METHOD_NAME;
    private static final String NAMESPACE = "http://service.com";
    private static final String URL = "http://192.168.1.11:8080/Services/ws/country";


    /** Called when the activity is first created. */

    @Override
    public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);


    try{
    SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);

    request.addProperty("countryId",5);
    //request.setProperty(8,4);




    SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);

    envelope.setOutputSoapObject(request);

    AndroidHttpTransport androidHttpTransport = new AndroidHttpTransport(URL);
    androidHttpTransport.call(SOAP_ACTION,envelope);

    Object result = envelope.getResponse();
    SoapObject so = (SoapObject)envelope.getResponse();


    when i trying to pass countryId to webservices via android it will return the null parameter value with in webservice method

    my soap xml below

    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <SOAP-ENV:Body>
    <m:getCityList xmlns:m="http://service.com/">
    <arg0>
    <code>String</code>
    <msg>String</msg>
    </arg0>
    <arg1>
    <countryId>0</countryId>
    </arg1>
    </m:getCityList>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
     



    1. Download the Forums for Android™ app!


      Download

       
Loading...
Similar Threads - getting parameter value
  1. Redheadattack
    Replies:
    4
    Views:
    316
  2. Cataster
    Replies:
    0
    Views:
    360
  3. lynxstch
    Replies:
    2
    Views:
    910
  4. thunderlumber
    Replies:
    10
    Views:
    599
  5. danielsamson
    Replies:
    2
    Views:
    863
  6. LP93
    Replies:
    4
    Views:
    3,152
  7. mmoser
    Replies:
    0
    Views:
    653
  8. Dougb256
    Replies:
    17
    Views:
    4,393
  9. ezio aulditore
    Replies:
    3
    Views:
    510
  10. Jerome Jordan
    Replies:
    2
    Views:
    537

Share This Page

Loading...