Php Soap客户端的Soap请求格式不正确
我有以下请求,要求我与邮递员成功测试:Php Soap客户端的Soap请求格式不正确,php,soap-client,Php,Soap Client,我有以下请求,要求我与邮递员成功测试: curl -X POST \ 'https://dig-stage.crane.aero/craneota/CraneOTAService?wsdl=' \ -H 'Content-Type: text/xml' \ -H 'Postman-Token: 85f5fd96-5040-497e-9578-02dc63d91267' \ -H 'cache-control: no-cache' \ -d '<soapenv:Envel
curl -X POST \
'https://dig-stage.crane.aero/craneota/CraneOTAService?wsdl=' \
-H 'Content-Type: text/xml' \
-H 'Postman-Token: 85f5fd96-5040-497e-9578-02dc63d91267' \
-H 'cache-control: no-cache' \
-d '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:impl="http://impl.soap.ws.crane.hititcs.com/">
<soapenv:Header/>
<soapenv:Body>
<impl:GetAirPortMatrix>
<AirPortMatrixRequest>
<clientInformation>
<clientIP>127.0.0.1</clientIP>
<member>false</member>
<password>xxxxxx</password>
<preferredCurrency>xxx</preferredCurrency>
<preferredLanguage>xx</preferredLanguage>
<userName>xxxxxx</userName>
</clientInformation>
</AirPortMatrixRequest>
</impl:GetAirPortMatrix>
</soapenv:Body>
</soapenv:Envelope>'
但是,我不断收到服务器错误:
ERR_INVALID_REQUEST : Client information and Request object must be set properly
在这一点上,我确信我没有像在Postman中那样在PHP中正确地生成请求。如果您希望毫无疑问地生成有效的请求,请使用WSDL-to-PHP生成器。使用这种类型的生成器将引导您找到一个PHPSDK,其中的类与请求和响应数据以及发送请求的类相匹配。然后,您只需实例化对象,然后将请求数据对象传递给类,该类可以轻松地发送请求并处理响应,所有这些都使用OOP方法。此外,您将使用诸如PhpStorm或EclipsePDT之类的IDE实现完全自动完成 试试这个项目
ERR_INVALID_REQUEST : Client information and Request object must be set properly