Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/EmptyTag/136.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Web services 如何将对象作为BlackBerry SOAP请求参数传递_Web Services_Soap_Blackberry_Request - Fatal编程技术网

Web services 如何将对象作为BlackBerry SOAP请求参数传递

Web services 如何将对象作为BlackBerry SOAP请求参数传递,web-services,soap,blackberry,request,Web Services,Soap,Blackberry,Request,我不熟悉使用Momentics开发黑莓。现在我想向SOAP请求发送一个对象 以下是我的web服务: <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org

我不熟悉使用Momentics开发黑莓。现在我想向SOAP请求发送一个对象

以下是我的web服务:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <Login xmlns="http://shidhints.com/">
      <MyLoginCredentials>
        <Email>string</Email>
        <Password>string</Password>
      </MyLoginCredentials>
    </Login>
  </soap:Body>
</soap:Envelope>
现在我得到一个错误,如:

查询失败:XML分析错误


我已经用代码解决了这个问题

QtSoapStruct *myStruct=new QtSoapStruct(QtSoapQName("MyLoginCredentials"));
myStruct->insert( new QtSoapSimpleType(QtSoapQName("Email"), email));
myStruct->insert( new QtSoapSimpleType(QtSoapQName("Password"),password));

request.addMethodArgument(myStruct);
QtSoapStruct *myStruct=new QtSoapStruct(QtSoapQName("MyLoginCredentials"));
myStruct->insert( new QtSoapSimpleType(QtSoapQName("Email"), email));
myStruct->insert( new QtSoapSimpleType(QtSoapQName("Password"),password));

request.addMethodArgument(myStruct);