salesforce - pass list<string> as parameter to webservice -
please help!!
what correct way send list of string parameter webservice ?
list < sobject > objectcontents; // {get; set;} contains records of selected object list str3 = new list (); string formattedvalue;
(sobject : (sobject : objectcontents)) // (sobject : objectcontents) { for(string field:fieldapis){ // fieldapis contains list of fieldnames formattedvalue = '\'' + a.get(field) + '\'' ; //fetches value of each field } str3.add(formattedvalue ); } //sending data webservice sqlarray19.arrayofstring a= new sqlarray19.arrayofstring(); sqlserverconnector9.basichttpbinding_iservice1 stub = new sqlserverconnector9.basichttpbinding_iservice1();
//sqlarray19 , sqlserverconnector9 classes formed while importing wsdl salesforce
list<string> insertmsg = stub.insertquery(str3); // getting error in line "compile error: method not exist or incorrect signature: [sqlserverconnector9.basichttpbinding_iservice1].insertquery(list<string>)"
.net webservice fetch values salesforce , return values
public list<string> insertquery(list<string> values) { return values ; }
collections can troublesome data types when working across platforms web services. try converting list string[] (and changing method, of course).
Comments
Post a Comment