1. Download our Official Android App: Forums for Android!

android call return null value inside the webservice method

Discussion in 'Introductions' started by sudhakarvel, Oct 28, 2010.

  1. sudhakarvel

    sudhakarvel Lurker
    Thread Starter
    Rank:
    None
    Points:
    25
    Posts:
    2
    Joined:
    Oct 28, 2010

    Oct 28, 2010
    2
    0
    25
    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>
     

    Advertisement

  2. Martimus

    Martimus One bite at a time...
    Rank:
    None
    Points:
    843
    Posts:
    19,535
    Joined:
    Jul 9, 2010

    Jul 9, 2010
    19,535
    4,045
    843
    Male
    Engineer
    'neath a cactus
  3. TheCompBoy

    TheCompBoy Android Enthusiast
    Rank:
    None
    Points:
    98
    Posts:
    589
    Joined:
    Oct 18, 2010

    Oct 18, 2010
    589
    53
    98
    Programmer
    Sweden
  4. Steven58

    Steven58 Reformed PH
    Rank:
     #4
    Points:
    3,933
    Posts:
    32,959
    Joined:
    Feb 19, 2010

    Feb 19, 2010
    32,959
    25,351
    3,933
    Male
    Welcome to the Android Forums community! Glad you signed up! Feel free to browse or shmooze in the conversations! We welcome that! If you need help getting around, PM me, I'm told that I can be moderately helpful! :D
     

Share This Page

Loading...