It is more than possible to use work with fragments or different schema types and not a whole document. In your code below, try something like: Request request = new Request.Factory.newInstance();
Also, I'm not sure if this line: request.setOper(OperType.CLEAN); is correct as I'm not used to seeing XmlBean types with Static values without having been initialized first. This should get you past the NPE you are seeing. -----Original Message----- From: avin98 [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 29, 2006 6:18 PM To: [email protected] Subject: Creating XML fragments Hi, Is there a way to create just simple plain XML fragments instead of the entire XML doc itself. In short I am trying to use something like: Request request = new RequestImpl(Request.type); request.setData("DATA"); request.setId("ID"); request.setOper(OperType.CLEAN); But it fails with a java.lang.NullPointerException Any Help -- View this message in context: http://www.nabble.com/Creating-XML-fragments-tf2187250.html#a6050839 Sent from the Xml Beans - User forum at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _______________________________________________________________________ Notice: This email message, together with any attachments, may contain information of BEA Systems, Inc., its subsidiaries and affiliated entities, that may be confidential, proprietary, copyrighted and/or legally privileged, and is intended solely for the use of the individual or entity named in this message. If you are not the intended recipient, and have received this message in error, please immediately return this by email and then delete it. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

