Re: [SOAP] [HTTP] Could not connect to host

From: Date: Mon, 20 Aug 2007 15:18:34 +0000
Subject: Re: [SOAP] [HTTP] Could not connect to host
References: 1 2  Groups: php.soap 
Request: Send a blank email to php-soap+get-2599@lists.php.net to get a copy of this message
Dnia 18-08-2007 o 00:37:45 "Christian Wenz" <chw@hauser-wenz.de> napisał(a):
Maybe the server name in the WSDL (localhost?) is not correctly resolved on the live machine? Just a guess. Best regards Christian
It cannot be resolved properly - WSDL is processed on client, NOT on server. It is only a description file - client extracts web service address (location) from WSDL file and tries to connect to it. (Make notice that this mechanism can be used e.g. for load balancing - if WSDL file is prepared 'on-the fly' you may manipulate where clients will try to connect.) WSDL file should be edited to contain the right address. Alternatively (if WSDL can not be edited), the client can overrule WSDL by specifying manually service address, e.g.: $params = array( "location" => "http://server.com/here/is/my/web/service/" ); $client = new SoapClient($wsdl_address, $params); (other WSDL features are still apllied, e.g. types and operations definitions - this is NOT a 'non-WSDL' mode).

« previous php.soap (#2599) next »