Created
January 13, 2013 21:53
-
-
Save xylude/4526392 to your computer and use it in GitHub Desktop.
Easy php soap implementation.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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