When calling DocumentManagement.listNodes() for a container sometimes the following error is thrown:
Caused by: java.lang.IllegalStateException: Method getLocalName() cannot be called for CHARACTERS event.at java.xml/com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.getLocalName(XMLStreamReaderImpl.java:366)at com.sun.xml.ws.util.xml.XMLStreamReaderFilter.getLocalName(XMLStreamReaderFilter.java:164) at com.sun.xml.ws.streaming.XMLStreamReaderUtil.verifyTag(XMLStreamReaderUtil.java:213)at com.sun.xml.ws.streaming.XMLStreamReaderUtil.verifyTag(XMLStreamReaderUtil.java:222)at com.sun.xml.ws.client.sei.ResponseBuilder$DocLit.readResponse(ResponseBuilder.java:524) at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:121) at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:89) at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:118)
at com.sun.proxy.$Proxy37.listNodes(Unknown Source)
The error is thrown because there is one or more unprintable character in one of the sub nodes metadata so they are not escaped in the response SOAP message. In this case the return XML is invalid and cannot be parsed by the generated stub.
Does anyone know a solution/patch for this issue?
Thanks!
Vasile.