Suppose I want to invokes a Web Service that returns stock values for a stock and I do a UDDI search programmatically , the search may throw 2 records. Now, suppose the first WS accepts one parameter (stock symbol)and the 2nd one accepts 2 parameters(stock symbol & stock exchange symbol), how will my program(which invokes the web services ) be able to handle both cases because it may be work when the web services accept stock symbols only? wsin.getQuote(stockSymbol); and it does not contain wsin.getQuote(stocksymbol,stockexchnage)
Or is that it is not possible to use UDDI dynamically and then my code construct argument list for Web Services? Am I missing something here?
I hope you guys have understood my problem and confused you.
Obviously you'll have to code the "if else" logic somewhere if you need to support two different interfaces. Here's how you could do it: 1) Lookup the "access URI" from UDDI using the JAXR API 2) Obtain a javax.xml.rpc.Service using that "access URI" (which should point to a WSDL document) 3) Figure out whether the given Service supports a one-argument or two-argument operation, and invoke whichever you find