Question on Watsh Rajneesh's notes (Client Stub pg85)
posted 9 years ago
Hi I'm working through Watsh Rajneesh's notes (which have been very helpful so far) and have come across the following on page 85 which I think is wrong.
Once the endpoint interface and stub have been generated, they can be used at runtime to invoke operations on the Web service endpoint. InitialContext jndiContext = new InitialContext ( ); BookQuoteService service = (BookQuoteService) jndiContext.lookup("java:comp/env/service/BookQuoteService"); BookQuote bookQuote = service.getBookQuotePort(); float price = bookQuote.getBookPrice( isbn );
shouldn't the code be more like this ?:
(edit) or perhaps its just that a J2EE client example is being shown [ March 29, 2007: Message edited by: michael warren ]