Software AG Products 10.7 | Using CentraSite | Asset Management | Managing Assets through CentraSite Control | Web Service Management | Adding Web Service Asset to Catalog | Importing Web Service (including Abstract Service) Asset
 
Importing Web Service (including Abstract Service) Asset
Before you import a Web Service asset to the catalog, you must have the WSDL file that you want to import. This file can reside on the file system of the computer where your browser is running or it can reside anywhere on the network, as long as its location is addressable through a URL.
The Web Service importer copies a WSDL file to the repository, and creates a Web Service asset in the registry. The asset contains an External Link to the WSDL file in the repository.
The Web Service asset is represented in CentraSite by a set of related entries in the registry and in the repository. Some of the entries are visible in the detail pages of the Web Service asset, others are not displayed in the detail pages but are displayed when you use the impact analysis feature.
If you import a Web Service asset for which registry entries already exist (for example, from a previous import), the existing set of entries is extended as appropriate. Thus, for example, if you had previously imported a Web Service asset and now you import the Web Service asset again with an additional operation in the WSDL file, a new Operation object will be added to the existing set of entries for the Web Service asset in the registry.
Registry and Repository Entries for a Web Service Asset
The registry and repository entries created are summarized in the following diagram:
The registry entries are as follows:
*An asset of type Service.
*An object of type Service Binding, representing the binding defined in the WSDL file. This object contains the access URI of the launchable Web Service. The Web Service asset contains an internal reference to the service binding, that is, there is no explicit association.
*An object of type Specification Link. The service binding object contains an internal reference to the specification link, that is, there is no explicit association.
*An object of type Binding. The Service object contains an internal reference to the binding, that is, there is no explicit association object.
*One or more objects of the type Operation. The operation objects represent the operations of the Web Service, as defined in its WSDL. For each operation, there is an association link Implements from the binding object and an association link HasParent to the interface object.
*An object of type Interface. This object contains the port type elements of the WSDL definition.
*An object of the type External Link. This object contains a link to the Service's WSDL file stored in the CentraSite repository.
The repository entries are as follows:
*The WSDL file of the Web Service.
A WSDL definition can be spread across several physical files that contain IMPORT statements to refer to each other. Also, a WSDL definition can contain an XML schema definition, which can also be spread across several physical files. In such cases, each of the WSDL and schema files is stored in the repository, and appropriate references are created in the registry as follows:
*An External Link object in the registry refers to the top-level WSDL file of the Web Service in the repository, as described above.
*Each WSDL file in the repository that is referred to by a higher-level WSDL file for the same Web Service has an External Link object in the registry that is referred to by the External Link object of the higher-level WSDL file. The reference is implemented as an association of the type uses.
*Each schema file in the repository that is referred to by a WSDL file in the repository has an XML Schema object in the registry that is referred to by the External Link object of the higher-level WSDL file. The reference is implemented as an association of the type uses. The XML Schema object in the registry contains an External Link to the schema file in the repository.
*Each schema file in the repository that is referred to by a higher-level schema file in the repository has an XML Schema object in the registry that is referred to by the XML Schema object of the higher-level schema file. The reference is implemented as an association of the type uses. The XML Schema object in the registry contains an External Link to the schema file in the repository.
If the importer detects an equivalent Web Service within CentraSite during the import of a Web Service, the import dialog will prompt you to specify either Overwrite latest version or Create new version. If you decide to create a new version, the importing WSDL will be applied to the new version.
Importing Abstract Services
You can use abstract services to support a top-down service development. An abstract service asset just contains abstract definitions like interface, operation, or message definitions. But, in contrast to a normal service asset, it does not contain the complete information that is necessary to call the Web Service that it represents. This means the required definitions are missing or not complete. You can supply the concrete definitions of an abstract service at a later time in order to turn the abstract service into a normal service. An abstract service is represented in the CentraSite registry by a normal service asset.
You can define abstract services by creating them from scratch or by importing WSDLs that comply with the WSDL 1.1 specification.
According to the WSDL 1.1 specification, a WSDL file does not need to contain any service or binding element. This kind of WSDL is called an abstract WSDL. Importing an abstract WSDL to CentraSite results in an abstract service. The name and the targetNamespace of the abstract service are taken from the name and the targetNamespace attributes of the WSDL's definition element. If the attributes are missing, the import is rejected.
To enable the import of name-less abstract WSDLs, the import dialog in CentraSite Control allows you to specify a name.
The minimal abstract WSDL that is supported just contains a definitions element with a name and a targetNamespace attribute.
An abstract service does not contain concrete definitions that refer to the registry objects for the abstract definitions. Instead the abstract service is linked to the abstract definitions through a HasParent relationship attribute. The relationship attribute points from the Interface objects to the Service object. Operation objects are not referred to directly since they are always part of an Interface. Types or messages do not need to be considered, since they are not represented in the registry. The HasParent relationship is classified as an aggregation relationship to ensure that the abstract definitions are considered properly when deleting, moving, or exporting the abstract service. The abstract WSDL is linked to the abstract service through an externalLink.
You can update an abstract service's definitions by attaching a WSDL to it. Attaching a WSDL overwrites all the registry objects that can be defined through a WSDL. This ensures that the attached WSDL reflects correctly the registry objects representing the service and its components. This also affects the service object itself. Objects that cannot be added by attaching a WSDL are not overwritten. The service object's name is not overwritten automatically when you attach a WSDL. This makes the name provided by the WSDL a technical name of a service. By default, the technical name is reflected by the local-name classification of the service object. You can align the service name with the technical name by marking the appropriate check box in the Attach WSDL dialog.
To show the technical name in the CentraSite Control, a computed read-only attribute is needed.
Restrictions for Abstract Services
The following restrictions apply for abstract services:
*WSDL 2.0 is not supported for importing abstract services.
*An abstract service cannot be virtualized.
Additionally, when importing a WSDL file that refers to XML schema, keep the following points in mind:
*When you have at least a Modify permission on the referenced XML schema, both the Web Service and the XML schema are imported automatically.
*When you have only View permission on the referenced XML schema, the Web Service is imported and the XML schema implicitly reused.
*When you do not have any permission on the referenced XML schema, the Web Service is imported and a warning message logged.
Tip:
If you have previously imported a WSDL that has an associated schema file and you now re-import the same WSDL with a modified schema file, your browser might not display the updated contents of the schema file when you click on the external link for the schema file. This can happen if the browser cache is not being updated automatically. To rectify the problem, you can change your browser settings so that pages are always updated on every visit.
*To import a Web Service asset to the catalog
1. In CentraSite Control, go to Asset Catalog > Browse.
2. Click the Import icon that is located in the upper-right corner of the Assets pane.
3. In the Import dialog, type the appropriate information for each of the displayed data fields.
Field
Description
Organization
The organization to which you want to add the new Web Service asset. (The Organization list only displays organizations for which you have the Manage Assets permission or at least the Create Assets permission.) If you select an organization other than your own organization, you will nevertheless be the owner of the asset.
Important:
Select the organization carefully. You cannot change the organization assignment later. You can, however, export a Web Service asset from one organization and import it to another.
Import as
The asset type, Service.
Initial Version
Optional. An identifier for the initial version of the Web Service. This is the user-defined version, as opposed to the automatically assigned system version. You can enter any string in this field, that is, the version identifier does not need to be numeric. You can also leave the field blank. You can later create new versions of the asset.
If the versioning feature is disabled for the Service asset type, the field is nevertheless displayed, thus allowing you to assign an identifier for this first version.
If the import of the Web Service also causes other related objects to be imported (for example, if the WSDL definition for a Web Service includes references to other WSDL or schema definition files), the initial version is only assigned to the main asset identified in this dialog, and the initial version of the other imported objects is not assigned.
Name
Optional. Name of the Web Service.
Note:
This is the name that users will see when they view this Web Service asset in the CentraSite User Interfaces. Therefore, we recommend that you specify a meaningful name for each Web Service.
A Web Service asset name can contain any characters (including spaces), and must be unique within an organization.
If you do not specify a name, the name is set automatically with the value that is specified for the name attribute in the definitions element of the WSDL. If the name attribute is not specified in the WSDL, a dialog opens in which you can specify the name.
Import from
The input WSDL file for the Web Service. You may want to read the input WSDL file from a URL-addressable location on the network (the URL option) or from your local file system (the File option).
Option
Description
URL
If the WSDL file you are importing resides on the network, specify its URL.
File
If the WSDL file resides in your local file system, specify the file name. You can use the Browse button to navigate to the required folder.
URL Authentication
If you have specified a URL, and the site you want to access through the URL requires user authentication, select the URL Authentication check box. This opens the Authentication sub-dialog box. Type a user name and password for authentication at the URL site.
Interactive resolution of Import/Includes
This option determines how referenced WSDLs/schemas are handled when the WSDL/schema that is referred to already exists in the registry. When this option is enabled, you will be prompted during import to specify whether you want to reuse any WSDL/schema files referred to in the main file or upload new files.
Overwrite all Imports/Includes
This option determines whether to overwrite the importing WSDL file with new content.
4. Click Finish.
CentraSite retrieves the specified file and generates the catalog entry. The details page of the Web Service asset is displayed.
What Happens When You Import a New WSDL File?
CentraSite retrieves the specified file and generates the catalog entry. If you have specified Interactive resolution of Import/Includes, you will be prompted to specify whether you wish to reuse any of the WSDL/schema files referred to in the main WSDL file or upload new files.
What Happens When You Import an Existing WSDL File?
If the importer detects that the Web Service you are trying to import already exists within CentraSite, the import dialog will prompt you to specify whether you want to Overwrite latest version or Create new version. If you have specified Interactive resolution of Import/Includes, you will be prompted to specify whether you wish to reuse any of the WSDL/schema files referred to in the main WSDL file using IMPORT or INCLUDE statements or upload new files.
5. During import of a Web Service asset, CentraSite does not allow you to add the Web Service asset to the catalog unless you have specified all required attributes in the WSDL definition and all referenced objects to which the WSDL file has an association. The value for the required attribute must be specified in the Web Service asset's profile. Additionally, if the Web Service asset has internally referenced objects, the value for the required attributes of all such referenced objects should be specified by choosing the Next button that is located in the upper-right corner of the details page in order to add the Web Service asset to the asset catalog. Thus, for example, if the WSDL/XML schema files that are referenced in the main WSDL file have required attributes, then you will be prompted to specify a value for the required attributes in order to save the Web Service asset.
6. Click Save.
The newly created Web Service asset is added to the CentraSite Registry Repository.
7. Review the import log that CentraSite displays after the import process. If errors occur while reading and processing the file, they will be reported in this log.
8. Configure the extended attributes of the Web Service asset as described later in this topic.
Tip:
If you had previously imported a WSDL file that has an associated schema file and you now re-import just the schema file with modifications, your browser may not display the updated contents of the schema file. This can happen if the browser cache is not being updated automatically. To rectify the problem, you can change your browser settings so that pages are always updated on every visit.