douwayuan3063 2015-11-09 12:04
浏览 63
已采纳

我可以在Opencart 2中使用PHP SoapClient运行Soap请求吗?

I need to process a Soap Request inside opencart 2, I built the soap request in a normal PHP file to start with and placed this in the root of my website, after I got that working I thought it would just be a case to add a function inside opencart 2 and place the soap request code in there. Now i can call the right function and the method containing the soap request but as soon as opencart try's to process the new soap client line which is :-

$newclient = new SoapClient('https://example.com/catalog/controller/soap/efiWSDL27.wsdl');

I get the following error:-

Proxy Error

The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request POST /index.php.

Reason: Error reading from remote server

If I comment out this line, then the rest of the function runs ok, apart from anything that relies on the soap request.

So to be clear Im getting this error before I try and call the soap request further down the function, It happens purely on the new soapclient statement.

Do I need to specify any other parameters when I do the new soap client from within Opencart

I know the wsdl is reachable, Im lost on this one, like I say the exact same code will work on the same webspace in a plain php file outside of opencart. I also tried a different webservice with a remote wsdl and I still get this same error in side opencart?

please help me :)

  • 写回答

1条回答 默认 最新

  • doucheng3811 2015-11-10 13:29
    关注

    Not Exactly The Right Answer, But the solution for me was to use the nusoap library rather than the built-in soapclient in PHP and then it worked perfectly.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥50 gki vendor hook
  • ¥15 centos7中sudo命令无法使用
  • ¥15 灰狼算法和蚁群算法如何结合
  • ¥15 这是一个利用ESP32自带按键和LED控制的录像代码,编译过程出现问题,请解决并且指出错误,指导如何处理 ,协助完成代码并上传代码
  • ¥20 stm32f103,hal库 hal_usart_receive函数接收不到数据。
  • ¥20 求结果和代码,sas利用OPTEX程序和D-efficiency生成正交集
  • ¥50 adb连接不到手机是怎么回事?
  • ¥20 抓取数据时发生错误: get_mooncake_data() missing 1 required positional argument: 'driver'的问题,怎么改出正确的爬虫代码?
  • ¥15 vs2022无法联网
  • ¥15 TCP的客户端和服务器的互联