I found the problem. I am such an idiot! I didn't have xbean.jar in my application - it wasn't copied through the ant build file. Thanks for all the helpful comments though.
Its strange why my application just hung at the parse point and didn't throw an error. In fact I'm surprised it managed to build and deploy. Oh well, hopefully my experience will save someone else a few hours of work. Caroline. -----Original Message----- From: Don Stewart [mailto:[EMAIL PROTECTED] Sent: 18 July 2005 14:54 To: [email protected]; [EMAIL PROTECTED] Subject: RE: Parsing xml Sorrry to elaborate that will not sort out your problem but it will dump the structure that XMLBeans has parsed which may give you idea of what is actually going on internally. Don -----Original Message----- From: Don Stewart [mailto:[EMAIL PROTECTED] Sent: 18 July 2005 14:50 To: [email protected]; [EMAIL PROTECTED] Subject: RE: Parsing xml There are a number of things to try ... I would recommedn you try this one first String xml = .... XmlObject obj = XmlObject.Factory.parse(xml); System.out.println(obj.dump()); Regards Don -----Original Message----- From: Arek Stryjski [mailto:[EMAIL PROTECTED] Sent: 18 July 2005 14:10 To: [email protected] Subject: Re: Parsing xml > > Any ideas? Many thanks. :-) Not, not really :( I can see you have very nice debugging system, but I will put parsing in try-catch: try { testDocument = TestDocument.Factory.parse( event.getMessage().toString() ); test = testDocument.getTest(); LOGGER.debug("The id is " + test.getTest1()); } catch(Throwable ex) { ex.printStackTrace(); } I know it is stupid, but maybe it will help to get any information what is happening... In my opinion you should get NullPointerException or some debugging massage after parsing. ---- I just placed some test code in main of one class to test it: String s = "<test test2=\"test 2\" test1=\"test 1\" xmlns=\"http://cpp.co.uk/test\"/>"; uk.co.cpp.test.TestDocument doc = uk.co.cpp.test.TestDocument.Factory.parse(s); System.out.println("=" + doc.xmlText()); System.out.println("=" + doc.getTest().getTest1()); System.out.println("=" + doc.getTest().getTes2()); I got: =<test test2="test 2" test1="test 1" xmlns="http://cpp.co.uk/test"/> =test 1 =null It is null in second method because I did misspelling in Schema but not in XML. Call xmlText() to test what you have in this parsed document. Arek --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This is an email from the CPP Group Plc, Holgate Park, York, YO26 4GA; telephone 01904 544500. This message may contain information that is confidential. If you are not the intended recipient, you may not peruse, use, disseminate, distribute or copy this message. If you have received this message in error, please notify the sender immediately by email, facsimile or telephone and either return or destroy the original message. The CPP Group Plc accepts no responsibility for any changes made to this message after it has been sent by the original author. This email has been scanned for all viruses by the MessageLabs Email Security System. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

