my dog learned polymorphism*
The moose likes Web Services and the fly likes Sending bytecodes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Sending bytecodes" Watch "Sending bytecodes" New topic
Author

Sending bytecodes

Sandeep Advani
Ranch Hand

Joined: Mar 11, 2004
Posts: 78
Help!

I tried sending byte codes to server application (deployed as a Web Service) as a method argument which returned SAXParserException. I believe wrapping up the class file into a String object would require Base64 encoding which I am looking into. My question is whether encoding will the right way or I must try sending byte codes as an attachment? Or something else?

My goal is to load the bytecode on a server which is deployed as a Web Service. This dynamically loaded bytecode will be then invoked from another client.

Any suggestions.

Sandeep
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Yes, Base64 encoding should be fine -- as long as you remember to decode it in the other end


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Sandeep Advani
Ranch Hand

Joined: Mar 11, 2004
Posts: 78
Thanks. Base64 worked fine and .class file is now able to download on the server site. Infact, I am using AXIS where encoding and decoding part is taken care by the underlying system. I just had to specify the argument as XSD_BASE64 and everything was taken care of.

My new problem is I cannot load this .class file and invoke it. I have posted a question at Java in General (Intermediate)
http://www.coderanch.com/t/373869/java/java/Not-able-load-Class

Any suggestions will be highly appreciated !

Sandeep
 
 
subject: Sending bytecodes
 
Similar Threads
Why bytecodes???
WSDL2JAVA
Advise needed !
How to order the elements in soap message?
java.text.ParseException in Web service