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

107 Comments

  1. Not long ago I started exploring coin collecting. That’s
    when I came across https://groshi.xyz.
    I was looking for up-to-date market insights, and most sources were too general.
    On this website I found structured articles about coins, their history, and their value. It helped me better understand basic principles of numismatics.
    I suggest checking this platform if you’re interested in coin collecting or want reliable information about numismatics.

  2. I decided to learn more about gold coins and their worth.
    This article showed up in search.
    It was hard to find well-structured information. Most sources were outdated.
    I learned the real price and history of the chervonets.
    On this page I found clear explanations.
    Highly recommend reading it if you’re interested in coins, gold, or real asset value.

Leave a Reply

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