SOAP and WSDL
Posted: Fri Oct 28, 2011 11:16 am
Hi,
So I am trying to get a SOAP server I setup to work with some crazy people who need crazy things. Anyway, I have a WSDL file which you can find here: http://binary.admiralmarkets.com/api/wsdl.xml.
I am invoking my server like this:
Now, I know you might ask "Why isn't he putting the wsdl file as the first param??". The reason is, if I do that then the response from the server doesn't actually have what was returned from each function, just a blank tag.
But anyway, with the setup I have now I am getting a response like this:
So I am trying to get a SOAP server I setup to work with some crazy people who need crazy things. Anyway, I have a WSDL file which you can find here: http://binary.admiralmarkets.com/api/wsdl.xml.
I am invoking my server like this:
Code: Select all
$soapServer = new SoapServer(
null,
array(
'uri' => 'http://binary.admiralmarkets.com/api/wsdl.xml',
)
);
$soapServer->addFunction('CheckTraderBalance');
$soapServer->addFunction('TakeTraderBalance');
$soapServer->addFunction('GiveTraderBalance');
$soapServer->handle();But anyway, with the setup I have now I am getting a response like this:
Which would be awesome but sadly isn't working for the other people. What I need to do is get a response like this:<SOAP-ENV:Body>
<ns1:CheckTraderBalanceResponse>
<return xsi:type='xsd:boolean'>
true
</return>
</ns1:CheckTraderBalanceResponse>
</SOAP-ENV:Body>
You can notice the difference there, slight but existing. I myself don't really know much about these SOAP servers and whatnot but for all the things i have read through I can not figure out a way to get the proper return envelope working. Maybe someone here can help me out?<ns1:CheckTraderBalanceResponse>
<ns1:CheckTraderBalanceResult xsi:type='xsd:boolean'>
true
</ns1:CheckTraderBalanceResult>
</ns1:CheckTraderBalanceResponse>