
Spectra XML-RPC command line client is a sample java application that shows use of Apache XML-RPC in real world. It was originally as a test tool when we are developing Spectra Voucher Topup Software.
First get ostermillerutils_1_07_00.jar, xmlrpc-client-3.1.1.jar and xmlrpc-common-3.1.1.jar. I won’t tell you how to do this. Then compile the file using below command. You might want to adjust library path if you put on location other than where XmlRpcClientTest.java resides. Please note that all command should be written in one line.
javac -cp ostermillerutils_1_07_00.jar:xmlrpc-client-3.1.1.jar:
xmlrpc-common-3.1.1.jar:. XmlRpcClientTest.java
Suppose you want to topup mobile phone number 08888366322 using voucher code R5 using user name 1234 and password secret
java -cp xmlrpc-client-3.1.1.jar:xmlrpc-common-3.1.1.jar:
ws-commons-util-1.0.2.jar:ostermillerutils_1_07_00.jar:.
XmlRpcClientTest -a 1234 -p secret -m 08888366322 -c R5
You might see output like this:
[{Method=TOPUP, MSISDN=08888322366, ReferenceId=pABdrbfHx, ProductCode=r5, Username=1234}]
{Time=2009-01-16T21:50:37.478+07:00, Message=401: Unauthorized , ResponseCode=401}
This java source code published to open source community by Akorena.com under BSD license. It means you are free to use this source code, no royalties, no NDA.
Other Resources on Spectra Voucher Topup Software
We have compiled various information on our Wiki page. Please visit http://wiki.akorena.comto get more information about our software and technologies used. Below is the list of topics that might be in your interest:
Comments are closed.