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, ∼4628🔥, 0💬
Popular Posts:
What Is XMLBeans xbean.jar 2.6.0? XMLBeans xbean.jar 2.6.0 is the JAR file for Apache XMLBeans 2.6.0...
Smack is an Open Source XMPP (Jabber) client library for instant messaging and presence. A pure Java...
JDK 6 tools.jar is the JAR file for JDK 6 tools. It contains Java classes to support different JDK t...
JDK 11 jdk.internal.vm.compiler .jmodis the JMOD file for JDK 11 Internal VM Compiler module. JDK 11...
JDK 8 jconsole.jar is the JAR file for JDK 8 JConsole, which is a graphical monitoring tool to monit...