Publish Web Services Description Language files with wsadmin

The WSDL files in each Web services-enabled module are published to the file system location you specify. You can provide these WSDL files to the clients that want to invoke your Web services.

The wsadmin tool can publish the WSDL files in either local or remote mode. If you publish the WSDL file in local mode, the target application must be located at the same node where the wsadmin command is invoked.

To publish a WSDL file with wsadmin, follow these steps:

  1. Start wsadmin.

  2. At the wsadmin command prompt, run the $AdminApp publishWSDL command.

    • If you want to update the WSDL Simple Object Access Protocol (SOAP) address prefixes with the default values, run this command:

      $AdminApp publishWSDL app_Name path_Name

      where app_Name is the application name and path_Name is the fully-qualified absolute path to the zip file in which the command publishes the WSDL files.

    • If you do not want to update the WSDL Simple Object Access Protocol (SOAP) address prefixes with the default values, or if you want to customize the WSDL SOAP address for each module, run this command:

      $AdminApp publishWSDL app_Name path_Name {{module {{binding url-prefix}}}}

      where app_Name is the application name, path_Name is the fully-qualified absolute path to the zip file in which the command publishes the WSDL files, module is the name of a module for which you want to specify a WSDL SOAP address, binding is either http or jms, and url-prefix is the partial SOAP address for the associated SOAP binding.

      You can specify a different address prefix for each SOAP binding.

    Notes:

    • The zip file is saved in the application server machine. The directory structure in the zip file is appName/moduleName/META-INF/wsdl/fileName.wsdl or appName/moduleName/WEB-INF/wsdl/fileName.wsdl, where appName is the name of the application EAR file, moduleName is the name of the module JAR or WAR file, and fileName is the name of the WSDL file.

    • For an HTTP binding the form is http://host_name:port/ or https://host_name:port, where host_name is the name of the machine that hosts the application and port is the port number used to access the application.

    • For Java Message Service (JMS) bindings, the form is jms:/queue?destination=dest&connectionFactory=cf or jms:/topic?destination=dest&connectionFactory=cf, where dest is the name of the queue or topic destination.

Examples

This example command publishes WSDL files for a Web service named WebServicesSamples. The files are published in the /home/myDir/samplesWsdl.zip file:

$AdminApp publishWSDL WebServicesSamples c:/temp/samplesWsdl.zip

This example command publishes the files to the same zip file, and specifies customized SOAP addresses for the modules in the application:

$AdminApp publishWSDL WebServicesSamples c:/temp/samplesWsdl.zip
  { {AddressBookJ2WB.war {{http http://localhost:9080}}}
  {StockQuote.jar {{http https://localhost:9443}}} }

The samplesWsdl.zip file includes these files: