Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Axis - Premature end of file (Desperate!)

843834Oct 24 2005
Hello guys,

I am developing a simple XMLSignature (using Apache's XML-Sec v1.2.1) web service on a Tomcat v5.5.12 / Axis v1.3 installation (happyaxis.jsp is totally happy). The service performs signing and verification of Documents.

The service call to the signing procedure completes successfully. In the verification procedure, though, I get the following error from Axis:
AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode: 
 faultString: org.xml.sax.SAXParseException: Premature end of file.
 faultActor: 
 faultNode: 
 faultDetail: 
	{http://xml.apache.org/axis/}stackTrace:org.xml.sax.SAXParseException:Premature end of file.
...
}
According to another post, here in Sun's forums (reply 2 of 4 of http://forum.java.sun.com/thread.jspa?messageID=3790406), the error occurs when Axis is trying to download a schema. At some point in my verification code I have the following line:
NodeList xmlSigs = root.getElementsByTagNameNS(
	"http://www.w3.org/2001/09/xmldsig#", "Signature");
I have tried other methods, using root.getElementsByTagName("Signature") or downloading the xsd file and setting the NamespaceURI locally to my server (http://localhost/xmldsig#) but none worked. Note that I can test-run my code's jar file in Eclipse (not as a service but as an application) and it runs fine.

If this is indeed the reason of the "premature end of file" error I should note that I have to run the server behind a proxy. For this I have tried to set proxyName="10.0.0.1" and proxyPort="8002" in server.xml HTTP Connector, but again no success. However, in Eclipse, the code works fine with or without proxy!

I am ruther unsure if the above schema lookup is the reason of error, or some other "bug" is involved... I will provide further details (code/settings) if you need them.

Thanks in advance for your help.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 21 2005
Added on Oct 24 2005
0 comments
337 views