Hi, 

I would like to share the actual thing that iam trying before posting my
real XSD 

We have dateTime element in our XSD. Sample XSD
Note with this simple XSD its getting compiled with Castor1.2. 

Myxsd.xsd
========
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema";> 
  <xsd:element name="purchaseOrder" type="PurchaseOrderType"/> 
  <xsd:element name="comment" type="xsd:string"/> 
  <xsd:complexType name="PurchaseOrderType"> 
    <xsd:sequence> 
      <xsd:element name="itemName" type="xsd:string"/> 
      <xsd:element name="itemQty" type="xsd:string"/> 
      <xsd:element name="orderDate" type="xsd:dateTime"/>  
    </xsd:sequence>    
  </xsd:complexType> 
</xsd:schema> 

If I use castor 0.9 and castor 1.2 and try to marshall and unmarshall
Iam getting the following.

Marshall (with castor 0.9.3)
=============================
<?xml version="1.0" encoding="UTF-8"?>
<purchase-order-type valid="true">
<order-date>2008-02-29T06:39:28.561</order-date>
<item-qty>Two</item-qty><item-name>One</item-name></purchase-order-type>

The output comes in local timezone (EST)

Marshall (with castor 1.2)
===============================
<?xml version="1.0" encoding="UTF-8"?>
<purchase-order-type valid="true">
<order-date>2008-02-29T06:39:28.561-05:00</order-date>
<item-qty>Two</item-qty><item-name>One</item-name></purchase-order-type>

The output comes in local timezone (but it adds -5:00 for GMT)

But When I try to UmMarshall Here is the output.

UnMarshall (with castor 0.9.2)
=================================
L:\work\src>java UnMarshaller
UnMarshalled Date Fri Feb 29 06:39:28 EST 2008

UnMarshall (with castor 1.2)
=================================
L:\work\src>java UnMarshaller
UnMarshalled Date Fri Feb 29 06:39:28 EST 2008

But the output here always comes as EST. What is the purpose of
appending (-5.00) with castor 1.2 for dateTime element.

I know that I can format this with simpledate formatter but the
formatted output is always of String Type.
I cant assign it back to order-date.

Our Middler tier team wants this value to be only in DateTime type.
They want in GMT timezone. Otherwise they face some issues during some
calculation.
We argued that we will send as String element instead of dateTime for
order-date. Which can be 
Accomplished easily by using simpledate format.

But they said with new castor1.2 version 
This issue is been taken care and no need to send it as String. 

But for me the output shows no difference between Castor0.9.2 and
cator1.2. Ami right ?
Where castor1.2 is using that (-5.00) value?

I tried to convert this to GMT by following code. Still getting the
above format

UnMarshaller.java
=================
public class UnMarshaller{

public static void main(String args[]){
try{

 final TimeZone GMT = TimeZone.getTimeZone("GMT");
Calendar cal = Calendar.getInstance(GMT);

FileReader reader = new FileReader("test1.xml");

// Marshal the PO object
PurchaseOrderType po= (PurchaseOrderType )
Unmarshaller.unmarshal(PurchaseOrderType.class, reader);
cal.setTime(po.getOrderDate());
System.out.println("UnMarshalled Date "+cal.getTime());  
}catch(Exception e){
  System.out.println("Exception "+e);
}
}
}

Is there any way to get the time in GMT format retaining the
xsd:dateTime attribute (not as String) ?

Thanks
Ravi.

-----Original Message-----
From: Werner Guttmann [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 27, 2008 3:30 PM
To: dev@castor.codehaus.org
Subject: Re: [castor-dev] Re: [castor-user] Re: [castor-dev] Error while
generating java source from XSD


Hi,

can you please create a new Jira issue at

http://jira.codehaus.org/browse/CASTOR

and attach everything I need to re-run your scenario. Please do not 
include any JARs, as I have them available.

Regards
Werner

Dayalan, Ravikumar wrote:
> HI,
> 
> I was using the same build file I was using for castor 0.9.x. so I 
> retained the java task.
> 
> I tried changing it to ant task and got hit by same issue
> 
> 
> L:\GC_Project\MessageObjectModel_WC>ant
> Buildfile: build.xml
> 
> generate_njm_mom:
>      [echo] generating MOM...
>      [echo] L:\GC_Project\MessageObjectModel_WC/src
> [castor-srcgen] Processing 
> L:\GC_Project\MessageObjectModel_WC\src\messageobjectmodel.xsd
> 
> BUILD FAILED
> java.lang.NoSuchMethodError: 
> org.exolab.castor.mapping.xml.ClassMapping.setAccess(Lorg/exolab/casto
> r/
> mapping/xml/types/A
> ccessType;)V
> 
> Total time: 24 seconds
> L:\GC_Project\MessageObjectModel_WC>
> 
> Modified build file looks like this
> 
>       <target name="generate_mom" >
>               <echo message="generating MOM..."/>
>                 
>               <delete dir="${code.build}"/>
>               <delete
dir="${code.src}/com/gwservices/cc/integration/mom/types"/>
>               <delete>
>                   <fileset
> dir="${code.src}/com/gwservices/cc/integration/mom"
includes="*.java"/>
>               </delete>
> 
>               <property name="workspace.target.dir"
> value="${code.src}"/>
>               <property name="PATHELEMENT" refid="path.base"/>
>                 <echo message="${code.src}"/>
>     <taskdef name="castor-srcgen"
>              classname="org.castor.anttask.CastorCodeGenTask"
>              classpathref="path.base" />
> 
>                 <castor-srcgen
file="${code.src}/messageobjectmodel.xsd"
>                    todir="${code.src}"
>                    package="com.gwservices.cc.integration.mom"
>                    types="j2"
>                    warnings="true" />
>       </target>
> 
>       <path id="path.base">
>               <fileset dir="${basedir}/lib">
>                         <include name="castor-1.2.jar"/> 
>                       <include name="castor-1.2-codegen.jar"/>
>                       <include name="commons-logging-1.0.4.jar"/>
>                         <include name="castor-1.2-xml-schema.jar"/>
>                           <include name="velocity-1.5.jar"/> <include 
> name="castor-1.2-anttasks.jar"/> ..
> ..
> 
> 
> Thanks Ravi
> 
> -----Original Message-----
> From: Werner Guttmann [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, February 27, 2008 3:13 AM
> To: [EMAIL PROTECTED]
> Cc: dev@castor.codehaus.org
> Subject: [castor-dev] Re: [castor-user] Re: [castor-dev] Error while
> generating java source from XSD
> 
> 
> Hi,
> 
> I have got a few more questions. As you are using Ant, why are you 
> *not*
> 
> using the Ant task definition as documented at
> 
> http://castor.org/srcgen-anttask.html
> 
> I know that this does not help you to resolve your problem, but it 
> might
> 
> reduce an unwanted dependency.
> 
> In addition, I can see that you are invoking the SourceGenerator class
> directly, where you should be using the SourceGeneratorMain class (as 
> documented at http://castor.org/srcgen-cline.html).
> 
> Having said that, if that does not help, can you please create a new
> Jira issue at
> 
> http://jira.codehaus.org/browse/CASTOR
> 
> and attach the Ant build file and everything else required to generate
> the classes (excluding the JARs) ?
> 
> Thanks
> Werner
> 
> Dayalan, Ravikumar wrote:
>> HI,
>>
>> Sorry for the delayed response.
>> I use ant build. Here is my build path info.
>>
>> <path id="path.base">
>> <fileset dir="${basedir}/lib">
>> <include name="castor-1.2.jar"/>
>> <include name="castor-1.2-codegen.jar"/>
>> <include name="commons-logging-1.0.4.jar"/>
>> <include name="castor-1.2-xml-schema.jar"/>
>> <include name="velocity-1.5.jar"/>
>> </fileset>
>> <fileset dir="${cc.toolkit.home}/lib">
>> <include name="*.jar"/>
>> </fileset>
>> <fileset dir="${env.commonlibs}">
>> <include name="*.jar"/>
>> </fileset>
>> <fileset dir="${env.commonlibs}/exclude">
>> <include name="*.jar" />
>> </fileset>
>> <pathelement path="${java.class.path}"/>
>> </path>
>>
>> I tried using this jar also  castor-1.2-xml.jar instead of
>> castor-1.2.jar but getting hit with same problem.
>>
>> For additional information iam putting the invocation also. (See this
>> I took from the working version of Castor0.9
>>
>>              <property name="PATHELEMENT" refid="path.base"/>
>>                 <echo message="${code.src}"/>
>>                  <java
>> className="org.exolab.castor.builder.SourceGenerator" fork="true" 
>> failonerror="true">
>>                      <arg value="verbose=true"/>
>>                      <arg value="-i"/>
>>                                                       
>>                      <arg
>> value="${code.src}/mymessageobjectmodel.xsd"/>
>>                      <arg value="-dest"/>
>>                      <arg value="${code.src}"/>
>>                      <arg
>> value="-packagecom.gwservices.cc.integration.mom"/>
>>      <!--
>>                      <arg value="-nodesc"/>
>>      -->
>>                      <arg value="-nomarshall"/>
>>                      <classpath refid="path.base"/>
>>              </java>
>>
>> Thanks
>> Ravi
>>
>> -----Original Message-----
>> From: Werner Guttmann [mailto:[EMAIL PROTECTED]
>> Sent: Monday, February 25, 2008 12:26 AM
>> To: dev@castor.codehaus.org
>> Cc: [EMAIL PROTECTED]
>> Subject: [castor-user] Re: [castor-dev] Error while generating java 
>> source from XSD
>>
>>
>> HI,
>>
>> what Castor JARs do you have on your classpath ?
>>
>> Regards
>> Werner
>>
>> Dayalan, Ravikumar wrote:
>>> Hi ,
>>>  
>>> I want to add one more point here..
>>> The same code was working when i was using castor 0.9.x version. its

>>> not working in castor 1.2
>>> any specifica reason ?
>>>  
>>> thanks
>>> Ravi.
>>>
>>>     -----Original Message-----
>>>     *From:* Dayalan, Ravikumar [mailto:[EMAIL PROTECTED]
>>>     *Sent:* Friday, February 22, 2008 3:20 PM
>>>     *To:* dev@castor.codehaus.org; [EMAIL PROTECTED]
>>>     *Subject:* [castor-dev] Error while generating java source from 
>>> XSD
>>>
>>>
>>>     Hi,
>>>     Iam using castor 1.2 version , I am referring to the latest jars
>> as
>>>     given in the site.
>>>     But I am getting the following error?
>>>     Any help will be much appreciated.
>>>
>>>          [echo] generating NJM MOM...
>>>          [echo] L:\GC_Project\MessageObjectModel_WC/src
>>>          [java] -- Disabling generation of Marshaling framework
>> methods
>>>     (marshal, unmarshal, validate).
>>>          [java] java.lang.NoSuchMethodError:
>>>     
>>> org.exolab.castor.mapping.xml.ClassMapping.setAccess(Lorg/exolab/cas
>>> t
>>> o
>>> r/mapping
>>>
>>>     /xml/types/AccessType;)V
>>>          [java]     at
>>>     
>>> org.exolab.castor.mapping.xml.ClassMappingDescriptor$7.setValue(Clas
>>> s
>>> M
>>> appingDescriptor.java:276)
>>>
>>>          [java]     at
>>>     
>>> org.exolab.castor.xml.handlers.EnumFieldHandler.setValue(EnumFieldHa
>>> n
>>> d
>>> ler.java:235)
>>>
>>>          [java]     at
>>>     
>>> org.exolab.castor.xml.UnmarshalHandler.setAttributeValueOnObject(Unm
>>> a
>>> r
>>> shalHandler.java:3127)
>>>
>>>          [java]     at
>>>     
>>> org.exolab.castor.xml.UnmarshalHandler.processAttribute(UnmarshalHan
>>> d
>>> l
>>> er.java:3074)
>>>
>>>          [java]     at
>>>     
>>> org.exolab.castor.xml.UnmarshalHandler.processAttributes(UnmarshalHa
>>> n
>>> d
>>> ler.java:2862)
>>>
>>>          [java]     at
>>>     
>>> org.exolab.castor.xml.UnmarshalHandler.startElement(UnmarshalHandler
>>> .
>>> j
>>> ava:2388)
>>>
>>>          [java]     at
>>>     
>>> org.exolab.castor.xml.UnmarshalHandler.startElement(UnmarshalHandler
>>> .
>>> j
>>> ava:1418)
>>>
>>>          [java]     at
>>>     org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown
>>>     Source)
>>>          [java]     at
>>>     org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown
>> Source)
>>>          [java]     at
>>>
>> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElemen
>> t
>> (U
>> nknown
>>>     Source)
>>>          [java]     at
>>>
>> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent
>> D
>> is
>> patcher.dispatch(Unknown
>>>     Sour
>>>
>>>     ce)
>>>          [java]     at
>>>
>> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un
>> k
>> no
>> wn
>>>     Source)
>>>          [java]     at
>>>     org.apache.xerces.parsers.XML11Configuration.parse(Unknown
> Source)
>>>          [java]     at
>>>     org.apache.xerces.parsers.XML11Configuration.parse(Unknown
> Source)
>>>          [java]     at
>> org.apache.xerces.parsers.XMLParser.parse(Unknown
>>>     Source)
>>>          [java]     at
>>>     org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
Source)
>>>          [java]     at
>>>     org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
>>>     Source)
>>>          [java]     at
>>>
>> org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:715)
>>>          [java]     at
>>>     
>>> org.castor.mapping.MappingUnmarshaller.loadMappingInternal(MappingUn
>>> m
>>> a
>>> rshaller.java:245)
>>>
>>>          [java]     at
>>>     
>>> org.castor.mapping.MappingUnmarshaller.getMappingLoader(MappingUnmar
>>> s
>>> h
>>> aller.java:153)
>>>
>>>          [java]     at
>>>     
>>> org.castor.mapping.MappingUnmarshaller.getMappingLoader(MappingUnmar
>>> s
>>> h
>>> aller.java:128)
>>>
>>>          [java]     at
>>>
>> org.exolab.castor.xml.Unmarshaller.setMapping(Unmarshaller.java:541)
>>>          [java]     at
>>>     
>>> org.exolab.castor.xml.schema.SimpleTypesFactory.loadTypesDefinitions
>>> (
>>> S
>>> impleTypesFactory.java:427)
>>>
>>>          [java]     at
>>>     
>>> org.exolab.castor.xml.schema.SimpleTypesFactory.getType(SimpleTypesF
>>> a
>>> c
>>> tory.java:393)
>>>
>>>          [java]     at
>>>     
>>> org.exolab.castor.xml.schema.SimpleTypesFactory.getBuiltInType(Simpl
>>> e
>>> T
>>> ypesFactory.java:205)
>>>
>>>          [java]     at
>>>
>> org.exolab.castor.xml.schema.Schema.getSimpleType(Schema.java:1284)
>>>          [java]     at
>>>     org.exolab.castor.xml.schema.Schema.getType(Schema.java:2120)
>>>          [java]     at
>>>     
>>> org.exolab.castor.xml.schema.reader.ExtensionUnmarshaller.<init>(Ext
>>> e
>>> n
>>> sionUnmarshaller.java:126)
>>>
>>>          [java]     at
>>>     
>>> org.exolab.castor.xml.schema.reader.SimpleContentUnmarshaller.startE
>>> l
>>> e
>>> ment(SimpleContentUnmarshaller.
>>>
>>>     java:167)
>>>          [java]     at
>>>     
>>> org.exolab.castor.xml.schema.reader.ComplexTypeUnmarshaller.startEle
>>> m
>>> e
>>> nt(ComplexTypeUnmarshaller.java
>>>
>>>     :283)
>>>          [java]     at
>>>     
>>> org.exolab.castor.xml.schema.reader.SchemaUnmarshaller.startElement(
>>> S
>>> c
>>> hemaUnmarshaller.java:484)
>>>
>>>          [java]     at
>>>     
>>> org.exolab.castor.xml.schema.reader.Sax2ComponentReader.startElement
>>> (
>>> S
>>> ax2ComponentReader.java:255)
>>>
>>>          [java]     at
>>>     org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown
>>>     Source)
>>>          [java]     at
>>>
>> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElemen
>> t
>> (U
>> nknown
>>>     Source)
>>>          [java]     at
>>>
>> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent
>> D
>> is
>> patcher.dispatch(Unknown
>>>     Sour
>>>
>>>     ce)
>>>          [java]     at
>>>
>> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un
>> k
>> no
>> wn
>>>     Source)
>>>          [java]     at
>>>     org.apache.xerces.parsers.XML11Configuration.parse(Unknown
> Source)
>>>          [java]     at
>>>     org.apache.xerces.parsers.XML11Configuration.parse(Unknown
> Source)
>>>          [java]     at
>> org.apache.xerces.parsers.XMLParser.parse(Unknown
>>>     Source)
>>>          [java]     at
>>>     org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
Source)
>>>          [java]     at
>>>     org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
>>>     Source)
>>>          [java]     at
>>>     
>>> org.exolab.castor.builder.SourceGenerator.generateSource(SourceGener
>>> a
>>> t
>>> or.java:613)
>>>
>>>          [java]     at
>>>     
>>> org.exolab.castor.builder.SourceGenerator.generateSource(SourceGener
>>> a
>>> t
>>> or.java:548)
>>>
>>>          [java]     at
>>>     
>>> org.exolab.castor.builder.SourceGeneratorMain.main(SourceGeneratorMa
>>> i
>>> n
>>> .java:309)
>>>
>>>          [java] Exception in thread "main"
>>>
>>>     BUILD FAILED
>>>
>>>     Thanks
>>>     Ravi.
>>>
>>>     =========================================================
>>>     The information in this transmission is intended for official
use
>>>     only and may contain information from NJM Insurance Group that
is
>>>     privileged, confidential and exempt from disclosure under
>> applicable
>>>     law. It is intended for the exclusive use of the persons or
>> entities
>>>     to which it is addressed. If you are not an intended recipient
or
>>>     the employee or agent responsible for delivering this
> transmission
>>>     to an intended recipient, be aware that any disclosure,
>>>     dissemination, distribution or copying of this communication, or
>> the
>>>     use of its contents, is strictly prohibited. If you received
this
>>>     transmission in error, please notify the sender by return e-mail
>> and
>>>     delete the material from any computer.
>>>     =========================================================
>>>
>>> =========================================================
>>> The information in this transmission is intended for official use
>>> only and may contain information from NJM Insurance Group that is
>> privileged,
>>> confidential and exempt from disclosure under applicable law. It is 
>>> intended for the exclusive use of the persons or entities to which 
>>> it
>> is
>>> addressed. If you are not an intended recipient or the employee or
>> agent
>>> responsible for delivering this transmission to an intended
>>> recipient,
>>> be aware that any disclosure, dissemination, distribution or copying
>> of
>>> this communication, or the use of its contents, is strictly
>> prohibited.
>>> If you received this transmission in error, please notify the sender
>> by
>>> return e-mail and delete the material from any computer.
>>> =========================================================
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>     http://xircles.codehaus.org/manage_email
>>
>>
>>
>> =========================================================
>> The information in this transmission is intended for official use 
>> only
> 
>> and may contain information from NJM Insurance Group that is
>> privileged, confidential and exempt from disclosure under applicable 
>> law.  It is intended for the exclusive use of the persons or entities

