axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Isuru Eranga Suriarachchi (JIRA)" <>
Subject [jira] Resolved: (AXIS2-4417) "Block already consumed" error in JAXWS services
Date Thu, 25 Mar 2010 11:36:27 GMT


Isuru Eranga Suriarachchi resolved AXIS2-4417.

    Resolution: Fixed

> "Block already consumed" error in JAXWS services
> ------------------------------------------------
>                 Key: AXIS2-4417
>                 URL:
>             Project: Axis2
>          Issue Type: Bug
>          Components: jaxws
>            Reporter: Isuru Eranga Suriarachchi
>            Assignee: Isuru Eranga Suriarachchi
>         Attachments:, axis2-jaxws-sample.jar
> I'm attaching my sample jaxws service and its source code.
> In JAXWS services, body and header parts are kept as org.apache.axis2.jaxws.message.impl.BlockImpl
objects. These message blocks are read before invoking the service and all are set as "consumed".
> But in this sample service, I want to access Reference Parameters and I've done that
using the following line.
> List<Element> referenceParam = (List<Element>) context.getMessageContext().get(MessageContext.REFERENCE_PARAMETERS);
> And also this service is expecting a header which is called "TestHeader" and it is already
consumed when the execution comes into the service. But above access to reference parameters
calls the getXMLStreamReader of the BlockInmpl object of the header block. As it is already
consumed, it gives the following exception.
> Caused by: An internal error occurred. The org.apache.axis2.jaxws.message.databinding.impl.JAXBBlockImpl
block object is already consumed. Processing cannot continue.  Run with the debug option to
determine where the block was first consumed.
> 	at org.apache.axis2.jaxws.ExceptionFactory.createWebServiceException(
> 	at org.apache.axis2.jaxws.ExceptionFactory.makeWebServiceException(
> 	at org.apache.axis2.jaxws.ExceptionFactory.makeWebServiceException(
> 	at org.apache.axis2.jaxws.message.impl.BlockImpl.getXMLStreamReader(
> 	at org.apache.axis2.jaxws.message.impl.BlockImpl.getReader(
> 	at
> 	at
> 	at
> 	at org.apache.axis2.jaxws.addressing.util.ReferenceParameterList.initialize(
> 	at org.apache.axis2.jaxws.addressing.util.ReferenceParameterList.size(
> 	at java.util.AbstractList$Itr.hasNext(
> 	at org.axis2.jaxws.sample.TestServiceImpl.newOperation(
> So how can I access the reference parameters in the service?
> Thanks,
> ~Isuru

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