Hi.

Thanks.    Changing to the non-static method caused my CalendarFieldHandler
to be called.

Now, my question is, how to I tell castor to use the default mapping for
any fields that are not included in my mapping.xml.

The way it is now, only the reviewDate field is being output, all other
fields are ignored.

I guess one option is to use the mapping tool to generate a mapping.xml and
then add my Calendar fields to that.

Rick Bos
ext 2780


                                                                                       
                                              
                      Keith Visco                                                      
                                              
                      <[EMAIL PROTECTED]        To:       [EMAIL PROTECTED]            
                                           
                      om>                      cc:                                     
                                              
                                               Subject:  Re: [castor-dev] Mapping 
Calendar fields                                    
                      03/02/2004 04:04                                                 
                                              
                      PM                                                               
                                              
                      Please respond to                                                
                                              
                      castor-dev                                                       
                                              
                                                                                       
                                              
                                                                                       
                                              






That's the problem, you're calling the *static* marshal method, so your
mapping will never be used...you must change this to call a non-static
method...see below.

[EMAIL PROTECTED] wrote:
>
> Here is how I save the XML  to the file policy.xml:
>
>                   FileWriter file = new FileWriter("policy.xml");
>                   PolicyType policy = new PolicyType();
>                   policy.setInfo(infoRequest_);
>                   policy.setVehicles( new VehicleRequest [] {
> vehicleRequest_, vehicleRequest_ } );
>                   Mapping mapping = new Mapping();
>                   mapping.loadMapping("mapping.xml");
>                   Marshaller marshaller =  new Marshaller(file);
>                   marshaller.setMapping(mapping);
>                   marshaller.marshal(policy, file);

Change this line to:

marshaller.marshal(policy);

--Keith

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.

-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev







-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to