[
https://issues.apache.org/jira/browse/XMLRPC-171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12711132#action_12711132
]
Jagadeesh Uppala commented on XMLRPC-171:
-----------------------------------------
Jochen Wiedmann ,
Thanks for the pain which you are taking in helping me...
I have written some test client which tries to push the arguments to the
service..
code is as follows
********************
XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
config.setServerURL(new
URL("http://192.168.110.72/services/xmlrpc"));
XmlRpcClient client = new XmlRpcClient();
client.setTransportFactory(new
XmlRpcCommonsTransportFactory(client));
client.setConfig(config);
File source = new File("Testing1.JPG");
byte[] readfromjpgfile = new byte[(int) source.length()];
FileInputStream jpgfileInputStream = new FileInputStream(source);
jpgfileInputStream.read(readfromjpgfile);
byte[] storetoafile = Base64.encode(readfromjpgfile);
Object[] params = new Object[]{ new
String("d5ad8872afe4ded7893ef1fb5853451e"),new String("01-00915"), new
String("installation"),new String("caption2"),storetoafile};
Object result = (Object) client.execute("device.storePhoto", params);
System.out.println("Result is "+result);
********************************************
when i tried to run this , i am getting the below exception..
could you please advice me what is the best data type which i can take inorder
to send Base64 data?
org.apache.xmlrpc.XmlRpcException: Parse error. Request not well formed.
at
org.apache.xmlrpc.client.XmlRpcStreamTransport.readResponse(XmlRpcStreamTransport.java:197)
at
org.apache.xmlrpc.client.XmlRpcStreamTransport.sendRequest(XmlRpcStreamTransport.java:156)
at
org.apache.xmlrpc.client.XmlRpcHttpTransport.sendRequest(XmlRpcHttpTransport.java:115)
at
org.apache.xmlrpc.client.XmlRpcClientWorker.execute(XmlRpcClientWorker.java:56)
at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:167)
at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:137)
at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:126)
at avanti.adc.test.Test.main(Test.java:55)
> unable to send the B64encoded data
> ----------------------------------
>
> Key: XMLRPC-171
> URL: https://issues.apache.org/jira/browse/XMLRPC-171
> Project: XML-RPC
> Issue Type: Bug
> Affects Versions: 3.1.2
> Environment: Testing
> Reporter: Jagadeesh Uppala
> Assignee: Jochen Wiedmann
> Attachments: failure.pcap, failure.request.gz, success.pcap
>
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> My Application is a java application which uses xml-rpc communication with a
> server which is developed in php.
> the server has one service ( storePhotos) which accepts texti-id( which is a
> string) and the photoData( which is an encoded data of B64) ..
> it works very well if the size of the file which i am converting to B64 is <
> 60Kb. but it is failing if the size of the file is more than this.
> the exception which is being thrown by the server is "Parse error. Request
> not well formed."
> If the request is not well formed .. it should throw the same exception in
> the case if the file size is <60 Kb, which is not happening..
> but if the file size is greater than 60KB, it is throwing the above mentioned
> error.
> How can i rectify this?
> please advice me, as this is a sorce stopper for me to go ahead..
> Thanks,
> Jagadeesh
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.