Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Sun J2ee webservice tutorial doubt

 
Vasim Patel
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am trying to understand how the JAX RPC static stub client is built in Sun Webservices tutorial
http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JAXRPC3.html

Here we have HelloIF and HelloImpl classes. Both these classes are in the
package helloservice.



These have been built using


Now the client HelloClient.java is in package staticstub.




I wanted to know how does HelloClient compile WITHOUT importing package helloservice in which HelloIF has been declared.

Isn't this against the basic java rules.

Or is there a smart way ANT does.

Can someone please explain or give me a plain javac command to compile the HelloClient.java


regards
Vasim
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you are confusing server-side vs. client side interfaces.

The server side classes can be found in
j2eetutorial14\examples\jaxrpc\helloservice\build\helloservice

The client side classes can be found in
j2eetutorial14\examples\jaxrpc\staticstub\build\staticstub

it goes to follow that the server is using
helloservice.HelloIF
helloservice.HelloImpl

while the client is using
staticstub.HelloIF
staticstub.HelloImpl
etc.
 
Vasim Patel
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Peer. Yes, I got it now.
the wscompile on client side reads the wsdl file and generates 2 java files(among others) in its package.
staticstub.Hello
staticstub.HelloImpl

Thanks

Vasim
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic