调用SOAP服务时出现“a:InternalServiceFault”错误

时间:2013-02-11 03:59:37

标签: qt soap blackberry-10 blackberry-cascades

朋友..

我正在实施SOAP webservices ..

我正在使用以下代码..

QtSoapMessage request;
request.setMethod(QtSoapQName("Method_Name", "http://tempuri.org/*****/"));

request.addMethodArgument("key1", "", "value1");
request.addMethodArgument("key2", "", "value2");

QString action ="http://tempuri.org/****/MethodName";

QString host ="host name";
QString prefix ="/****/****.svc";

我得到的答案如下......

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/1999/XMLSchema">
<SOAP-ENV:Body xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Fault xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<faultcode xsi:type="xsd:string" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance">a:InternalServiceFault</faultcode>

1 个答案:

答案 0 :(得分:1)

看起来你应该在addMethodArgument中需要URI。 此外,你如何运行请求?这是所有代码吗?