Generate a Web Service Map from a Data Service This page last changed on Nov 28, 2008. .stickable, h1, h2, h3, h4, h5 false true Show Sticky notes Hide Sticky notes Save Cancel Oracle Data Service Integrator Documentation > Data Services Developer's Guide # How To Generate a Web Service Map and WSDL from a Data Service If you intend to access a data service through web services using the Data Services Mediator API, you must generate a web service map file first. A web service map file maps data service functions to web service operations. The map file is also used for setting and configuring security policies for web services applications. # Topics Creating a Map File Generating a WSDL File from Map File Examining the Generated WSDL Testing the Generated WSDL Modifying the Map File ## Creating a Map File This section describes the basic steps that are required to create a map file. You can accomplish all of these tasks using the Oracle Data Service Integrator Eclipse IDE. The procedure assumes that you have created or have access to the data service (.ds) file from which you want to create a data service.
| Web Services Map File Reference
6. There are two ways to create a web service map file (.ws file): Method 1: Obtain access to the data space project containing the data service you wish to make accessible from a web service. Right-click on the data service name in Project Explorer and select Create Web Service Map. The map file (.ws file) is created with the same name as the data service file, and the map file is opened in the editor. Method 2: Obtain access to the data space project containing the data service you wish to make accessible from a web service. Right-click on the data service name in Project Explorer and select: New > Web Service Map Use the dialog to create an empty web service map file with a name of your choosing (example: OrderService). Click Finish. The empty map file opens in the editor. Drag either an entire data service file onto the map file or drag individual data service operations Example: RetailApplication > OrderManagement > OrderService.ds Click OK. A file named OrderService.ws will be created. It will be located in the same folder as the source data service.
   | Only the data service functions that are mapped in the map file are available to clients. Only public data service operations can be mapped.
The following figure shows a data service file called OrderService.ds as the source for a map file called OrderService.ws (created using Method 2). ##### Adding a Data Service to a Web Services Map File
| You can add additional public operations from other data services to the same web service map file.
5. ## Generating a WSDL File from Map File To generate a WSDL file from a .WS file: Right-click on the .ws file. Choose Save WSDL As... Specify a name for the WSDL file. Click Save. Your new WSDL file should appear in the directory identified in the Save as dialog. Double-click on the WSDL file to verify the soap service for the WSDL.
   1. 1. 1. 1. 1. | A WSDL that has more than one schema section pointing to the same target namespace will result in validation errors with Eclipse WTP default WSDL validator.The WSDL generated in the above example is valid; however the project will indicate a validation error condition. The error condition will not interfere with your ability to build and deploy the project. Also, you can use the following Eclipse option settings to prevent the validation error report from displaying: Select the following option:
                      Project > Properties > Validation
               5. Select Override validation preferences. Uncheck the Build option associated with the WSDL Validator. Click Apply, then OK. Select the following option:
                      Project > Clean
   Click OK.
The validation error warnings should disappear. ## Examining the Generated WSDL You can examine the generated WSDL file. See Web Services Map File Reference for details. ## Testing the Generated WSDL You can test the generated WSDL file. See Web Services Map File Reference for details. ## Modifying the Map File This section describes additional ways to add data services and operation to a map, and how to delete operations from an existing map. ### Adding Data Services and Operations You can drag and drop either an entire data service or individual data service operations from the Project Explorer onto an existing map file in the map file editor. You can right-click in the map editor and select Add Data Services/Operations to Map. Use the Select Resources to Add to Map dialog to add data service resources to the map. ### Deleting Data Services and Operations from a Map File To delete one or more operations, select the operations and right-click on the selected operations, and then select Delete. To delete all operations that are related to a data service, right-click on the .ds dataservice box and select Delete. ### Renaming Mapped Operations To rename a mapped operation, select the operation, right-click and select Rename Operation. Then enter a new name for the mapped operation.

Document generated by Confluence on Jan 13, 2009 15:57