Jump to content

Connecting to a WSDL SOAP Client with PHP


phillymontana

Recommended Posts

I have had success connecting to other wsdl's using PHP, but for some some reason I can't get into this one below. I am using PHP.Mycode:< ?php$ws = 'https://integration.pgiconnect.com/Services/Public/2009/03/Security.svc?wsdl';$client = new SoapClient($ws);?>The error:Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://integration.pgiconnect.com/Services/Public/2009/03/Security.svc?wsdl' : failed to load external entity "https://integration.pgiconnect.com/Services/Public/2009/03/Security.svc?wsdl" in C:\xampp\htdocs\Projects\temp.php:3 Stack trace: #0 C:\xampp\htdocs\Projects\temp.php(3): SoapClient->SoapClient('https://integra...') #1 {main} thrown in C:\xampp\htdocs\Projects\temp.php on line 3I have used the wsdl checker: http://soapclient.com/soaptest.html and it passes and shows all of the methods.Am I doing something wrong to connect?Please help!

Link to comment
Share on other sites

have you checked with documentation of the SoapClient you are using? does it only need a string of the url?

Edited by thescientist
Link to comment
Share on other sites

I have had success connecting to other wsdl's using PHP, but for some some reason I can't get into this one below. I am using PHP. Mycode:< ?php$ws = 'https://integration.pgiconnect.com/Services/Public/2009/03/Security.svc?wsdl';$client = new SoapClient($ws);?>The error:Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://integration.pgiconnect.com/Services/Public/2009/03/Security.svc?wsdl' : failed to load external entity "https://integration.pgiconnect.com/Services/Public/2009/03/Security.svc?wsdl" in C:\xampp\htdocs\Projects\temp.php:3 Stack trace: #0 C:\xampp\htdocs\Projects\temp.php(3): SoapClient->SoapClient('https://integra...') #1 {main} thrown in C:\xampp\htdocs\Projects\temp.php on line 3 I have used the wsdl checker: http://soapclient.com/soaptest.html and it passes and shows all of the methods.Am I doing something wrong to connect? Please help!
I don't know if it helps / hurts / matters or not, but you have a space (in your example).... < ?php ... should be (as far as I know).... <?php
Link to comment
Share on other sites

Thanks for the reply guys. Should I even be using SoapClient() to load this WSDL? I just tried simple_load_file() and got no errors. Now I don't know what to do with the output! The var_dump shows: object(SimpleXMLElement)#1 (1) { ["@attributes"]=> array(2) { ["name"]=> string(15) "SecurityService" ["targetNamespace"]=> string(19) "http://tempuri.org/" } }...Please help.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...