The strange is that when I am passing the wsdl to SOAPClient using the URI (online & local) everything works fine. So when I put
PHP Code:
$client = new SoapClient("http://localhost/myProject/WSDL.wsdl");
or
$client = new SoapClient("https://www.quiddiportal.com/quiddiservice.asmx?WSDL");
everything works fine.
But when I put only the name of the wsdl file.
PHP Code:
$client = new SoapClient("WSDL.wsdl");
I get an "Gateway Time-out" error from the line where I call a function of the web service. I use Netbeans and I run the projects in my console. Although if I call the same code that gives me this error from a browser then everything works fine.
I'm no SOAP guru by any means, but the manual suggest the first argument to the constructor is a URI, so I'd guess you'll have to use the 'localhost' URI option for local testing.
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
I'm no SOAP guru by any means, but the manual suggest the first argument to the constructor is a URI, so I'd guess you'll have to use the 'localhost' URI option for local testing.
Ok NogDog, I understand what you are saying. But shouldn't be working with the relative path too?
The weird thing is that the error is not coming from the line
Code:
$client = new SoapClient("WSDL.wsdl");
but from the
Code:
$response = $client->PostApplicationResult
.
When I debug the code it seems that the SOAPClient object is instantiated properly.
My guess is that it's trying to access what it interprets as "http://WSDL.wsdl" and times out when it cannot resolve that domain-- but that is just a guess.
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
Bookmarks