Here is the schema element: <xsd:simpleType name="inputDocType"> <xsd:restriction base="xsd:string"> <xsd:enumeration value="TEXT"/> <xsd:enumeration value="XML"/> <xsd:enumeration value="HTML"/> <xsd:enumeration value="PDF"/> <xsd:enumeration value="MSWORD"/> <xsd:enumeration value="MSEXCEL"/> </xsd:restriction> </xsd:simpleType>
Here is the exception. org.exolab.castor.mapping.MappingException: The Java class net.d2lab.mets.mtrschema.types.InputDocType is not constructable -- it does not contain a default public constructor at org.exolab.castor.xml.XMLMappingLoader.createClassDescriptor(XMLMappingLoader.java:190) at org.exolab.castor.mapping.loader.AbstractMappingLoader.createClassDescriptors(AbstractMappingLoader.java:180) at org.exolab.castor.xml.XMLMappingLoader.loadMapping(XMLMappingLoader.java:159) at org.castor.mapping.MappingUnmarshaller.getMappingLoader(MappingUnmarshaller.java:132) at org.castor.mapping.MappingUnmarshaller.getMappingLoader(MappingUnmarshaller.java:99) at org.exolab.castor.xml.Unmarshaller.setMapping(Unmarshaller.java:515) at net.d2lab.mets.webservice.server.GenerateOWLDocument.isRequestDocumentValid(GenerateOWLDocument.java:1244) at net.d2lab.mets.webservice.server.GenerateOWLDocument.processDocument(GenerateOWLDocument.java:331) at net.d2lab.mets.webservice.server.GenerateOWLDocument_TEST.testSubmitRequestDocumentInputFromSourceDocElement(GenerateOWLDocument_TEST.java:134) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196) > Well, an enum-type class should simply not have a public constructor. > Are you getting any exceptions ? Or how does the problem manifest > itself, iima ? > > Werner > > [EMAIL PROTECTED] wrote: >> Hi, >> This simple schema produces a type object with a private constructor >> that cannot be unmarshalled. How to fix? >> >> <xs:simpleType name="outputType"> >> >> <xs:restriction base="xs:string"> >> >> <xs:enumeration value="OWL"/> >> >> <xs:enumeration value="ILM"/> >> >> <xs:enumeration value="both"/> >> >> </xs:restriction> >> >> </xs:simpleType> >> >> ---------- >> >> //----------------/ >> //- Constructors -/ >> //----------------/ >> >> private OutputType(final int type, final java.lang.String value) { >> super(); >> this.type = type; >> this.stringValue = value; >> } >> >> >> Thanks for help on this critical problem! >> >> Darren >> >> --------------------------------------------------------------------- >> 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 > > --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email