WebSphere Message Brokers
File: an07355_
Writer: Bill Oppenheimer

Reference topic

This build: July 31, 2007 21:33:36

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 must 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

-p MessageSetProjectName
(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.
-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 path name 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 also attempts to resolve any absolute import locations that it encounters. However, avoid using absolute import locations, because any further imports in the hierarchy must use absolute locations after the first time you specify an absolute location.

-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 <WSDL file name>
(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 ReportFilePathName
(Optional) Absolute or relative path name of the report file; if omitted, the report is written to the default log file and is named <Wsdl-file-name>.wsdl.report.txt. <Wsdl-file-name> is the name of the WSDL definition you are importing and it is placed in the directory from which the command is invoked.
-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
Notices | Trademarks | Downloads | Library | Support | Feedback

Copyright IBM Corporation 1999, 2007Copyright IBM Corporation 1999, 2007. All Rights Reserved.
This build: July 31, 2007 21:33:36

an07355_ This topic's URL is: