我将提供程序 wsdl 与 SoapClient 一起使用,但是当我使用命令 __getFunctions 时,我得到如下内容:
method1Rsp service(method1Req $parameters)
method2Rsp service(method2Req $parameters)
method3Rsp service(method3Req $parameters)
method4Rsp service(method4Req $parameters)
method5Rsp service(method5Req $parameters)
所以,我只能调用函数“service()”或使用__soapCall('service',$info)
但我总是得到“method1”模式。
如果我使用__doRequest()
我可以在自己编写的xml中发送我想要的方法并且工作正常,但遗憾的是......
如果我在 $info 数组中发送方法名称,它也会使用第一个方法。
Question:有没有办法使用调用特定方法__soapCall()
或者服务功能,或者我必须修改wsdl?
Edit:
这是一个 xml 请求,用于__doRequest
:
<?xml version="1.0" encoding="UTF-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<LowFareSearchReq TargetBranch="" xmlns="http://www.travelport.com/schema/air_v20_0" xmlns:com="http://www.travelport.com/schema/common_v17_0">
<com:BillingPointOfSaleInfo OriginApplication="UAPI"/>
<SearchAirLeg>
<SearchOrigin>
<CityOrAirport Code="LON" xmlns="http://www.travelport.com/schema/common_v17_0" />
</SearchOrigin>
<SearchDestination>
<CityOrAirport Code="MUC" xmlns="http://www.travelport.com/schema/common_v17_0" />
</SearchDestination>
<SearchDepTime PreferredTime="2013-02-10" />
<AirLegModifiers>
<PreferredCabins>
<CabinClass Type="Economy" />
</PreferredCabins>
</AirLegModifiers>
</SearchAirLeg>
<SearchPassenger Code="ADT" Age="30" xmlns="http://www.travelport.com/schema/common_v17_0"/>
<AirPricingModifiers CurrencyType="EUR">
</AirPricingModifiers>
</LowFareSearchReq>
</s:Body>
</s:Envelope>
网络服务的位置是http://webservicename/AirService
不管你必须使用什么方法。
这工作正常,但响应也是 xml 字符串。此外,如果我在将来的更新中更改 wsdl 文件,架构不会更新。使用__soapCall
返回一个 stdClass 对象并自动获取模式。
我认为您可以使用自定义参数(方法或方法 2 Req 等)调用服务。 PHP Soap 库本身确定必要的方法
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)