After a firewall upgrade, I've just inadvertanly introduced an error to an old 
site that use SoapClient to make a webservice call over a non-standard port.

Not a problem to fix, but it highlights some a usability issue for the site, 
since the failure to connect kills the page at the point it is requested, and 
html output halts.

I can't seem to find much in the way of handling solid connection errors when 
making a call. Is anyone aware of how? Basically I would like the below 
function should return a flag to allow the output of some "not available" text 
on the frontend.


public function runService($var1, $var2, $var3) {

    $wsdl = "http://domain.co.nz:8033/application.asmx?WSDL";;

    $client = new SoapClient($wsdl);

    $params = array(
       'Param1' => $var1
       'Param2' => $var2,
       'Param3 => $var3
    );

    $response = $client->MySoapFunction($params); // Fatal error at this line 
since port is blocked by firewall. All further output is halted. 
Connection/Error check belongs here
  
    return($response->MySoapFunctionResult);
}

Cheers
Aaron

-- 
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to [email protected]
To unsubscribe, send email to
[email protected]

Reply via email to