I am trying to upgrade my WebService Clients from axis to axis2. One of my services is the jasperserver web service interface. I have generated the Client code using wsdl2code and I am able to call the Jasperserver WS without an issue. The problem I am having is with the returned binary object attachment. Here is how I am trying to get the attachment and the stacktrace that is being thrown. Is this indeed the proper way to get the attachment from the MessageContext after the call?
When the returned object is small (ie no report data) this all works, but when the report has some substance I get this error (which is thrown from the second line of my code example) when I call
Here is the exact error:
09:38:17,073 ERROR [STDERR] org.apache.axiom.om.OMException: java.io.IOException: Attempted read on closed stream.
09:38:17,073 ERROR [STDERR] at org.apache.axiom.attachments.impl.PartFactory.createPart(PartFactory.java:172)
09:38:17,073 ERROR [STDERR] at org.apache.axiom.attachments.Attachments.getPart(Attachments.java:705)
09:38:17,073 ERROR [STDERR] at org.apache.axiom.attachments.Attachments.getNextPartDataHandler(Attachments.java:623)
09:38:17,074 ERROR [STDERR] at org.apache.axiom.attachments.Attachments.fetchAllParts(Attachments.java:503)
09:38:17,074 ERROR [STDERR] at org.apache.axiom.attachments.Attachments.getAllContentIDs(Attachments.java:519)