ws-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Inaki Ortiz <Inaki.Or...@sciops.esa.int>
Subject Problems when enabling gzip compression
Date Tue, 11 Apr 2006 12:21:35 GMT
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


Mime
View raw message