# JAXB CUSTOMIZATION PROBLEM



## holly (25. Jul 2005)

Hi!
Can anybody help me?! I try to make JAXB customization for java.util.Calender. I need to convert the date-field into java.util.Date-Formate. XML Scheme is follows:

...
<xs:simpleType name="newDate">
	<xs:annotation>
		<xs:appinfo>
		<jxb:javaType name="date.MyDate" printMethod="printDate" parseMethod="parseDate"/>
		</xs:appinfo>
	</xs:annotation>
<xs:restriction base="xs:date"/>
</xs:simpleType>
...

All jars and package "date" are located in path:jwsdp-1.4/jaxb/lib. To compile of XML Scheme(xsd) i use xjc-compiler: 

	xjc -cp date.MyDate myDate.xsd

I get the error mesage: unable to find type "date.MyDate". Make this class available via the -classpath option.


----------



## spoensche (26. Jul 2005)

Does your classpath point to your directory?


----------



## KISS (26. Jul 2005)

holly hat gesagt.:
			
		

> xjc -cp date.MyDate myDate.xsd



assuming your sources are located at $JWSDP_HOME/jaxb/lib/src/date/MyDate.class
your call must be replaced by xjc -cp $JWSDP_HOME/jaxb/lib/src/ myDate.xsd

the path date.MyDate is misleading, you have to specify the root of sources, not the qualified path

kind regards


----------

