我在将锯齿状数组发送到 wcf Web 服务时遇到问题。该方法需要一个 studentId 和 jaggedArray 与学生相关的信息。这是c#中的方法签名
String[][] SearchStudent(string studentId, String[][] additionalInformation);
根据 KSOAP wiki 页面,下面的代码应该可以工作。我也用 Hashtable 尝试过;它返回了相同的错误消息。
SoapObject additionalInformation = new SoapObject(NAMESPACE, "SearchStudent");
additionalInformation.addProperty("StudentFirstName", "John");
additionalInformation.addProperty("StudentLastName", "Doe
additionalInformation.addProperty("StudentDOB", "06101990");
SoapObject request = new SoapObject(NAMESPACE, "Authenticate");
request.addProperty("sessionId", params[0]);
request.addProperty("additionalInformation ", AuthParams);
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.dotNet = true;
envelope.bodyOut = request;
envelope.setOutputSoapObject(request);
HttpTransportSE androidHttpTransport = new HttpTransportSE(url);
androidHttpTransport.debug = true;
(new MarshalHashtable()).register(envelope);
androidHttpTransport.call(SOAP_ACTION + "SearchStudent", envelope);
SoapObject sResult = (SoapObject)envelope.getResponse();
我收到消息无效参数错误消息。我在这里做错了什么?