• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Question on Watsh Rajneesh's notes (Client Stub pg85)

 
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic