SOA Governance and API Management : Working with CentraSite Business UI : OData Service Management : Creating OData Services : Creating an OData Service using OData Importer from the Command Line
Creating an OData Service using OData Importer from the Command Line
Use the import Service command to import an OData service using the EDMX file into CentraSite.
The syntax for the command is:
C:\SoftwareAG\CentraSite\utilities>CentraSiteCommand.cmd import Service [-url <CENTRASITE-URL>] -user <USER-ID> -password <PASSWORD> -organization <ORGANIZATION> -type <TYPE> -serviceUri <SERVICE-URI> [-serviceUser <SERVICE-USER>] [-servicePassword <SERVICE-PASSWORD>] [-update <ASSET-ID>] [-imports <IMPORTS-DESCRIPTOR>] [-batch <BATCH-MODE>]
The input parameters are:
Parameter
Description
CENTRASITE-URL
(Optional) The fully qualified URL of the CentraSite registry/repository. Default value is http://localhost:53307.
USER-ID
The user ID of a registered CentraSite user who has the CentraSite Administrator role. For example, Administrator.
PASSWORD
The password for the CentraSite user identified by the parameter -user.
ORGANIZATION
(Optional) The organization to which the newly imported OData service will belong.
TYPE
The type of service you want to import. Possible values are: RAML, Swagger and OData.
Choose OData. This reads the Service URL or the EDMX file and from it, creates an OData service with the corresponding metadata.
SERVICE-URI
The location of an EDMX file that you want to use for importing the OData service in CentraSite.
*If the import file resides on a remote network, specify its URL.
*If the import file resides on your local system, specify the absolute or relative path to the file. If relative, the path should be relative to the location from where the command is executed.
SERVICE-USER
(Optional) If you have specified a URL in the above parameter -serviceUri, and the import file you want to access via the URL requires user authentication, enter a user ID that CentraSite is to use for authentication at the URL site.
SERVICE-PASSWORD
(Optional) The password that CentraSite is to use for authentication at the URL site.
ASSET-ID
(Optional) The ID of the OData service you want to update. You can specify the UDDI key of the service using an optional prefix “uddi:”. For example:
uddi:207ff1cc-25c5-544c-415c-d98ea91060c
IMPORTS-DESCRIPTOR
(Optional) The absolute or relative path to the imports descriptor file that contains all referenced objects to which the EDMX import file has an association.
The imports descriptor file contains a map of key-value pairs and defines the referenced objects as <import-alias>=<import-uri>.
BATCH-MODE
Note:  
CentraSite does not support this parameter for OData services.
Example:
The command for importing an OData service of the EDMX specification with an administrator account INTERNAL\Admin and password AdminPW would be:
C:\SoftwareAG\CentraSite\utilities>CentraSiteCommand.cmd import Service -url http://localhost:53305/CentraSite/CentraSite -user INTERNAL\Admin -password AdminPW -organization “Default Organization” -type OData -serviceUri C:/TripPinService.edmx -serviceUser INTERNAL\Claire -servicePassword Clairepwd -imports C:/imports.properties
The response to this command could be:
Executing the command : import Service
=================================================================
The service has been imported successfully with:
Name: TripPin OData Service
Id: b7377c94-2993-11e5-bad6-e9f07cabfe13
Organization: Default Organization
=================================================================
….
Successfully executed the command : import Service
Note:  
To update an existing OData service in CentraSite, you can use the import Service command and provide an edited EDMX file as input to the command along with the key that identifies the OData service that you want to update.
Copyright © 2015- 2016 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback