soap-client icon indicating copy to clipboard operation
soap-client copied to clipboard

Choose WSDL

Open victorgp89 opened this issue 8 years ago • 4 comments

Hi,

In this project is posible load wsd or another depending on the url?

victorgp89 avatar May 31 '17 08:05 victorgp89

Can you elaborate?

goetas avatar May 31 '17 08:05 goetas

Yes, sorry.

For example:

Get client from diferent wsdl depending on the url like:

If a call dev.synergy.com/weather $client = $factory->getClient('http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL', "WeatherSoap", "Weather");

Or dev.synergy.com/calculator $client = $factory->getClient('http://www.dneonline.com/calculator.asmx?WSDL', "CalculatorSoap", "Calculator");

victorgp89 avatar May 31 '17 09:05 victorgp89

Because is possible to get the portType output if a have the address of service? $port = $definitions->findPortType($port); foreach($port->getOperations() as $operation) { $output = $operation->getOutput(); }

victorgp89 avatar May 31 '17 11:05 victorgp89

did not get the question... do you have to do something this?:


if(strpos($URL, 'weather')!==false){
   $client = $factory->getClient('http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL', "WeatherSoap", "Weather");
} elseif(strpos($URL, 'calculator')!==false){
   $client = $factory->getClient('http://www.dneonline.com/calculator.asmx?WSDL', "CalculatorSoap", "Calculator");
}

goetas avatar Jun 01 '17 03:06 goetas