RMI i WebService - why this way?

R

Raveman

I just played with WebService in jdk6 and i dont understand why its like
rmi - I have to generate classes. why they were able to make ejb3 simple,
but this @WebService annotation needs all this generated classes. Maybe
because it uses rmi, why rmi is that way ? from what i know its just a
server that sends/receive serialized objects. I remember i wrote webserver
once in java and i havent used code generation. Shouldnt they just make a
higher level of abstraction? Please tell me. They make everything simpler,
but rmi will never change and everybody is ok with that.
 
M

Manish Pandit

I just played with WebService in jdk6 and i dont understand why its like
rmi - I have to generate classes. why they were able to make ejb3 simple,
but this @WebService annotation needs all this generated classes. Maybe
because it uses rmi, why rmi is that way ? from what i know its just a
server that sends/receive serialized objects. I remember i wrote webserver
once in java and i havent used code generation. Shouldnt they just make a
higher level of abstraction? Please tell me. They make everything simpler,
but rmi will never change and everybody is ok with that.

I hope I understood your question right - For remote invocations, be it
a Remote Object or a Web service, you'd need client stubs. The client
stubs act as a "proxy" and actually make the remote call, giving your
code the impression that the call is local.

The difference between RMI and Webservices, in this case, would be that
RMI uses JRMP, a binary protocol to invoke remote methods, while
WebServices (as a standard practice) use SOAP over HTTP, which is a
text-based protocol. SOAP attachments can be used to give a binary
flavor, but in and of itself, SOAP/HTTP is text.

-cheers,
Manish
 
R

Raveman

Uzytkownik "Manish Pandit said:
I hope I understood your question right - For remote invocations, be it
a Remote Object or a Web service, you'd need client stubs. The client
stubs act as a "proxy" and actually make the remote call, giving your
code the impression that the call is local.

The difference between RMI and Webservices, in this case, would be that
RMI uses JRMP, a binary protocol to invoke remote methods, while
WebServices (as a standard practice) use SOAP over HTTP, which is a
text-based protocol. SOAP attachments can be used to give a binary
flavor, but in and of itself, SOAP/HTTP is text.
By why generate subs and not just use jdk dynamic proxy or some hand written
proxy? Is rmi really impossible without code generation?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top