Skip to content

Instantly share code, notes, and snippets.

@xylude
Created January 13, 2013 21:53
Show Gist options
  • Save xylude/4526392 to your computer and use it in GitHub Desktop.
Save xylude/4526392 to your computer and use it in GitHub Desktop.
Easy php soap implementation.
$methodName = 'name_of_remote_soap_method';
$params = array('params'=>'to','send'=>'to','the'=>'server');
$client = new SoapClient("https://wsdl-url", array('trace' => 1, 'exceptions' => false));
$response = $client->{$methodName}($params);
if (get_class($response) !== 'SoapFault') {
print_r($response); //call was successful
} else {
print_r($response); //call failed
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment