2013-02-11 208 views
-2

朋友時收到錯誤..「一:InternalServiceFault」 呼叫SOAP服務

我實現SOAP Web服務..

我使用下面的代碼..

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

看起來你應該需要在你的addMethodArgument中的URI。 此外,你如何運行請求?這是所有的代碼?