axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Webb (JIRA)" <>
Subject [jira] Created: (AXIS2-4854) Cannot read IncomingAttachmentInputStream from Inbound Attachments
Date Fri, 15 Oct 2010 18:18:34 GMT
Cannot read IncomingAttachmentInputStream from Inbound Attachments

                 Key: AXIS2-4854
             Project: Axis2
          Issue Type: Bug
    Affects Versions: 1.5.1
         Environment: WSDL2CODE 1.4.1 generated stubs
Running inside:
JBoss [The Oracle] 5.1.0.GA (build: SVNTag=JBoss_5_1_0_GA date=200905221634
Java version: 1.6.0_18,Sun Microsystems Inc.
Java Runtime: Java(TM) SE Runtime Environment (build 1.6.0_18-b07)
Java VM: Java HotSpot(TM) 64-Bit Server VM 16.0-b13,Sun Microsystems Inc.
OS-System: Windows 7 6.1,amd64
VM arguments: -agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:49743 -javaagent:C:\Program
Files (x86)\ZeroTurnaround\JRebel\jrebel.jar -Xverify:none -Drebel.struts1-plugin=true -Dorg.apache.jasper.runtime.JspFactoryImpl.USE_POOL=false
-Dorg.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false -Djava.endorsed.dirs=C:/jboss-5.1.0.GA/bin/../lib/endorsed
-Xms1024m -Xmx1024m -XX:NewRatio=3 -XX:PermSize=128m -XX:MaxPermSize=256m -Dfile.encoding=Cp1252

Axis2 1.5.1
Axiom 1.2.9
            Reporter: David Webb

I am using Axis2 to call a webservice on jasperserver (Jasper Reports).  The web service that
I am calling works fine with stub generated for Axis.  I have discovered this issue trying
to upgrade all my clients to Axis2.

The webservice I am calling returns an attachment in the MessageContext with the contentID
of "jasperPrint".  When I try to access this attachment using either the attachments.getIncomingAttachmentStreams,
or the attachments.getDataHandler("jasperPrint"),  I get the following Exception when trying
to read the input stream. Attempted read on closed stream.
	at org.apache.commons.httpclient.AutoCloseInputStream.isReadAllowed(
	at org.apache.axiom.attachments.BoundaryDelimitedStream.readFromStream(

Here is the example code that generated the problem.

				IncomingAttachmentStreams streams = InContext.attachments.getIncomingAttachmentStreams();
				boolean bFound = false;
				while (streams != null && streams.isReadyToGetNextStream() && !bFound)
					IncomingAttachmentInputStream stream = streams.getNextStream();
					Log.write(this, DEBUG, stream.getContentId());
					if (stream.getContentId().equals("<jasperPrint>")) {
						DataHandler dh = new DataHandler(new InputStreamDataSource(stream));
						ObjectInputStream obj = new ObjectInputStream(dh.getInputStream());
						attach = (JasperPrint)obj.readObject();
						bFound = true;

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message