wsdl2service — generates a WSDL document containing a valid endpoint definition from a binding element.
wsdl2service [[-?] | [-help] | [-h]] {-transport { http | jms }} [-e service-name] [-p port-name] { -n binding-name} [-a address] [-soap12] [[-jds (queue/topic)] | [-jpu jndi-provider-URL] | [-jcf initial-context-factory] | [-jfn jndi-connection-factory-name] | [-jdn jndi-destination-name] | [-jmt { text | binary }] | [-jmc { true | false }] | [-jsn durable-subscriber-name]] [-o output-file] [-d output-directory] [-v] [[-verbose] | [-quiet]] {
wsdlurl
}
wsdl2service creates a new WSDL file containing an HTTP or JMS service definition from an existing WSDL document containing a binding element.
The arguments used to manage the WSDL file generation are reviewed in the following table.
| Option | Interpretation |
|---|---|
-? | Displays the online help for this utility. |
-help
| |
-h
| |
-transport (http/jms) | Specifies the type of transport to use for the generated service. |
-e | Specifies the value of the generated service element's name attribute. |
-p
| Specifies the value of the generated port element's name attribute. To specify multiple port elements, separate the names by a space. |
-a | Specifies the value used in the address element of the port. |
-soap12 | Specifies that the SOAP version to use is 1.2. |
-n
| Specifies the binding used to generate the service. |
-jds {queue/topic} | Specifies the JMS destination style. |
-jpu
| Specifies the URL of the JMS JNDI provider. |
-jcf | Specifies the JMS initial context factory. |
-jfn | Specifies the JMS JNDI connection factory name. |
-jdn
| Specifies the JMS JNDI destination name. |
-jmt (text/binary) | Specifies the JMS message type. |
-jmc (true/false) | Specifies if the MessageID is used as the CorrelationID. |
-jsn | Specifies an optional durable subscriber name. |
-o | Specifies the name of the generated WSDL file. |
-d
| Specifies the directory in which the generated WSDL is placed. |
-v | Displays the version number for the tool. |
-verbose | Displays comments during the code generation process. |
-quiet | Suppresses comments during the code generation process. |
wsdlurl | The path and name of the existing WSDL file. |
To call this tool from Ant you execute the org.apache.cxf.tools.misc.WSDLToService class.
Example 6 shows the java task to generate a JMS binding.
Example 6. Generating a JMS Binding From Ant
<java classname="org.apache.cxf.tools.misc.WSDLToService" fork="true">
<arg value="-transport"/>
<arg value="jms"/>
<arg value="-n"/>
<arg value="JMSSoapBinding"/>
...
<arg value="MyWSDL.wsdl"/>
<classpath>
<path refid="fsf.classpath"/>
</classpath>
</java>