Using SOAP With The BMP
We haven't build it into mADL, however you can just use the standard PHP SOAP class, seehttp://php.net/manual/en/book.soap.php
Input Arguement
<arg> <prefix>Number 1:</prefix> <preload>3</preload> </arg> <arg> <prefix>{NL}Number 2:</prefix> <preload>9</preload> </arg>
Sample Interaction Code
$debug = true; $str = ''; $wsdl = 'http://soaptest.parasoft.com/calculator.wsdl'; $client = new SoapClient($wsdl); $data = array('x' => $args[0], 'y' => $args[1]); $result = $client->add($data); if($debug) { $str = ' Available functions on web service: '; $str .= print_r($client->__getFunctions(), 1); $str .= ' Data passed to add function: '; $str .= print_r($data, 1); $str .= ' Result of add function: '; $str .= print_r($result, true); $str .= ' '; } return $str . "The addition of {$args[0]} and {$args[1]} is {$result->Result}";
Just make sure you use the following so the WSDL isn't cached:
ini_set("soap.wsdl_cache_enabled", 0);
Related articles