Designer 10.5 | Centrasite Eclipse UI Help | Tasks | Importing Data into CentraSite | Importing Web Services
 
Importing Web Services
You can import one or more Web services from a Web server or a file system to a CentraSite  Registry and Repository. For the import, you specify a WSDL file, which may define one or more Web services.
The following Assets and Registry Objects and Supporting Documents and Resources are created by the import of Web services:
*In the registry, objects are created for different elements defined in the WSDL file being imported: An object of the Service type is created for each service element defined in the WSDL file, the corresponding name attribute in the WSDL file determines the registry object's name. The Service objects are assigned to the organization which you specify in the import parameters. A corresponding Organization object is created, if required.
Depending on the WSDL file, additional objects of the following types may be created: ServiceBinding objects for service bindings, SpecificationLink objects for specification links, Concept objects for bindings, Operation objects for operations, Interface objects for interfaces, BPELPartnerLinkType objects for partnerLinkType elements in the WSDL file, BPELRole objects for role elements within partnerLinkType elements. The new objects are connected by associations and implicit references as required.
*For each imported Web service, an External Links is created which points to the WSDL file in the repository.
*The WSDL file is copied to a subfolder of projects/WSDL in the repository.
The name of the subfolder is determined by the namespace defined in the targetNamespace attribute of the WSDL's definition element. For example, if the namespace is http://www.MyOrganization.com/products, the WSDL file is copied to projects/WSDL/www.MyOrganization.com/products.
The name of the WSDL file in the repository is built as follows: organization_service_file.wsdl, where organization is the organization name you specify in the import parameters, service is the name of the service as specified in the WSDL, and file is the file name or final part of the URL specified in the import parameters. For example, when you import a Web service from C:\services\MyService.wsdl, the service name in the WSDL file is queryService, and the specified organization is MyOrg, the resulting file name in the repository is MyOrg_queryService_MyService.wsdl.
*If the WSDL file contains references to schema files, these are also imported, including all the schema files that are referenced. The folders and files and registry objects that are created correspond to Importing XML Schemas.
*If the importer detects an equivalent 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.
You can also choose the option Interactive resolution of Import/Includes, which will allow you to specify how an already existing imported/included file (further WSDL or schema) is handled. For each of the imported/included files you have one of these options:
*Overwrite the importing file (WSDL or schema) with new content.
*Create a new version of the file with the new content (if, for example, you want to modify a schema but want to retain its previous version).
*Reuse any version of the file (if, for example, an intermediate version of a schema is currently referenced by a WSDL, you can redirect it to the newest version).
Note:
When you delete a service in CentraSite whose WSDL file references one or more schemas, you can choose to delete the schema files.
You can update Web services in CentraSite by importing an updated WSDL file. The WSDL file must have the same namespace, service names, and organization as the original WSDL file. The WSDL file may include additional Web services. However, it is not possible to remove a service from CentraSite via an updated WSDL file which no longer includes the corresponding service element.
*To import Web services
1. On the Select page of the Import wizard, select Web Service in the CentraSite folder.
2. On the Import Web Service page of the Import wizard, specify the following parameters:
*Select the organization to which the Web services are to be assigned.
*Specify a version identifier for the new service. The version identifier you enter here is the service's public, user-assigned version identifier. You can enter any string in the Initial version field, i.e. the version identifier does not need to be numeric. You can also leave this field blank.
*If you want to import Web services from a Web server, choose the Import from Web server option and specify the URL of the WSDL file in the URL field.
*If you want to import Web services from the file system of your computer, choose the Import from file system option and specify the path and name of the WSDL file in the File field. Use the Browse button to select the file in the file system of your computer.
*If you have specified a URL, and the site you want to access via the URL requires user authentication, enable the URL Authentication check box. This opens a sub-dialog in which you can enter a username and password for authentication at the URL site.
*Check Interactive resolution of Import/Includes to determine how referenced schemas are handled when the schema that is referenced already exists in the registry. When this option is enabled, you will be prompted during import to specify whether you want to reuse any schema files referenced in the main file or upload new files.
*Click OK.
What Happens When You Import a New WSDL File?
CentraSite retrieves the specified file and creates the Web service. 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 referenced in the main WSDL file or upload new files.
What Happens When You Import an Existing WSDL File?
If the importer detects that the 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 referenced in the main WSDL file via IMPORT or INCLUDE statements or upload new files.
Be aware that the import fails if you specify a WSDL file containing a namespace and services that already exist in CentraSite but are affiliated to a different organization.