SOAP 调用 http://onepointdemo.myfarebox.com/V2/OnePoint.svc 时出错

Error in SOAP call to http://onepointdemo.myfarebox.com/V2/OnePoint.svc

我有来自 myfarebox.com

的 SOAP 代码
<?xml version="1.0" encoding="utf-8"?>    
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mys="Mystifly.OnePoint" xmlns:mys1="http://schemas.datacontract.org/2004/07/Mystifly.OnePoint">
   <soapenv:Header></soapenv:Header>
   <soapenv:Body>
      <mys:CreateSession>
         <mys:rq>
            <mys1:AccountNumber>Account_Number</mys1:AccountNumber>
            <mys1:Password>Account_Password</mys1:Password>
            <mys1:Target>test</mys1:Target>
            <mys1:UserName>Account_Username</mys1:UserName>
         </mys:rq>
      </mys:CreateSession>
   </soapenv:Body>
</soapenv:Envelope>

但是使用 Postman 我得到这个错误

 <s:Envelope      xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">     
     <s:Body>     
         <s:Fault>     
             <faultcode xmlns:a="http://schemas.microsoft.com/ws/2005/05/addressing/none">a:ActionNotSupported</faultcode>     
             <faultstring xml:lang="en-US">The message with Action '' cannot be processed at the receiver, due to a ContractFilter      mismatch at the EndpointDispatcher. This may be because of either a contract mismatch (mismatched Actions between sender and           receiver) or a binding/security mismatch between the sender and the receiver.  Check that sender and receiver have the same      contract and the same binding (including security requirements, e.g. Message, Transport, None).</faultstring>
         </s:Fault>
     </s:Body>
 </s:Envelope>

所以我在 Whosebug 和其他博客上阅读了一些示例我得到了这段代码 https://gist.github.com/vishvendrasingh/0e0f7b990bf6458c546c47767b2e28a0

但是它给出了这个错误

Fatal error: SOAP-ERROR: Parsing WSDL: Couldn't find in 'http://onepointdemo.myfarebox.com/V2/OnePoint.svc' in /var/www/api/index.php on line 4

我是 SOAP 的新手,它似乎根本不起作用。

对于最后一个错误

Fatal error: SOAP-ERROR: Parsing WSDL: Couldn't find in

'http://onepointdemo.myfarebox.com/V2/OnePoint.svc' in /var/www/api/index.php on line 4

在您的代码中,您应该通过将 ?wsdl 添加到您的 URL:

来指向您的 wsdl
$wsdl = http://onepointdemo.myfarebox.com/V2/OnePoint.svc?wsdl