your server is not configured to accept compressed requests, and hence is trying to run an XML parser over the compressed stream.


From: Martin Perez [mailto:[EMAIL PROTECTED]
Sent: Friday, November 18, 2005 5:51 AM
To: axis-user@ws.apache.org
Subject: problem with compression in Axis 1.3

Hi people.

I saw that in Axis 1.3 is possible to enable SOAP compression. Following Simon Fell example (http://www.pocketsoap.com/weblog/2005/10/1565.html) I put the next lines on my client code:

call = (Call) axisService.createCall();
call.setTargetEndpointAddress(endpoint);
call.setMaintainSession(true);

*** call.setProperty(HTTPConstants.MC_ACCEPT_GZIP, Boolean.TRUE);***
*** call.setProperty(HTTPConstants.MC_GZIP_REQUEST, Boolean.TRUE);***

call.setOperationName( "createUser");
call.addParameter( "ticket", XMLType.XSD_ANY, ParameterMode.IN );
call.addParameter( "userProperties", XMLType.XSD_ANY, ParameterMode.IN );
call.setReturnType( XMLType.XSD_ANY );          
return (User)call.invoke(new Object [] {ticket,userProperties});


I also added the CommonsHTTP client as suggested on the blog entry.

Then I executed a remote web service call and I used tcpmon to see the results. The request is successfully encrypted, but then an exception is thrown at the server:

Caused by: org.xml.sax.SAXParseException: Content is not allowed in prolog.
    at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
    at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
    at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
    at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
    at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
    at javax.xml.parsers.SAXParser.parse(SAXParser.java:353)
    at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
    at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
    at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
    at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
    at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
    at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
    at org.apache.axis.client.Call.invoke(Call.java:2767)
    at org.apache.axis.client.Call.invoke(Call.java:2443)
    at org.apache.axis.client.Call.invoke(Call.java:2366)
    at org.apache.axis.client.Call.invoke(Call.java:1812)
    at org.jlibrary.core.security.WSSecurityServiceImpl.login(WSSecurityServiceImpl.java:511)

Note that this exception does not happens if I use the traditional HTTPTransport and disable CommonsHTTPSender transport

Thanks for your help!

Martin

Reply via email to