axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Perez <mper...@gmail.com>
Subject problem with compression in Axis 1.3
Date Fri, 18 Nov 2005 13:51:21 GMT
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

Mime
View raw message