简体   繁体   English

Soap Call到http会自动尝试通过https连接

[英]Soap Call to http automatically tries to connect via https

When making a SOAP call to a http:// address it is automatically trying to connect via https:// I need to force SOAP to only connect via http:// is there a way to do this? 当对http://地址进行SOAP调用时,它会自动尝试通过https://进行连接,我需要强制SOAP仅通过http://进行连接,有没有办法做到这一点? I have ensured MultiViews is not enabled in Apache. 我确保在Apache中未启用MultiViews。

I have even tried to do a simple SoapClient call without encapsulating it into a class, with the login included in the initial call. 我什至尝试做一个简单的SoapClient调用而不将其封装到一个类中,而登录名包含在初始调用中。

$soap = new \SoapClient('http://gotouri?wsdl, array(
    'login' => 'username',
    'password' => 'userpass',
    'trace' => 1,
    'exceptions' = 1
    )
);

this is the SOAP-FAULT error I receive: 这是我收到的SOAP-FAULT错误:

Fatal error: Uncaught SoapFault exception: [HTTP] Could not connect to host in [internal function]: SoapClient->__doRequest('<?xml version="...', 'https://www.do...', 'urn:Mage_Api_Mo...', 1, 0)

Anyone have any ideas how to force the soap-client to use http? 任何人都有任何想法如何强制肥皂客户端使用http?

I figured out the reason it was automatically parsing https://. 我知道了它自动解析https://的原因。 In the XML file on the server, the location address is to https:// 在服务器上的XML文件中,位置地址为https://

<service name="MagentoService">
<port name="Mage_Api_Model_Server_HandlerPort" binding="typens:Mage_Api_Model_Server_HandlerBinding">
<soap:address location="https://www.thisguyssoapserver.com/index.php/api/soap/index/"/>
</port>
</service>

Thus, my localhost SSL isn't working correctly. 因此,我的本地主机SSL无法正常工作。 I do not know whether a self-signed certificate would enable me to make this call or not, however I can make a successful soap call after pushing the code to a lamp server on gcloud. 我不知道自签名证书是否可以使我进行此调用,但是将代码推送到gcloud上的灯泡服务器后,我可以成功进行Soap调用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM