Forums Register Login

Consuming JasperServer WS with Axis 2

+Pie Number of slices to send: Send
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)



Thanks in advance.
Oh sure, it's a tiny ad, but under the right circumstances, it gets bigger.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 2309 times.
Similar Threads
Error: java.lang.NoClassDefFoundError: org/apache/commons/digester/Digester
Inheritance and hibernate mapping issue
Problem in getting the datasource for mysql
NullPointerException while creating JMS connection
EOF Excepton trying to pass data from client to servlet
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 08:27:15.