Hi, I have not used Castor in a long time.
I am getting error (in red) when trying to generate java classes. It goes away when I remove the first line of the xsd. Is there something I need to configure or change when creating classes? Any help will be greatly appreciated. Error message from run: Parsing Error : Declared encoding "UTF-8" does not match actual one "Cp1252"; Thanks, John --------------------------------------------------------- BEGINNING of xsd file. The <?xml version... first line causes the error message. <?xml version="1.0" encoding="UTF-8"?> <xsd:schema targetNamespace="http://www.qwest.com/XMLSchema" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:qw="http://www.qwest.com/XMLSchema" elementFormDefault="qualified"> <xsd:include schemaLocation = "LimsRequest_v01_00.xsd"/> ----------------------------------------------------------------------------------- PART of script to generate java classes. cp=\ ../castor-1.2/castor-1.2-jdo.jar\;\ ../castor-1.2/castor-1.2-anttasks.jar\;\ ../castor-1.2/castor-1.2-xml-schema.jar\;\ ../castor-1.2/castor-1.2-codegen.jar\;\ ../castor-1.2/castor-1.2-xml.jar\;\ ../castor-1.2/jta1.0.1.jar\;\ ../castor-1.2/castor-1.2-ddlgen.jar\;\ ../castor-1.2/castor-1.2.jar\;\ ../commons-logging-1.1.1/commons-logging-1.1.1.jar\;\ ../velocity-1.6.1/velocity-1.6.1.jar java -cp $cp org.exolab.castor.builder.SourceGeneratorMain \ -i $xsd -package $package -dest ../gen -verbose \ -generateImportedSchemas true ---------------------------------- OUTPUT from running script. Note error in red. $ ./runcastor.bsh -- Imported XML Schemas will be processed automatically. org.xml.sax.SAXException: In document: 'file:///C:/workspace/bvoip7.0p2/SIPLIMSD AO/WSDL/VOIPService/xsds/RoutePlanSummaryRequest_v01_00.xsd' Parsing Error : Declared encoding "UTF-8" does not match actual one "Cp1252"; th is might not be an error. Line : 1 Column : -1 at org.exolab.castor.xml.schema.reader.Sax2ComponentReader.warning(Sax2C omponentReader.java:311) at org.apache.crimson.parser.Parser2.warning(Parser2.java:3347) at org.apache.crimson.parser.Parser2.readEncoding(Parser2.java:3140) at org.apache.crimson.parser.Parser2.maybeXmlDecl(Parser2.java:1190) at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:653) at org.apache.crimson.parser.Parser2.parse(Parser2.java:337) at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:448) at org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223) at org.exolab.castor.builder.SourceGenerator.generateSource(SourceGenera tor.java:613) at org.exolab.castor.builder.SourceGenerator.generateSource(SourceGenera tor.java:548) at org.exolab.castor.builder.SourceGeneratorMain.main(SourceGeneratorMai n.java:309)

