0

I used a downloaded tool to auto-create a wrapper for a web service (fedex rate service) as it creates a really handy code base for accessing the service that auto-generates a class map and builds an auto-loading data structure by asking the web service itself for it's requirements and capabilities. It creates this wrapper as an 'extend' of SoapClient itself.

The only problem is, that it makes the separate service calls using an abstract wrapper that utilizes the __soapCall method. The problem that I've noticed with this is that it apparently doesn't populate anything where you can retrieve the XML from the calls themselves. Whenever I call __getLastRequest or __getLastResponse, they just return null even though __soapCall('getRates', $args) returns a php object response from the service.

Short of my re-writing the auto-generated code to call $this->getRates($args) or something similar, is there any trick to seeing the XML used in the request and returned in the response when using __soapCall ?

4

1 回答 1

0

没关系 - 我以为我的跟踪默认为 true,而我返回“null”的原因是它默认为 false。

只要我使用第二个参数创建接口实例,array('trace'=>1)我现在就可以获取 XML。

于 2013-07-10T21:13:49.857 回答