I'm running a PHP SoapServer. This is a example of a request I can get in my request body:
<MyFunctionRequest>
<Item>
<Param Attr="XX">Value</Param>
</Item>
</MyFunctionRequest>
The problem is, I can't seem to be able to read the attribute Attr in my SoapServer function. If I print the parameters I get in my SoapServer function, I get this:
StdClass Object
(
[Item] => stdClass Object
(
[Param] => Value
)
)
My SoapServer is built like this:
<?php
class MySoapServer {
public function index() {
$server = new SoapServer($pathToWsdl);
$server->addFunction(array('MyFunction'));
}
}
function MyFunction($params) {
log(print_r($params, true));
// function code, need the attribute Attr somewhere in here
}
So how can I get the attribute Attr in my function code? Thanks.