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.

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

报告相同问题?

悬赏问题

  • ¥20 西门子S7-Graph,S7-300,梯形图
  • ¥50 用易语言http 访问不了网页
  • ¥50 safari浏览器fetch提交数据后数据丢失问题
  • ¥15 matlab不知道怎么改,求解答!!
  • ¥15 永磁直线电机的电流环pi调不出来
  • ¥15 用stata实现聚类的代码
  • ¥15 请问paddlehub能支持移动端开发吗?在Android studio上该如何部署?
  • ¥20 docker里部署springboot项目,访问不到扬声器
  • ¥15 netty整合springboot之后自动重连失效
  • ¥15 悬赏!微信开发者工具报错,求帮改