Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Consuming JasperServer WS with Axis 2

David Webb
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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] Attempted read on closed stream.
09:38:17,073 ERROR [STDERR] at org.apache.axiom.attachments.impl.PartFactory.createPart(
09:38:17,073 ERROR [STDERR] at org.apache.axiom.attachments.Attachments.getPart(
09:38:17,073 ERROR [STDERR] at org.apache.axiom.attachments.Attachments.getNextPartDataHandler(
09:38:17,074 ERROR [STDERR] at org.apache.axiom.attachments.Attachments.fetchAllParts(
09:38:17,074 ERROR [STDERR] at org.apache.axiom.attachments.Attachments.getAllContentIDs(

Thanks in advance.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic