Liberty: The web services commands

Liberty provides several command utilities to work with Java™ Architecture for XML Binding (JAXB) and Java API for XML Web Services (JAX-WS) applications.

schemagen command for JAXB applications

Generate a schema file from Java classes by using the schemagen schema generator tool to create the XML schema. After you have created a mapping between XML schema and Java classes, XML instance documents can be converted to and from Java objects by using the JAXB binding runtime API. The resulting Java classes contain all the necessary information that the JAXB run time requires to parse the XML for marshaling and unmarshaling. You can use the JAXB classes within JAX-WS applications or the JAXB classes in your non-JAX-WS Java applications for processing XML data.

For more information, see schemagen command for JAXB applications.

xjc command for JAXB applications

You can generate fully annotated Java classes from an XML schema file by using the xjc command-line tool that is provided by the JAXB schema compiler. Use the xjc schema compiler tool to start with an XML schema definition (XSD) to create a set of JavaBeans that map to the elements and types defined in the XSD schema. After you have created a mapping between XML schema and Java classes, you can convert XML instance documents to and from Java objects by using the JAXB binding runtime API. The resulting annotated Java classes contains all the necessary information that the JAXB runtime requires to parse the XML for marshaling and unmarshaling. You can use the resulting JAXB classes within JAX-WS applications or the resulting JAXB classes in your non-JAX-WS Java applications to process XML data.

For more information, see xjc command for JAXB applications.

wsgen command for JAX-WS applications

The wsgen command-line tool generates the necessary artifacts required by JAX-WS applications when you start with Java code for Web Services programming. When you start with a service endpoint implementation, use the wsgen tool to generate the required JAX-WS artifacts.

For more information, see wsgen command for JAX-WS applications.

wsimport command for JAX-WS applications

The wsimport command-line tool processes an existing Web Services Description Language (WSDL) file and generates the required artifacts for developing JAX-WS web service applications. When you start with an existing WSDL file, use the wsimport command-line tool to generate the required JAX-WS artifacts.

Attention: If you want to change the package name of the generated classes, include -p <Expected_Java_Package_Name> in the wsimport command line. After that, do not change Java package name manually.

For more information, see wsimport command for JAX-WS applications.