Moving from NuSOAP to PHP5 SOAP

喜你入骨 提交于 2019-12-01 05:23:54

Make sure NuSoap and PHPv5-SOAP are running on the same server. If I'm not totally wrong, both libraries uses the same class-name. Maybe it will work better if you make sure none NuSopa-files are included? And also verify that the SOAP-library are loaded:

if(!extension_loaded('soap')){
  dl('soap.so'); // Actually a deprecated method. See "notes" at http://no.php.net/dl
}

I guess the version-field you refer to is defined as "SOAP 1.1" or similiar?

Best wishes :)

Btw: what are you working on? Exchange of delays from the pilot to the airport? Or perhaps a webservice which will decrease the waiting-time on luggage delivery at Osl? :p

We had very similar problems with PHP5 built-in SOAP client trying to consume a .NET-based Web-service. Also WSDL parsing failed reporting invalid schema. Putting the schema definitions into a single local file didn't help.

We gave up trying and switched to NuSOAP, which did work.

However, NuSOAP is far from perfect also. Right now I get into out-of memory situation during the parsing of 1MB+ responses. Erasing all the nasty debug code helped a little, but not radically.

Thus, looks like there's no 100% interoperable/functional SOAP client implementation in PHP at the moment.

Without testing it, I have two suggestions:

First, put your error_reporting to the highest possible (before creating the SoapClient):

error_reporting( E_ALL );

If there's something wrong with the authentication on the server's side, PHP will throw warnings. In most of the cases, it will tell you, what has gone wrong.

Second: I don't know if you can specifiy the 'location' option together with an URL to a wsdl. Theoretically, the wsdl tells your client, where the endpoint of the operations is, so you don't have to bother.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!