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