You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xmlrpc-auto@ws.apache.org by "Jagadeesh Uppala (JIRA)" <xm...@ws.apache.org> on 2009/05/18 16:43:45 UTC

[jira] Created: (XMLRPC-171) unable to send the B64encoded data

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


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.


[jira] Resolved: (XMLRPC-171) unable to send the B64encoded data

Posted by "Jochen Wiedmann (JIRA)" <xm...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/XMLRPC-171?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jochen Wiedmann resolved XMLRPC-171.
------------------------------------

    Resolution: Invalid
      Assignee: Jochen Wiedmann

Closing as invalid, most likely problem in the PHP server. Reopen later, if required.


> 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.


[jira] Updated: (XMLRPC-171) unable to send the B64encoded data

Posted by "Jochen Wiedmann (JIRA)" <xm...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/XMLRPC-171?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jochen Wiedmann updated XMLRPC-171:
-----------------------------------

    Attachment: failure.request.gz

I have isolated the request document from your failure.pcap file and can't find anything wrong with it. Of course, the base64 section is relatively large, but definitely no reason to consider it anything but well formed.

In other words, I do believe that the PHP server is wrong and should be checked. I recommend consulting the PHP bug tracker or whatever is responsible for the server side code. Which is, of course, beyond this issues scope. Therefore I intend to close it as INVALID. You may reopen it later on, should my findings turn out to be wrong.



> 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
>         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.


[jira] Commented: (XMLRPC-171) unable to send the B64encoded data

Posted by "Jagadeesh Uppala (JIRA)" <xm...@ws.apache.org>.
    [ 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.


[jira] Commented: (XMLRPC-171) unable to send the B64encoded data

Posted by "Jochen Wiedmann (JIRA)" <xm...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/XMLRPC-171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12710813#action_12710813 ] 

Jochen Wiedmann commented on XMLRPC-171:
----------------------------------------

I think you don't understand the methodology.

You have traced the request (creating the failure.pcap file). I have extracted the payload and used an XML parser to parse it - nothing wrong. There is nothing like "not sending the full xml", otherwise it wouldn't have been in the .pcap file.

Sorry, but I can't offer any further help. If the PHP server insists that something's wrong, he should at least offer a more detailed diagnosis like line and column number, or whatever.
 

> 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.


[jira] Commented: (XMLRPC-171) unable to send the B64encoded data

Posted by "Jochen Wiedmann (JIRA)" <xm...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/XMLRPC-171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12710428#action_12710428 ] 

Jochen Wiedmann commented on XMLRPC-171:
----------------------------------------

Are you sure, it is the server who creates the message "Parse error"? The more likely reason is that the server fails and creates an invalid response. (For example, by adding PHP strings at an anvalid location.)

Anyways, please use tcpdump, wireshark, or a similar tool to trace the conversation between client and server and attach it to this bug report.



> 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
>   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.


[jira] Reopened: (XMLRPC-171) unable to send the B64encoded data

Posted by "Jagadeesh Uppala (JIRA)" <xm...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/XMLRPC-171?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jagadeesh Uppala reopened XMLRPC-171:
-------------------------------------


Jochen Wiedmann,

i have reported the issue with the guy who has done the PHP Server coding. 
He wrote the RPC client in PHP and injected the xmlpayload and the service didnt report any fault.. and it is storing the image into the server( which it is intended to )

In our case I suspect the XMLRPC client is not sending the full xml if it is long.. that might be the reason for the error message which was thrown by the PHP server..

Please advice me how to proceed

> 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.


[jira] Updated: (XMLRPC-171) unable to send the B64encoded data

Posted by "Jagadeesh Uppala (JIRA)" <xm...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/XMLRPC-171?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jagadeesh Uppala updated XMLRPC-171:
------------------------------------

    Attachment: failure.pcap
                success.pcap

Jochen Wiedmann,

Thanks for working on this ticket.

I have taken the help of wireshark application to trace the request and response from client to server and response.

I have seen this error coming from server...
The servers method name is : device.storePhoto
and the parameters for that service are
1) Session id which  is a string
2) textId which is a String
3) type which is a String
4) caption which is String
5) data which is an B64 encoded string. [ the jpg image file which was encoded to B64 data is being sent as part of this field]

The application is working fine if it is sending the photo data which is < 60Kb. but failing for the photosize which is more than this.


> 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
>         Attachments: failure.pcap, 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.