mqsicreatemsgdefsfromwsdl command

Supported platforms

  • Windows
  • Linux (x86 platform)

Purpose

The mqsicreatemsgdefsfromwsdl command can be used to import a single WSDL definition. If the WSDL is split into multiple files then the file specified must contain the WSDL service definition or binding definition. The WS-I validator can be run automatically on the imported WSDL under the control of the -vfa flag.

Note:
  1. Ensure that only the files that are required for the WSDL definition you are importing exist in the directory and subdirectory structure. One of the actions the mqsicreatemsgdefsfromwsdl command performs is to copy all the files in the directory and subdirectories into the workspace prior to creating the message definition. This could include any files not associated to that WSDL definition.
  2. If the WSDL definition uses a relative path that includes files outside of the directory or subdirectory structure specified, these files will need to be imported into the workspace prior to running the command. Care must be taken to ensure that the relative paths are still valid after importing these files into the workspace
  3. Message sets that are created will be namespace enabled.
  4. Existing message sets must be namespace enabled and have an XML physical format.
  5. If you are creating a new message set for run time parsing, you should base it on an existing message set which has an XML physical format.

Syntax

Parameters

-base <baseMessageSetProjectName>\<BaseMessageSetName>
(Optional) If a new message set is to be created, this is the existing message set project and message set on which it is based
-binding <bindingname>
(Optional) The name of a binding to be imported. This parameter is mandatory if the WSDL definition includes more than one binding, but optional if the WSDL definition includes a single binding
-d pathname of source files folder
(Required) The absolute or relative pathname of the directory where the top-level WSDL file is located. The top-level WSDL file may contain the entire WSDL definition, or it may be the top of a hierarchy of files, each of which may import further files via import elements. An import element specifies the location of the resource to import with a location attribute

The importer attempts to resolve all relative import locations relative to the specified directory. The importer will also attempt to resolve any absolute import locations which it encounters, but note that their use is not recommended. Once an absolute location has been specified, any further imports in the hierarchy must also use absolute locations.

-data <workspacepath>
(Required) The path of the workspace in which your projects are created.

The workspace location is also the default location for projects. Relative paths are interpreted as being relative to the directory from which the command was started.

-f The top level WSDL file name for the WSDL definition.
(Required). The file name of the top-level WSDL file to be imported.

Where a path is required to fully identify the filename, the path should be specified using the -d parameter.

-log report file pathname
(Optional) Absolute or relative pathname of the report file. If omitted, the report is written to the default log file and is named <wsdl-file-name>.wsdl.report.txt, (where <wsdl-file-name> is the name of the WSDL definition you are importing) and it will be placed in the directory the command is invoked from.
-p message set project name
(Required) The name of the message set project. If the project exists, it must be namespace-enabled. If the project does not exist, a new namespace-enabled project is created.
-rmd
(Optional) Replaces an existing message definition file of the same name.
Note:
  1. If this flag is omitted, and a message definition file of the same name exists, you receive a warning.
  2. The location of the generated message definition file in the message set is determined by the target namespace.
-rmp
(Optional) Replaces the existing project of the same name.
-v
(Optional) Verbose report.
-vfa
(Optional) Validation failure action. Specifies the required action if WS-I compliance checking detects a problem in the WSDL to be imported. The default is set to fail. Select from:
  • fail: If the WSDL definition is not WS-I compliant, the import process will stop and errors will be written to the log file.
  • warn: If the WSDL definition is not WS-I compliant, the import process will write warning errors to the log file.
  • ignore: If the WSDL definition is not WS-I compliant, the import process ignores them and informational messages of how this WSDL definition is not compliant to the WS-I profile will be written to the logfile.

Examples

In the following example, the WSDL document service.wsdl which exists in the directory wsdlfiles, is to be imported into the project myProject and overwrite the project if it exists.

mqsicreatemsgdefsfromwsdl  -p myProject -d .\wsdlfiles -f service.wsdl -rmd -data .\wsdlfilewspc

In the following example, the WSDL document service.wsdl which exists in the directory wsdlfiles, is to be imported to create a new message set project (newProj) based on an existing project (existingProj).

mqsicreatemsgdefsfromwsdl  -p newProj -base existingProj -d .\wsdlfiles -f service.wsdl -data .\wsdlfilewspc
Related concepts
Message definition files