You are viewing a plain text version of this content. The canonical link for it is here.
Posted to muse-user@ws.apache.org by "Vinh Nguyen (vinguye2)" <vi...@cisco.com> on 2006/11/08 10:06:20 UTC

xmlbeans and muse

Hi all,
I'm using XmlBeans with Muse for working with custom object types.  Can
anyone help with the following code?  Basically, I'm trying to convert a
bean object to an xml Element object, which I can then pass to the
NotificationsProducer to send out notifications containing a custom
object.  Then, later on the consumer side, I want to translate the xml
back to the bean.  The problem is how to do the conversion to an
Element.  I've tried several ways without success, or perhaps it's
because after seeing various xml output forms, I'm getting confused with
what the xml should look like in the console trace.  Any help is
appreciated. Thanks!
-Vinh
 
BoxDocument doc = BoxDocument.Factory.newInstance();
BoxType type = doc.addNewBoxType();
type.setWidth(100);
type.setHeight(100);
 
Element payload = ... ?
 
QName name = ...
NotificationProducer np = ...
np.publish(name, payload);