Thanks a lot Keith, it works fine now !
-----Original Message----- From: Keith Visco [mailto:[EMAIL PROTECTED]] Sent: mardi 16 juillet 2002 10:28 To: [EMAIL PROTECTED] Subject: Re: [castor-dev] Problem with node names generated when marshalling... Helene, Looks like the generated ClassDescriptors are not getting compiled. Make sure you compile all classes including the ***Descriptor.java files. Thanks, --Keith "ORTIZ,HELENE (Non-HP-France,ex1)" wrote: > > Hi, > > I'm using Castor 0.9.3.9 to : > > - generate Java classes from XSD file with SourceGenerator, > - marshall objects / unmarshall XML (using these generated Java classes) > > In my XSD file, I've a field named agent_id in class MyClass : > > <xs:attribute name="agent_id" > type="xs:string" use="required"/> > > In MyClass.java (generated by Castor SourceGenerator) there is a field named > _agent_id : > > private java.lang.String _agent_Id; > > ant two methods : > public java.lang.String getAgent_Id() > public void setAgent_Id(java.lang.String agent_Id) > > When I use marshall method, the _agent_id value is stored in a node named : > <agent_-id> > > But I want a node named <agent_id> ! > > I try using a mapping file but I get this error : > > exception org.exolab.castor.mapping.MappingException: Nested error: > org.exolab.castor.mapping.MappingException: > The method get_agent_Id in class xmlwrapper.MyClass accepting/returning > object of type class java.lang.String was not found occured during > AcceptVoucher > > Strange ? Castor has himself generated (with SourceGenerator) a method > called getAgent_Id() > but when marshalling it looks for a method named get + field name > (get_agent_Id) > > How can I do ? > Thanks for your help > Helene > > > > ----------------------------------------------------------- > If you wish to unsubscribe from this mailing, send mail to > [EMAIL PROTECTED] with a subject of: > unsubscribe castor-dev ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev
