File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Services and the fly likes Why bytecodes??? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Why bytecodes???" Watch "Why bytecodes???" New topic

Why bytecodes???

Paul Santa Maria
Ranch Hand

Joined: Feb 24, 2004
Posts: 236
Isn't a "web service" supposed to pass XML (not bytecodes/class files)? It sounds a bit like you're trying to re-invent RMI.

Axis implements SOAP. Why don't you have your Java app use SOAP, too?

Paul M. Santa Maria, SCJP
Sandeep Advani
Ranch Hand

Joined: Mar 11, 2004
Posts: 78
Web Service is supposed to pass XML because of the interoperability issue. Because these byte codes/class files does some computation and are not simply messages, passing them as XML may not be work, right.

I am trying to use SOAP bindings here .... client sends these byte codes thru AXIS....AXIS takes the byte codes and serializes....deserialization on the server Web Service side...back to Java object....bindings still remains SOAP binding as on the client side.....but when I execute this on the server....fails ! Interestingly, these byte codes arrive safely on the server and when I run them on the server side via a command shell, works great !

This client code is similar to ones in their samples from Axis 1.1.

Best bet would be to use local binding because SOAP is expensive. In short, client sends class file on the server, server executes these arrived byte codes on the fly, the byte codes makes a local method call on the server Web Service already exposed methods, and comes back with the result. Hence, I consume less network resources.

What do you think?
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8927

but when I execute this on the server....fails

How are you excecuting it?

I agree. Here's the link:
subject: Why bytecodes???
It's not a secret anymore!