What does the schema look like? Are the elements and/or anyType? The majority of times I've hit a similar issue it has to do with an incorrect namespace or incorrect type. In the case of incorrect type, it was usually my error using XXDocument when I needed XXType. HTH, -jacobd
On Thu, Feb 3, 2011 at 6:19 AM, Nicholas W <4...@log1.net> wrote: > Hi Cezar, > Thanks for your reply. errorList is empty, so there are no error > objects... > > Regards, > Nicholas W. > > On Wed, Feb 2, 2011 at 7:19 PM, Cezar Andrei <cezar.and...@oracle.com> > wrote: > > Nicholas, > > > > Did you try error.getObjectLocation()? Do you have any more details > > about the error? > > > > Cezar > > > > > > > > On Fri, 2011-01-28 at 15:48 +0100, Nicholas W wrote: > >> Hi All, > >> I am having some trouble unmarshalling data generated by a remote > >> REST web service (for which I have the XSD. > >> > >> I have set > >> > >> log4j.logger.org.apache.xmlbeans = DEBUG > >> > >> in log4j.properties > >> > >> and I am using code like: > >> > >> XmlOptions xmloptions = new XmlOptions(); > >> ArrayList errorList = new ArrayList(); > >> xmloptions.setErrorListener(errorList); > >> > >> FindObjectsResponseDocument f = > >> FindObjectsResponseDocument.Factory.parse(xmlresult,xmloptions); > >> > >> boolean valid = f.validate(); > >> if (!valid) { > >> for (int i = 0; i < errorList.size(); i++) > >> { > >> XmlError error = > (XmlError)errorList.get(i); > >> > >> System.out.println("\n"); > >> System.out.println("Message: " + > error.getMessage() + "\n"); > >> System.out.println("Location of invalid > XML: " + > >> error.getCursorLocation().xmlText() > + "\n"); > >> } > >> } > >> > >> To find out whats going on. > >> > >> However. Elements are null when they should not be, nothing is > >> reported in the logging and the errorList is empty. > >> > >> I would be greatful if you could point me to some resources to show > >> how to debug XMLBeans unmarshalling. > >> > >> Thanks a lot > >> Regards, > >> Nicholas W. > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org > >> For additional commands, e-mail: user-h...@xmlbeans.apache.org > >> > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org > > For additional commands, e-mail: user-h...@xmlbeans.apache.org > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org > For additional commands, e-mail: user-h...@xmlbeans.apache.org > >