簡體   English   中英

nusoap返回信封

[英]return envelope with nusoap

我是nusoap的新手,並開發了一個Web服務服務器。 我必須返回這樣的響應:

<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>
<UpdateLeadResponse xmlns="http://icrm.pat.it/fiat/ws">
  <UpdateLeadResult>
    <ID>string</ID>
    <ResultCode>OK</ResultCode>
    <ResultDescription>string</ResultDescription>
  </UpdateLeadResult>
</UpdateLeadResponse>
</soap:Body>
</soap:Envelope>

我試圖返回一個StdClass

$rep = new StdClass();
$test = new stdClass();
$test->LeadID = "";
$test->ResultCode = "OtherError";
$test->ResultDescription = $errorDesc;
$rep->UpdateLeadResult = $test;

我使用yii framework,所以在我的函數中,我聲明了這一點

/**
    * @param string $sXml
    * @param string $sFilters
    * @return mixedHello you !
    * @soap
    */

但是現在,當我使用SoapUI進行測試時,我收到了此消息,因此如何刪除隨附的標簽“ return”

<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:WebServControllerwsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
 <SOAP-ENV:Body>
  <ns1:ProcessRequestResponse>
     <return xsi:type="SOAP-ENC:Struct">
        <UpdateLeadResult xsi:type="SOAP-ENC:Struct">
           <LeadID xsi:type="xsd:string"></LeadID>
           <ResultCode xsi:type="xsd:string">OK</ResultCode>
           <ResultDescription xsi:type="xsd:string"/>
        </UpdateLeadResult>
     </return>
  </ns1:ProcessRequestResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

非常感謝

我發現了這篇文章,實際上我必須實現的wsdl不能包含此retrun標簽,因此我必須刪除此文章

[link] http://pear.php.net/bugs/bug.php?id=2877 [/ link]

但是我不知道在哪里改變了nusoap。

謝謝你的幫助

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM