Originally posted by Pradeep Bhat:
I was just reading web services tutorial from Sun where I noticed the following
A service endpoint interface must conform to a few rules:
• It extends the java.rmi.Remote interface.
• It must not have constant declarations, such as public final static.
Why the above restrictions?
Thanks
Pradeep,
I just started looking at this forum...
My understanding of these points is as follows. First, you are not actually forced to use the rmi.Remote, but you must implement it.
Second, the static final really only applies to objects (not primitives). The reason is that the interface is stateless, so there would be no assurance that your created objects will be what you expect in subsequent invokations.
I hope this helps (my experience with web services with
java comes from one of my recent courses in a Masters program, by the way.
Juan Rolando Prieur-Reza, M.S., LSSBB, SCEA, SCBCD, SCWCD, SCJP/1.6, IBM OOAD, SCSA