Note that there are some explanatory texts on larger screens.

plurals
  1. POPass complex parameter from ksoap Android to WCF Web-Service
    primarykey
    data
    text
    <p>I'm calling .NET WCF Web Service from ksoap my WebMethod take one complex parameter UpdatableCustomerInfo</p> <pre><code>public class UpdatableCustomerInfo implements KvmSerializable { public String CustomerId; public String Facebook; @Override public Object getProperty(int arg0) { String retVal = ""; switch(arg0) { case 0: retVal = CustomerId; break; case 1: retVal = Facebook; break; } return retVal; } @Override public int getPropertyCount() { return 2; } @Override public void getPropertyInfo(int arg0, Hashtable arg1, PropertyInfo arg2) { switch(arg0) { case 0: arg2.type = PropertyInfo.STRING_CLASS; arg2.name = "CustomerId"; break; case 1: arg2.type = PropertyInfo.STRING_CLASS; arg2.name = "Facebook"; break; default:break; } } @Override public void setProperty(int arg0, Object arg1) { switch(arg0) { case 0: CustomerId = arg1.toString(); break; case 1: Facebook = arg1.toString(); break; default: break; } } </code></pre> <p>}</p> <p>and this is my Web Service calling to the WebService</p> <pre><code> UpdatableCustomerInfo ucInfo = new UpdatableCustomerInfo(); ucInfo.CustomerId = "1f089071-c126-e211-9b2e-dca971c098f5"; ucInfo.Facebook = "asdfqwer1234"; PropertyInfo pInfo = new PropertyInfo(); pInfo.setName("updatableInfo"); pInfo.setValue(ucInfo); pInfo.setType(UpdatableCustomerInfo.class); SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME); request.addProperty(pInfo); SoapSerializationEnvelope envelop = new SoapSerializationEnvelope(SoapEnvelope.VER11); envelop.setOutputSoapObject(request); envelop.dotNet = true; HttpTransportSE hts = new HttpTransportSE(URL); hts.debug = true; try { hts.call(SOAP_ACTION, envelop); } catch (Exception ex) { ex.printStackTrace(); } </code></pre> <p>but In fact I logged the web service method and the log tell me that the method is called but the parameter is came null.</p> <p>I tried to change SoapEnvelope version to SoapEnvelope.VER10 but that make the parameter on the method of web service came as not null but have no value of what i specified in the ucInfo</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload