Skip to content

Send files using XML-RPC in Java

Hello

Tooday Jorge send me an e-mail asking how to send files using XML-RPC. So I did some modifications in Client and Server, Java XML-RPC to do this.

I implemented this and it wasn't so hard. I read the documentation of Apache XML-RPC to see how to send bytes. They are send using an array of bytes (byte[]) in a Base64 codification.

To create the Base64 codification I used Java Base64 in public domain.

How to get an array of bytes from a file

How to create a file from a array of bytes

XML-RPC-Transfer-file

Matheus

PS: This is just an example, any file that client ask, the server will send. It WILL BE A SYSTEM VULNERABILITY!

Published inAprendendojava

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.