Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (102)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (322)
Collections:
Other Resources:
scomp - Compile XML Schema to Java Data Types
How to use the "scomp" command to Compile XML Schema to Java Data Types? I have XMLBeans-2.6.0.zip installed.
✍: FYIcenter.com
If you have XMLBeans-4.5.3.zip installed,
you can follow this tutorial to
run the "xcomp" command to Compile XML Schema to Java Data Types:
1. Run "scomp" command to its options:
\fyicenter\xmlbeans-2.6.0>.\bin\scomp.cmd Compiles a schema into XML Bean classes and metadata. Usage: scomp [opts] [dirs]* [schema.xsd]* [service.wsdl]* [config.xsdconfig]* Options include: -cp [a;b;c] - classpath -d [dir] - target binary directory for .class and .xsb files -src [dir] - target directory for generated .java files -srconly - do not compile .java files or jar the output. -out [xmltypes.jar] - the name of the output jar -dl - permit network downloads for imports and includes (default is off) -noupa - do not enforce the unique particle attribution rule -nopvr - do not enforce the particle valid (restriction) rule -noann - ignore annotations -novdoc - do not validate contents of <documentation> -noext - ignore all extension (Pre/Post and Interface) found in .xsdconfig files -compiler - path to external java compiler -javasource [version] - generate java source compatible for a Java version (1.4 or 1.5) -ms - initial memory for external java compiler (default '8m') -mx - maximum memory for external java compiler (default '256m') -debug - compile with debug symbols -quiet - print fewer informational messages -verbose - print more informational messages -version - prints version information -license - prints license information -allowmdef "[ns] [ns] [ns]" - ignores multiple defs in given namespaces (use ##local for no-namespace) -catalog [file] - catalog file for org.apache.xml.resolver.tools.CatalogResolver.
2. Run "scomp" command to XML Schema as input and JAR file as output:
\fyicenter\xmlbeans-2.6.0>.\bin\scomp -out easypo.jar schemas\easypo.xsd Time to build schema type system: 0.39 seconds Time to generate code: 0.125 seconds java.io.IOException: Cannot run program "C:\fyicenter\xmlbeans-2.6.0\javac": CreateProcess error=2, The system cannot find the file specified at java.lang.ProcessBuilder.start(Unknown Source) at java.lang.Runtime.exec(Unknown Source) at java.lang.Runtime.exec(Unknown Source) at org.apache.xmlbeans.impl.tool.CodeGenUtil.externalCompile(CodeGenUtil.java:231) at org.apache.xmlbeans.impl.tool.SchemaCompiler.compile(SchemaCompiler.java:1154) at org.apache.xmlbeans.impl.tool.SchemaCompiler.main(SchemaCompiler.java:373) ... 6 more BUILD FAILED
Too bad. The "scomp" command failed to invoke "javac" compiler. See the next tutorial on how to avoid this problem.
⇒ SchemaCompiler - Call XML Schema Compiler Directly
⇐ easypo.xsd - Purchase Order Test XML Schema
2017-07-07, ∼4242🔥, 0💬
Popular Posts:
JRE 8 rt.jar is the JAR file for JRE 8 RT (Runtime) libraries. JRE (Java Runtime) 8 is the runtime e...
GJT (Giant Java Tree) implementation of XML Pull Parser. JAR File Size and Download Location: File n...
What Is poi-ooxml-5.2.3.jar? poi-ooxml-5.2.3.jar is one of the JAR files for Apache POI 5.2.3, which...
JBrowser Source Code Files are provided in the source package file. You can download JBrowser source...
What Is mail.jar of JavaMail 1.3? I got the JAR file from javamail-1_3.zip. mail.jar in javamail-1_3...