简体   繁体   English

nusoap返回信封

[英]return envelope with nusoap

I'm new with nusoap and developped a webservice server. 我是nusoap的新手,并开发了一个Web服务服务器。 I have to return a response like this: 我必须返回这样的响应:

<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>

i've tried to return a StdClass 我试图返回一个StdClass

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

I use yii framework so in my function, i declare this 我使用yii framework,所以在我的函数中,我声明了这一点

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

But now when i test with SoapUI, i receive this so how can i remove the enclosed tag 'return' 但是现在,当我使用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>

thanks a lot 非常感谢

I found this post and effectively the wsdl i must implement can't contain this retrun tag so i have to remove this one 我发现了这篇文章,实际上我必须实现的wsdl不能包含此retrun标签,因此我必须删除此文章

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

But i don't know where making the change in nusoap. 但是我不知道在哪里改变了nusoap。

Thanks for your help 谢谢你的帮助

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM