Is there a Howto on sending a pojo as an attachment? For both packaging it up and unpackaging? (Marshal/Unmarshal) ?? TIA On Sun, 2006-12-31 at 13:40, moraleslos wrote:
> Yes, its needs to be XML unless you use something like a BinaryFileMarshaler > or similar where your POJO is sent as an attachment into the NMR. The > provider component must then expect it as an attachment in order to do > something useful. > > HTH, > > -los > > > Java Energizer wrote: > > > > Is there a working example somewhere? Or perhaps I am > > doing this wrong? I simply have a legacy java object > > that I need to convert to XML so that I can send it onto > > the NMR to other waiting Service Assemblies, that may > > be local or on another machine. Can I use a PoJo to > > send out via the NMR? Looks like it needs to be XML? > > > > > > On Sat, 2006-12-30 at 06:29, Java Energizer wrote: > > > >> I can do it standalone and it works OK, but > >> Attempt to marshal inside of servicemix fails. > >> Getting a JAXBContext context works fine, finds my package > >> that I created using the xjc.sh compiler. However, > >> the line to marshal into a DOM fails. > >> snip.... > >> JAXBContext jc = JAXBContext.newInstance( package.name ); > >> Marshal m = jc.createMarshaller(); > >> m.marshal( (ObjectFactory) obj, (Document) doc ); > >> .... > >> Fails with stack trace saying that my pakcage.name.obj is not known > >> to the JAXB context nor any of its super classes. Is this an indication > >> that servicemix needs to be identified as the provider? DO I need > >> to reference the package in an xbean.xml file somewhere? > >> OH, BTWY, this is running inside a PoJo that works as expected. > > > > > > -- > View this message in context: > http://www.nabble.com/Marshal-error-with-JAXB-in-servicemix-tf2898235s12049.html#a8109058 > Sent from the ServiceMix - User mailing list archive at Nabble.com.
