You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@ws.apache.org by Inaki Ortiz <In...@sciops.esa.int> on 2006/04/11 14:21:35 UTC

Problems when enabling gzip compression

Dear all

I am having problems when enabling the request/response compression
mode. I am using xmlrpc-3.0a1.jar for both my client and my server. In
the client I run the following:

       config = new XmlRpcClientConfigImpl();
       config.setServerURL(serverURL);
       // enables faster and memory saving streaming mode
       config.setContentLengthOptional(true); 
        // enable vendor extensions to allow compression, data types
support ...
        config.setEnabledForExtensions(true);
        config.setGzipCompressing(true); // requests gzip compression
        config.setGzipRequesting(true);  // request server to gzip
response
                
        client = new XmlRpcClient();
        client.setConfig(config);  
        client.execute(...)      
        [...]

In the server I make use of the XmlRpcServlet class
(org.apache.xmlrpc.webserver package) embedded into Tomcat 5 and I have
set enabledForExtensions to true within the init parameters of the
servlet (web.xml file)

When I run a dummy request as it is described in the code above I get
the following exception:

org.apache.xmlrpc.XmlRpcException: Failed to parse XML-RPC request:
Content is not allowed in prolog.
at org.apache.xmlrpc.client.XmlRpcStreamTransport.readResponse
(XmlRpcStreamTransport.java:274)
at org.apache.xmlrpc.client.XmlRpcStreamTransport.sendRequest
(XmlRpcStreamTransport.java:216)
at org.apache.xmlrpc.client.XmlRpcClientWorker.execute
(XmlRpcClientWorker.java:53)
at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:166)
at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:136)
at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:125)
at esavo.voql.xmlrpc.MyXmlRpcClient.execute(MyXmlRpcClient.java:54)
at esavo.voql.xmlrpc.MyXmlRpcClient.main(MyXmlRpcClient.java:74)

If I comment the gzip compression out, both on the request and the
response) my test seems to work fine.

Have any of you experienced something similar? Am I doing something
wrong? I am not sure if I should set enabledForExtensions parameter in
the server side in they way I am doing (?)

Thanks in advance
--
Inaki


Re: Problems when enabling gzip compression

Posted by Jochen Wiedmann <jo...@gmail.com>.
Please, create a Jira issue. If possible, attach some source, which
demonstrates the problem.

Jochen

--
Whenever you find yourself on the side of the
majority, it is time to pause and reflect.
(Mark Twain)