Interview Questions

PHP SOAP Extension - A First SOAP Client

SOAP Interview Questions and Answers


(Continued from previous question...)

PHP SOAP Extension - A First SOAP Client

To demonstrate how to make a simple SOAP Client, we'll take the XMethods demo service, “Delayed Stock Quote”, as our target. Before we start to write any PHP code, we'll need to gather some information about this particular service:

* The method name
* The endpoint URL where the service is running
* The SOAPAction header value for the method
* The namespace URI for the method
* Input and output parameter names and types

Example (client2.php)
<?php
$client = newv SoapClient(
"http://services.xmethods.net/soap/urn:xmethods-delayed-quotes.wsdl"
);

print($client->getQuote("ibm"));
?>

(Continued on next question...)

Other Interview Questions