Salesforce 通过列表<;字符串>;作为webservice的参数

Salesforce 通过列表<;字符串>;作为webservice的参数,salesforce,apex-code,Salesforce,Apex Code,请帮忙 将字符串列表作为参数发送到webservice的正确方法是什么? 列出对象内容;//{get;set;}包含选定对象的记录 列表str3=新列表(); 字符串格式化值 for (SObject a : for (SObject a : ObjectContents)) // for (SObject a : ObjectContents) { for(String field:fieldApis){ // fieldApis contains list of fieldnam

请帮忙

将字符串列表作为参数发送到webservice的正确方法是什么?

列出对象内容;//{get;set;}包含选定对象的记录 列表str3=新列表(); 字符串格式化值

 for (SObject a :  for (SObject a : ObjectContents)) // for (SObject a : ObjectContents)
 {
 for(String field:fieldApis){  //  fieldApis contains list of fieldnames
            FormattedValue = '\'' + a.get(field) + '\'' ;  //fetches value of each field
  }

  str3.add(FormattedValue );
   }

    //sending data to webservice
sqlArray19.ArrayOfstring a= new sqlArray19.ArrayOfstring();  
SQLServerConnector9.BasicHttpBinding_IService1 stub = new SQLServerConnector9.BasicHttpBinding_IService1();   
//sqlArray19和SQLServerConnector9类是在将wsdl导入Salesforce时形成的

List<String> insertMsg = stub.InsertQuery(str3); // getting error in this line 

"Compile Error: Method does not exist or incorrect signature: [SQLServerConnector9.BasicHttpBinding_IService1].InsertQuery(LIST<String>)"
List insertMsg=stub.InsertQuery(str3);//获取此行中的错误
“编译错误:方法不存在或签名不正确:[SQLServerConnector9.BasicHttpBinding\u IService1]。InsertQuery(列表)”
.net webservice,它将从Salesforce获取值并返回这些值

 public List<String> InsertQuery(List<String> Values)
    {
        return Values ;
    }
公共列表插入查询(列表值)
{
返回值;
}

在使用web服务跨平台工作时,集合可能是麻烦的数据类型。尝试将列表转换为字符串[](当然还要更改方法)

顺便说一句,你可以直接在