Hi Som,

I don't understand from your email exactly what you're doing. Is the 
example.A class created by CodeGen from a schema definition? If so, and 
if the class corresponds to a global element definition in the schema, 
this code should work correctly.

Can you provide the definition of A from the schema?

  - Dennis

Dennis M. Sosnoski
XML and Web Services in Java
Training and Consulting
http://www.sosnoski.com - http://www.sosnoski.co.nz
Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117



Somdatta Kale wrote:
>
>  
>
> Hi,
>
>  
>
> I am trying to marshal the java object as follows:
>
>  
>
>                         StringWriter outputWriter = new StringWriter();
>
>                         IBindingFactory bfact = 
> BindingDirectory.getFactory(A.class);
>
>                         IMarshallingContext mctx = 
> bfact.createMarshallingContext();
>
>                         mctx.marshalDocument(request, "UTF-8", null, 
> outputWriter);        
>
>                         
> System.out.println(outputWriter.getBuffer().toString());
>
>  
>
>  
>
> But I am getting following error:
>
>  
>
> org.jibx.runtime.JiBXException: No marshaller defined for class example.A
>
>                 at 
> org.jibx.runtime.impl.MarshallingContext.getMarshaller(MarshallingContext.java:985)
>
>                 at example.A.marshal(A.java)
>
>                 at 
> org.jibx.runtime.impl.MarshallingContext.marshalRoot(MarshallingContext.java:1021)
>
>                 at 
> org.jibx.runtime.impl.MarshallingContext.marshalDocument(MarshallingContext.java:1104)
>
>                 at example.jibx.Test.main(Test.java:54)
>
>  
>
>  
>
> I am using a customization file which I use while creating binding out 
> of xsd file.
>
> Is there any way to define marshaller and unmarshaller for the classes?
>
>  
>
>  
>
> /Som
>
> DISCLAIMER ========== This e-mail may contain privileged and 
> confidential information which is the property of Persistent Systems 
> Ltd. It is intended only for the use of the individual or entity to 
> which it is addressed. If you are not the intended recipient, you are 
> not authorized to read, retain, copy, print, distribute or use this 
> message. If you have received this communication in error, please 
> notify the sender and delete all copies of this message. Persistent 
> Systems Ltd. does not accept any liability for virus infected mails.
>
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------
> The Planet: dedicated and managed hosting, cloud storage, colocation
> Stay online with enterprise data centers and the best network in the business
> Choose flexible plans and management services without long-term contracts
> Personal 24x7 support from experience hosting pros just a phone call away.
> http://p.sf.net/sfu/theplanet-com
> ------------------------------------------------------------------------
>
> _______________________________________________
> jibx-users mailing list
> jibx-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jibx-users
>   

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to