I have a problem when I try to use standard PHP SoapClient to access a method on SoapServer. The problem is that the method on SoapServer is specified twice with the same name, but the action is different.
For example: the SOAP user interface shows that GetStockQuote and GetStockQuote are listed twice, but the second GetStockQuote will actually be called GetStockQuoteV2.
But my PHP SoapClient, if I call $ client-> GetStockQuote, it will call the first one automatically. From my research, I should do something like this.
$client->__soapCall('GetStockQuote', array($request), array('soapaction'=>'GetStockQuoteV2'));
But when I'm in wsdl mode, it still calls GetStockQuote, not GetStockQuoteV2.
My conclusion was that I needed to work in non-wsdl mode and deal with annoyance. When in non-wsdl mode, the above __soapCall seems to call the correct method, but due to the fact that I'm in non-wsdl mode, I think that there is a problem with building the corresponding AuthHeader that the server requires.
My question is: can I reassign the action of soap in PHP SoapClient wsdl-mode?
source share