문제

I have an SSL certificate on my site. It was installed by my hosting provider and I have tested that it was installed properly. I'm trying to consume a SOAP web service from mindbodyonline.com/api and I'm getting this message in the response

This method must be accessed via SSL (HTTPS).

I'm using Zend Framework's Soap Client and it has been working for most of the services but this particular one contains credit card information and that's probably why it needs the secure connection. I have been unable to find any information on how to send my SOAP request securely. I am creating the client using the code below.

$client = new Zend_Soap_Client('https://api.mindbodyonline.com/0_5/ClientService.asmx?WSDL', array("soap_version"=>SOAP_1_1));

anybody able to help?

도움이 되었습니까?

해결책

The WSDL specifies all endpoints as http not https. So I had to change the endpoint in the Zend_Soap_Client constructor. The Zend_Soap_Client Docs http://framework.zend.com/manual/en/zend.soap.client.html say that the location option doesn't work in WSDL mode but they're wrong. Adding the location option overrides the endpoint specified in the WSDL. I got it to work using this code

$client = new Zend_Soap_Client('https://api.mindbodyonline.com/0_5/ClientService.asmx?WSDL', array("soap_version"=>SOAP_1_1,'location'=>'https://api.mindbodyonline.com/0_5/ClientService.asmx'));

Thanks to drew010 for his help!

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top