Hi,
This is caused when someone accesses the parser without caching
'before' the databinding conversion (It is not at all recommended). It
is likely to happen by a handler in between. Do you have any custom
modules installed ?

Ajith


On 6/19/06, heikki <[EMAIL PROTECTED]> wrote:
Hallo,

I'm using Axis2 to create a service that is accessed in REST style.

The MyServiceMessageReceiverInOut class, which was generated by Axis2's
WSDL2Java utility, causes the following exception when I access the service
in REST style :

java.lang.UnsupportedOperationException: The parser is
already consumed!
at
org.apache.axiom.om.impl.llom.OMElementImpl.getXMLStreamReader(OMElementImpl.java:635)
[... more ...]

The following change to the method fromOM() in MyServiceMessageReceiverInOut
fixed it :

    public org.apache.xmlbeans.XmlObject
fromOM(org.apache.axiom.om.OMElement param, java.lang.Class type,
java.util.Map extraNamespaces) {
        try {
            if (MyRQDocument.class.equals(
                        type)) {
                if (extraNamespaces != null) {
                    //
                    // replaced this line :
                    //
                    // return
MyRQDocument.Factory.parse(param.getXMLStreamReaderWithoutCaching
(),
                    //
                    // by this line :
                    //
                    return
MyRQDocument.Factory.parse(param.getXMLStreamReader(),
                        new
org.apache.xmlbeans.XmlOptions().setLoadAdditionalNamespaces(
                            extraNamespaces));
                } else {
                    return
MyRQDocument.Factory.parse(param.getXMLStreamReaderWithoutCaching
());
                }
            }
         [... more ...]

Has someone had a similar error? Can someone explain what is going on here,
and whether applying this fix is a viable solution?

thank you,
Heikki Doeleman




--
Ajith Ranabahu

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to