有人可以为我提供一个 PHP 示例,说明如何在https://gateway2.pagosonline.net/ws/WebServicesClientesUT?wsdl对 wsdl 网络服务进行 WSSoapClient 调用。
我到处寻找代码示例,但找不到如何调用它。我看到您可以扩展 SoapClient 类,但我不知道如何构建调用本身。太感谢了。
例子”
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ser="http://server.webservices.web.v2.pagosonline.net">
<soapenv:Header>
<wsse:Security soapenv:mustUnderstand="1"
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity- secext1.0.xsd">
<wsse:UsernameToken>
<wsse:Username>1</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username- token-profile-1.0#PasswordText">
123456</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
<soapenv:Body>
<ser:getVersion soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</soapenv:Body></soapenv:Envelope>