Here is the XML for the java2js command.
The basic idea is this: the code has to process a service. That means it
needs an SEI, a front-end, and a data binding, just like java2ws. This
is going to require some refactoring of code into some common place from
java2ws. It can't be tools-common, without producing a circular
build-path problem. The whole idea of the implementation of
rt/javascript is that this tool is very nearly identical to java2ws. We
want to cause the very same kind of ServiceInfo model to get built, but
then run a Javascript generator instead of a WSDL generator.
Thanks.
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<!-- The xhtml namespace is for usage documentation -->
<toolspec xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xhtml="http://www.w3.org/TR/xhtml1/strict"
xsi:schemaLocation="http://cxf.apache.org/Xutil/ToolSpecification
http://cxf.apache.org/schema/xutil/tool-specification.xsd"
xmlns="http://cxf.apache.org/Xutil/ToolSpecification"
xmlns:ts="http://cxf.apache.org/Xutil/ToolSpecification">
<annotation>
Examples : java2js -cp ./tmp
org.apache.hello_world_soap_http.Greeter -o output.js
</annotation>
<usage>
<optionGroup id="options">
<option id="databinding" maxOccurs="1">
<annotation>
Specify the data binding (Aegis or JAXB). The
default is JAXB for the JAX-WS frontend, and Aegis
for the Simple frontend.
</annotation>
<switch>databinding</switch>
<associatedArgument placement="afterSpace">
<annotation>jaxb or aegis</annotation>
</associatedArgument>
</option>
<option id="frontend" maxOccurs="1">
<annotation>
Specify the frontend to use. JAX-WS (jaxws) and the
simple frontend (simple) are supported.
</annotation>
<switch>frontend</switch>
<associatedArgument placement="afterSpace">
<annotation>jaxws or simple</annotation>
</associatedArgument>
</option>
<option id="outputfile" maxOccurs="1">
<annotation>
Specify the output JavaScript file name.
</annotation>
<switch>o</switch>
<associatedArgument placement="afterSpace">
<annotation>output-file</annotation>
</associatedArgument>
</option>
<option id="classpath" maxOccurs="1">
<annotation>
Specify the Java class path for the SEI and types
classes.
</annotation>
<switch>cp</switch>
<associatedArgument placement="afterSpace">
<annotation>class-path</annotation>
</associatedArgument>
</option>
<option id="soap12" maxOccurs="1">
<annotation>
Specify to generate SOAP 1.2 binding
</annotation>
<switch>soap12</switch>
</option>
<option id="beans" maxOccurs="unbounded">
<annotation>
Specify the pathname of a file defining additional
Spring beans to customize the databinding
configuration.
</annotation>
<switch>beans</switch>
<associatedArgument placement="afterSpace">
<annotation>
pathname of the bean definition file.
</annotation>
</associatedArgument>
</option>
</optionGroup>
<optionGroup id="common_options">
<option id="help" maxOccurs="1">
<annotation>
Display detailed information for options.
</annotation>
<switch>h</switch>
<switch>?</switch>
<switch>help</switch>
</option>
<option id="version">
<annotation>
Display the version of the tool.
</annotation>
<switch>v</switch>
</option>
<option id="verbose">
<annotation>Verbose mode</annotation>
<switch>verbose</switch>
<switch>V</switch>
</option>
<option id="quiet">
<annotation>Quiet mode</annotation>
<switch>quiet</switch>
<switch>q</switch>
</option>
</optionGroup>
<argument id="classname" minOccurs="1" maxOccurs="1">
<annotation>SEI class name</annotation>
</argument>
</usage>
</toolspec>