aspose file tools*
The moose likes Web Services and the fly likes JAX -RPC Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "JAX -RPC" Watch "JAX -RPC" New topic
Author

JAX -RPC

Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

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
Juan Rolando Prieur-Reza
Ranch Hand

Joined: Jun 20, 2003
Posts: 236
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
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

First, you are not actually forced to use the rmi.Remote, but you must implement it.

To create an webserice in JAX-RPC we need to create an interface that extends java.rmi.Remote, implement that interface. Remote interface is just a signal(empty) interface .

.
the static final really only applies to objects (not primitives).

I dont agree
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.

can you please explain.
somkiat puisungnoen
Ranch Hand

Joined: Jul 04, 2003
Posts: 1312
I think about that ...
1. JAX-RPC is created as same as Java RMI (in idea) .
When you have been created application with Java RMI, i think you will easy to create JAX-RPC application.


SCJA,SCJP,SCWCD,SCBCD,SCEA I
Java Developer, Thailand
Juan Rolando Prieur-Reza
Ranch Hand

Joined: Jun 20, 2003
Posts: 236
Originally posted by Pradeep Bhat:

"...interface is stateless, so there would be no assurance that your created objects will be what you expect in subsequent invokations..."
can you please explain.

Pradeep,
As I began writng my answer, I realized that this question would be a nice opportunity to invite comment from Paul. So, I am going to start a fresh thread on this (that he is more likely to notice).
PS thanks for the questions
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

When you have been created application with Java RMI, i think you will easy to create JAX-RPC application.

Yes it is easy but we need to know why and what we are doing.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JAX -RPC