Monday, February 6, 2012

SOAP and PHP

Calling a SOAP based service could not be this easy as it can be done with PHP
        $objClient = new SoapClient("http://foobar.in/services/blahblah?wsdl", array('trace' => true));
    
        $objResponse = $objClient->getGreeting(array("name" => "tom"));
    
        //print($objClient->__getLastRequest());        
        print_r($objResponse);
$objResponse
stdClass Object
(
    [out] => stdClass Object
        (
            [message] => Hello tom!
        )
)