Page 1 of 1

error with SoapClient

Posted: Tue Jan 04, 2011 2:36 pm
by AndrewBliss
Hello, I am having some trouble with SoapClient.

When I make a new object it takes forever and returns an error message.

[text]Parsing WSDL: Couldn't load from 'http://soap.amazon.com/schemas2/AmazonWebServices.wsdl' :
failed to load external entity "http://soap.amazon.com/schemas2/AmazonWebServices.wsdl"[/text]

I have tried searching for answers and haven't found anything. I have all the modules in php installed, I don't know if they are correctly configured.
I have soap, libxml, curl.

So I tried just to do a file_get_contents and that times out also saying HTTP request failed. I have the allow_url_fopen On.

This all works if I am just doing it all local. By the way I don't really know how all this works. Also I am using php 5.3.3 and ubuntu maverick.

It works on windows xamp and a mac in the same office. I can't get the SoapClient to work on my machine.

Oh and I also tried doing a CURL call and it pulled all the info correctly.

Thanks for any input

Re: error with SoapClient

Posted: Tue Jan 04, 2011 4:05 pm
by Sofw_Arch_Dev
What parameters are you using to create the SoapClient?

I know you said that different machines in the office had no issues, but I've experienced offices where some machines connected to a different sub-net that were not behind a proxy. A proxy may be interfering with the connection you're trying to make. Just an idea.

Re: error with SoapClient

Posted: Tue Jan 04, 2011 4:14 pm
by AndrewBliss
I am not using any parameters for the SoapClient, just the URI. I don't know if I am behind a proxy or not, I will have to find out the network setup here. Thanks for the idea, I am also thinking it might be a network issue.

Re: error with SoapClient

Posted: Tue Jan 04, 2011 4:22 pm
by Sofw_Arch_Dev
Sorry to hear that. Network issues are commonplace IMO. Anyhow I'd recommend instantiating the SoapClient with at least array( "trace" => true ) as the second parameter. This'll allow you to use __getLastRequest() and __getLastResponse(), which are integral to sorting out any issues once you get over this initial hurdle.

Re: error with SoapClient

Posted: Tue Jan 04, 2011 4:32 pm
by AndrewBliss
I have put in array('trace'=>1) as the second parameter. I have been asking around about the network and it worked before on a windows setup in the same room, on the same network. So now I have no idea whatsoever.

Re: error with SoapClient

Posted: Wed Jan 05, 2011 9:27 am
by AndrewBliss
Does anyone have any ideas? Does ubuntu have a firewall? I can run a curl request and get the wsdl file, then put run it locally from SoapClient. Why wouldn't I be able to run it normally?