0

我在将锯齿状数组发送到 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();

我收到消息无效参数错误消息。我在这里做错了什么?

4

1 回答 1

0

我能够让它与信封版本 10 而不是 11 一起使用。这是我的另一篇文章的链接,您可以在其中找到解决方案。

于 2013-06-04T01:57:38.880 回答