>> to which it is addressed.  If you are not an intended recipient or
the
> 
>> employee or agent responsible for delivering this transmission to an
>> intended recipient, be aware that any disclosure, dissemination, 
>> distribution or copying of this communication, or the use of its 
>> contents, is strictly prohibited.  If you received this transmission 
>> in error, please notify the sender by return e-mail and delete the 
>> material from any computer. 
>> =========================================================
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>     http://xircles.codehaus.org/manage_email
>>
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
> 
>     http://xircles.codehaus.org/manage_email
> 
> 
> 
> =========================================================
> The information in this transmission is intended for official use only

> and may contain information from NJM Insurance Group that is 
> privileged, confidential and exempt from disclosure under applicable 
> law.  It is intended for the exclusive use of the persons or entities 
> to which it is addressed.  If you are not an intended recipient or the

> employee or agent responsible for delivering this transmission to an 
> intended recipient, be aware that any disclosure, dissemination, 
> distribution or copying of this communication, or the use of its 
> contents, is strictly prohibited.  If you received this transmission 
> in error, please notify the sender by return e-mail and delete the 
> material from any computer. 
> =========================================================
> 
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
> 
>     http://xircles.codehaus.org/manage_email
> 
> 
> 

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



=========================================================
The information in this transmission is intended for official use only and may 
contain information from NJM Insurance Group that is privileged, confidential 
and exempt from disclosure under applicable law.  It is intended for the 
exclusive use of the persons or entities to which it is addressed.  If you are 
not an intended recipient or the employee or agent responsible for delivering 
this transmission to an intended recipient, be aware that any disclosure, 
dissemination, distribution or copying of this communication, or the use of its 
contents, is strictly prohibited.  If you received this transmission in error, 
please notify the sender by return e-mail and delete the material from any 
computer.
=========================================================
<?xml version="1.0" encoding="UTF-8"?> 
<project name="MessageObjectModel" default="jar" basedir="."> 
        <property file="build.properties" /> 
        <property environment="env"/> 
        <property name="code.src" value="${basedir}/src"/> 
        <property name="code.build" value="${basedir}/classes"/> 
        <property name="dist" value="${cc}/lib"/> 
        <property name="local.dist" value="${basedir}/dist"/> 
       
       
        <path id="path.base"> 
                <fileset dir="${basedir}/lib"> 
                        <include name="castor-1.2.jar"/> 
                        <include name="castor-1.2-codegen.jar"/> 
                        <include name="commons-logging-1.0.4.zip"/> 
                        <include name="castor-1.2-xml-schema.jar"/> 
                        <include name="velocity-1.5.jar"/> 
                        <include name="castor-1.2-anttasks.jar"/> 
                        <include name="log4j-1.2.8.jar"/> 
             
                </fileset> 
                
                <pathelement path="${java.class.path}"/> 
        </path> 

        <path id="path.compile"> 
                <fileset dir="${basedir}/lib"> 
                        <include name="castor-1.2.jar"/> 
                        <include name="castor-1.2-codegen.jar"/> 
                        <include name="commons-logging-1.0.4.zip"/> 
                        <include name="castor-1.2-xml-schema.jar"/> 
                       <include name="castor-1.2-anttasks.jar"/> 
                       <include name="velocity-1.5.jar"/> 
                       <include name="log4j-1.2.8.jar"/> 
                </fileset> 
                
                <pathelement path="${java.class.path}"/> 
        </path> 



        <target name="init"> 
                <echo message="About to call echo properties before castor..."/> 
                <property name="echo.classpath" refid="path.base"/>    
                <echo message="${echo.classpath}"/>     
        </target> 



        <target name="generate_njm_mom" > 
                <echo message="generating NJM MOM..."/> 
                  
                <!--<delete dir="${code.build}"/> 
            <delete dir="${code.src}/com/gwservices/cc/integration/mom/types"/> 
                <delete> 
                    <fileset dir="${code.src}/com/gwservices/cc/integration/mom" includes="*.java"/> 
                </delete> -->

                <property name="workspace.target.dir" value="${code.src}"/> 
                <property name="PATHELEMENT" refid="path.base"/> 
                <echo message="${code.src}"/> 
             <taskdef name="castor-srcgen" 
             classname="org.castor.anttask.CastorCodeGenTask" 
             classpathref="path.base" /> 

                <castor-srcgen file="${code.src}/myxsd.xsd" 
                   todir="${code.src}" 
                   package="com.gwservices.cc.integration.mom" 
                   types="j2" 
                   warnings="true" /> 
        </target> 







        <target name="compile" description="Builds the source code." > 
                 <echo message="Compile ${code.src} - ${code.build} " /> 
                <echo message="${path.compile}"/> 
                <mkdir dir="${basedir}/classes"/> 
                <javac srcdir="${code.src}" destdir="${code.build}" debug="on" > 
                        <classpath refid="path.compile"/> 
                </javac> 
        </target> 

        <target name="build" depends="generate_njm_mom, compile"> 
                <echo message="Preprocessed Integration successfully"/> 
        </target> 

        <target name="jar" depends="build,manifest"> 
                <mkdir dir="${local.dist}"/> 
                <jar destfile="${local.dist}/mom.jar" 
                         basedir="${code.build}" 
                         excludes="${code.build}/package cache" /> 
                 <echo message="Built version ${version} of mom.jar " /> 
        </target> 





        <target name="manifest"> 
          <tstamp> <format property="build.date" pattern="MMddyyyy"/></tstamp> 
          <filter token="version" value="${version}" /> 
          <filter token="build.date" value="${build.date}" /> 
          

        </target> 

</project> 

Attachment: myxsd.xsd
Description: myxsd.xsd

Attachment: MyXSDTest.java
Description: MyXSDTest.java

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to