• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

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

 
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • 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 ]
 
I wasn't selected to go to mars. This tiny ad got in ahead of me:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic