I am trying to pass a request to a SOAP service and need help with the code. Inside my php.ini file for XAMPP, SOAP is enabled. And I double checked that using echo phpinfo();.
I have tried dozens of url extension endings, but this following url is what I am told should work, and is successful in Postman as well as pasted into the browser. Please use code to answer my question along with explanations.
Here is what I have:
<?php try { $soapclient = new SoapClient("https://blah.com/webservice/ratequote/xml.aspx"); $param=array('UserID'=>'blah', 'Password'=>'blah'); $response = $soapclient->CreateResponse($param); var_dump($response); $array = json_decode(json_encode($response), true); print_r($array); }catch(Exception $e) { echo $e->getMessage(); } ?>
In addition, I have also tried using the following endpoints: $soapclient = new SoapClient("http://blah.com/webservice/ratequote/xml.aspx?wsdl");
$soapclient = new SoapClient("http://blah.com/webservice/ratequote/xml.aspx?wsdl=1");
One the errors that I get in the same order sequence I list the 3 URLs above:
SOAP-ERROR: Parsing WSDL: Couldn't find in 'https://blah.com/webservice/ratequote/xml.aspx'
SOAP-ERROR: Parsing WSDL: Couldn't find in 'https://blah.com/webservice/ratequote/xml.aspx?wsdl'
SOAP-ERROR: Parsing WSDL: Couldn't find in 'https://blah.com/webservice/ratequote/xml.aspx?wsdl=1'
Please also note that I have tried using http instead of https for all 3 urls as well. That should cover just about everything I have seen and tried.
1.4m articles
1.4m replys
5 comments
57.0k users