Академический Документы
Профессиональный Документы
Культура Документы
K Enterprise Repository / Service Registry .............................................................................................................. 1 K.1 Introduction ........................................................................................................................................ 1 K.1.1 Registry/Repository Pre Requisites ........................................................................................................... 2 K.2 Define the SCA Meta Model in OER ............................................................................................... 2 K.2.1 OER 11g Asset Relationship Model ............................................................................................................. 3 K.2.2 Define Order Processing SCA Assets .......................................................................................................... 4 K.2.3 Define the Relationships for the SCA Assets .............................................................................................. 7 K.2.4 View the Composite Dependency Graph in the OER Navigator .......................................................... 10 K.3 Harvest and Relate a WSDL File in OER .......................................................................................12 K.3.1 Import the Harvester Solution Pack .......................................................................................................... 12 K.3.2 Enable OER Show System-Supplied Relationships system setting ................................................... 12 K.3.3 Install/unzip the harvester utility............................................................................................................... 13 K.3.4 Locate the Concrete WSDL ......................................................................................................................... 13 K.3.5 Configure the harvester xml settings file .................................................................................................. 13 K.3.6 Execute the command line script and view in OER Console ................................................................. 14 K.3.7 Link the newly harvested assets to the POProcessing Composite ........................................................ 14 K.3.8 Create a Relationship type of Promotes in OER................................................................................... 15 K.3.9 Link the newly harvested assets to the POProcessing Composite ........................................................ 16 K.4 Publish Assets to WSDL to OSR .....................................................................................................18 K.4.1 Install/unzip the OER Exchange Utilitity(XU) ......................................................................................... 18 K.4.2 Configure OER to Access UDDI ................................................................................................................. 18 K.4.3 Configure OER Exchange Utility and Publish the Assets....................................................................... 19 K.4.4 View and Update the Service Assets in OSR Console ............................................................................. 20 K.5 Configure SOA Infra UDDI Connection to OSR ..........................................................................22 K.6 Modify POProcessing Composite to Access OSR/UDDI.............................................................23 K.7 Deploy and Test Changed POProcessing Composite ..................................................................27 K.8 Summary ............................................................................................................................................28
K.1 Introduction
This tutorial has multiple sections described in detail below that take you through the different lifecycle stages of a SOA asset focusing on the Oracle Enterprise Repository (OER) and Service Registry(OSR) products which are often referred to in the industry as simply as RegRep. You will learn how to use OER to 1) design the metadata and relationships of a service or composite application from scratch 2) use the OER Harvester tool to import a WSDL, schema, endpoint and other dependant assets that are required for the implementation phase. During the deployment phase, you will 3) use the OER Exchange Utility (XU) to promote the service and associated assets to OSR that are required for the runtime environment. Finally, you will 4) consume the WSDL locations and services endpoints located in OSR to provide location transparency for composite external references using 11g JDeveloper and SOA Infra runtime UDDI integration. These exercises do not represent every process that is required for full life cycle management of SOA assets and more use cases will be described in each section and possibly added later.
Section K.1 Page 1
5/26/2009
This tutorial reuses the assets from the SOA 11gR1 Foundation training POProcessing scenario and requires that all steps have been deployed through step 9 of that training. For those of you who are only interested in this module, you do not have to exercise every design step of the SOA Foundation but instead complete the installation; Step 1 Intro and Setup then proceed directly to Step 9 JMS Adapter and deploy those to run the end-to-end POPRocessing composite application. See detailed steps below.
Section K.2
Page 2 of 28
5/26/2009
It is important to understand that the focus will only be on modeling reusable resources from the composite so while the SCA components such as BPEL, Mediator, and Manual tasks are essential for the implementation; they are not externally reusable until they are exposed as an SCA service. Given that, we will not be modeling the internal SCA components, but instead only the SCA assets for the POProcessing composite as shown below in a screenshot from the SOA EM console.
Section K.2
Page 3
5/26/2009
1. Start OER Asset Editor You can either submit assets from the OER Console or the Asset Editor but the Asset Editor gives you more control so go to the OER Console and click the Edit / Manage Assets link as shown below.
You are now ready to create the composite asset. 2. Create the POProcessing Composite application. Click File->New, set the values as shown below and press OK Name = POProcessing
Section K.2 Page 4 of 28
5/26/2009
You will see a screen like below with the Overview tab selected. The architect would normally enter a description and maybe start the approval process but well keep it simple and focus on the definition and relationship mappings. Press OK then click File->Save to save your work.
3.
Create the receivePO SCA service Click File->New, set the values as shown below and press OK Name = receivePO Version = 1.0 Type = SCA Service Initial State = Registered You can now see this asset as shown below.
Section K.2
Page 5
5/26/2009
Repeat this process for all of the assets listed below using a type of SCA Reference. 4. Create the WriteApprovalResults SCA reference Click File->New, set the values as shown below and press OK Name = WriteApprovalResults Version = 1.0 Type = SCA Reference Initial State = Registered
5.
Create the getCreditCardstatus SCA reference Click File->New, set the values as shown below and press OK Name = getCreditCardstatus Version = 1.0 Type = SCA Reference Initial State = Registered
6.
Create the JMS_FedEx SCA reference Click File->New, set the values as shown below and press OK Name = JMS_FedEx Version = 1.0 Type = SCA Reference Initial State = Registered
7.
Create the JMS_USPS SCA reference Click File->New, set the values as shown below and press OK Name = JMS_ USPS Version = 1.0 Type = SCA Reference Initial State = Registered
Section K.2
Page 6 of 28
5/26/2009
8.
Create the JMS_UPS SCA reference Click File->New, set the values as shown below and press OK Name = JMS_ UPS Version = 1.0 Type = SCA Reference Initial State = Registered Enter File->Save to save your work. You can see the SCA References by doing a search in the OER Console on Asset Type=SCA Reference and Registration Status=Registered as shown below.
Create a References relationship from the composite to all of its SCA references 1. Create an Exposes relationship type in the Asset Editor OER supports a fully extensible framework that allows users to create any asset type they may require. We will illustrate this here by showing how to create a new relationship type called Exposes that will be used in later steps. Go to the Asset Editor and select the Action menu from and Configure Relationships as shown below.
Section K.2
Page 7
5/26/2009
Click Add and enter in the following Values as shown below Element Name = Exposes Direction = Two-way, order matters Source Asset = Exposes Target Asset = Exposed By Click Ok, Ok, and File-Save.
Now we can move on to make use this newly created Exposed relationship type. 2. Create an Exposes relationship for the composite and the receivePO SCA service In the OER Asset Editor, search for POProcessing, select it, click the Taxonomy tab and scroll down until you see the Relationships. Click Add to add the relationship for its SCA Service and References.
Section K.2
Page 8 of 28
5/26/2009
Select Relationship Type=Exposes Enter receivePO in the Search box Press Search button Select the Asset receivePO (1.0) Press OK
You can now see the relationship in the the Taxonomy tab
3.
Click Add to add a relationship between the POProcessing Composite and the getCreditCardstatus SCA Reference. Enter the values as shown below.
Select Relationship Type=References Enter getCreditCardstatus in the Search box Press Search button Select the Asset getCreditCardstatus (1.0) Press OK to see the new Relationship was created as shown below.
Section K.2
Page 9
5/26/2009
4.
Well now repeat this step for the rest of the SCA References. Click Add to add a relationship between the POProcessing Composite and the writeApprovalResults SCA Reference. Enter the values as shown below.
5.
Select Relationship Type=References Enter writeApprovalResults in the Search box Press Search button Select the Asset writeApprovalResults (1.0)
Press OK and see the new Relationship was created in the Taxonomy tab. Click Add to add a relationship between the POProcessing Composite and the JMS_Fedex SCA Reference. Enter the values as shown below.
6.
Select Relationship Type=References Enter JMS_Fedex in the Search box Press Search button Select the Asset Fedex (1.0)
Press OK and see the new Relationship was created in the Taxonomy tab. Click Add to add a relationship between the POProcessing Composite and the JMS_UPS SCA Reference. Enter the values as shown below.
7.
Select Relationship Type=References Enter JMS_UPS in the Search box Press Search button Select the Asset JMS_UPS (1.0) Press OK and see the new Relationship was created in the Taxonomy tab.
Click Add to add a relationship between the POProcessing Composite and the JMS_USPS SCA Reference. Enter the values as shown below.
8.
Select Relationship Type=References Enter JMS_ USPS in the Search box Press Search button Select the Asset JMS_ USPS (1.0) Press OK and see the new Relationship was created in the Taxonomy tab Click File->Save then File->Exit to leave the Asset editor
5/26/2009
Well view the relationships at the bottom of Taxonomy section as shown here.
You now see the entire relationship that you have created for this Composite application. You can Zoom in or out, click on the assets to see their relationship and reposition the diagram by selected and dragging the white area behind it.
Section K.2
Page 11
5/26/2009
K.3.2
Section K.3
Page 12 of 28
5/26/2009
5/26/2009
</credentials> Modify the directory and file location for the getStatusByCC.wsdl in the JDeveloper Chapter 9 Project as shown here.
<rootDir>.</rootDir>
<files>getStatusByCC.wsdl</files>
K.3.6 Execute the command line script and view in OER Console
Make sure your SOA server has been started so the endpoint locations can be validated against a live instance of the WSDL. Open a command line window and go to C:\Oracle\Middleware\home_LOAD16F\repository103\introspector. Run the command "introspect.bat". You should see a screen with Successfully Completed similar to the one below.
Select the WSDL artifact and click the Diagrammer icon to see the new assets and relationships.
The diagrammer dependency view below shows the new getStatusByCC WSDL asset an AUTO References relationship to creditcheck.xsd and 2 AUTO Defines relationship for the new Endpoint and Interface assets. To better understand these new assets and relationships, you can optionally start the Asset Editor and search for getStatusByCC to explore the Overiew and Taxonomy tabs. You should particularly notice the Endpoint URI of the endpoint asset.
Section K.3
Page 14 of 28
5/26/2009
Click Add and enter in the following Values as shown below Element Name = Promotes Direction = Two-way, order matters Source Asset = Promotes Target Asset = Promoted By Click Ok, Ok, and File-Save.
Section K.3
Page 15
5/26/2009
Select Relationship Type=Promotes Enter getStatusByCC}Interface in the Search box Press Search button Select the Asset CreditCardValidation interface Press OK and see the new Relationship was created in the Taxonomy tab.
Section K.3
Page 16 of 28
5/26/2009
Click File
To view the full dependency graph with relationships in the Navigator, go back to the OER Console and search for the POProcessing asset and click the Navigator button. You should see a display similar to below.
If you click on the getCreditCardStatus asset, you will see the relationship that you just created.
Section K.3
Page 17
5/26/2009
This enables you to click on further down on the relationships to see the asset and relationships that were automatically build by the harvester. Note that before you proceed, you may want to look in the Asset Editor at the assets File Information section to see if it is using the rep:// protocol to resolve the asset. When the Service and WSDL assets are published to OSR, they will link back to OER. It is a best practice to make tis URL point to the RT location of the WSDL which is the same URL used to download the WSDL file.
5/26/2009
4. Verify the following UDDI and Import property values: - UDDI/cmee.uddi.enabled is set to True to enable the UDDI Web service plug-in. - Import/cmee.import.uddi.enabled is set to True. - Import/cmee.import.uddi.service.assettype is set to Service the Service asset type. 5. If necessary, click Save at the bottom of the screen.
Now follow the instruction below for using the Type Manager from the regman.pdf file. Using the Oracle Enterprise Repository Type Manager, enable the UDDI options for the Service and SOA Business Entity asset types, as follows: 1. Launch the Asset Editor by clicking Edit/Manage Assets on the Assets page. 2. Launch the Type Manager by selecting Manage Types on the Actions menu. 3. Under the Asset Types folder, select the Service asset type to edit its default configuration, as follows: a. Change the UDDI setting to UDDI Business Service Entity. b. Save the change by selecting Save on the File menu. 4. Under the Asset Types folder, select the SOA Business Entity asset type to edit its default configuration, as follows: a. Change the UDDI setting to UDDI Business Entity. b. Save the change by selecting Save on the File menu. 5. Exit the Type Manager, and then exit the Asset Editor
5/26/2009
OSR server and credentials <inquiryURI>http://localhost:7101/registry/uddi/inquiry</inquiryURI> <publishURI>http://localhost:7101/registry/uddi/publishing</publishURI> <securityURI>http://localhost:7101/registry/uddi/security</securityURI> <credentials> <user>admin</user> <password>admin</password> </credentials> Change the Repository Services and registrationstatus setting s shown below to filter on what services will be published to OSR. Note that it is not a best practice to filter on the service name as generally you would just filter on AssetLifecycleStage or endpointAssetLifecycleStatus which can be used for services in OER that have multiple bindings with different host/port values for each environment. <services> <service name="getStatusByCC"/> </services> <registrationStatus>Registered</registrationStatus> To run this, open a shell command and navigate to C:\Oracle\Middleware\home_LOAD16F\repository103\alrrx\ Enter the command alrrx mode publish You should see a message such as below indicating it ran successfully. 7204 [main] INFO from aler done com.bea.integ.uddi.facade.receive.AlerReceive - receive
Now click Sample SOA Business Entity Your Organization on the left to see the assets you have moved over to OSR. Click on the first line after Contacts to see the details of the service. You may have to click the
Section K.4 Page 20 of 28
5/26/2009
Details button to see the ServiceKey which is used in the JDeveloper Composite project to asccess the service endpoint and WSDL location.
To see the binding info, click the + icon next to the service as shown below. Again, you may have to click the Details tab on the right to see the Access Point URL and Use type of http. This is the binding the 11g SOA server uses to discover the endpoint location at runtime.
At this point, we are going to add a new binding for WSL deployment, which OER 10.3 does not create. Move your mouse over the service name then right click to see the Service sub menu below. Browse and select the Add binding button as shown below.
You now see the Add binding dialogue. Enter in the URL to concrete URL wsdl that you downloaded before. http://localhost:8001/soa-infra/services/default/validationForCC/getStatusByCC?WSDL and select Use type of wsdlDeployment. This binding is required by SOA 11gR1 used to resolve the location of the concrete WSDL file.
Section K.4
Page 21
5/26/2009
Now click the Add binding button and then Save changes on the following screen to activate your updates.
You can now tosee the binding info below from the details tab by navigating back to the Business, Service and clicking the second binding highlighted below.
OSR is now configured for SOA 11g to browse and consume this services WSDL and endpoint locations in the SOA 11g POProcessing project.
Section K.5
Page 22 of 28
5/26/2009
Enter in the same UDDI Inquiry URL that we used previously in the alrrx configuration. http://localhost:7101/registry/uddi/inquiry Click Apply and Yes to the dialogue to enable the changes as shown below.
You need to restart your SOA 11g environment at this point to enable this change to the runtime environment. While it is starting up, we will proceed to the next section that shows how to configure JDeveloper to use these assets from OSR UDDI interface.
Enter a Connection Name and the Inquiry Endpoint URL and click Next.
Section K.6
Page 23
5/26/2009
Click Test Connection and Finish to use this connection. You should see a message indicating a successful test. Testing connection with no proxy... Contacting http://localhost:7101/registry/uddi/inquiry... Successfully contacted UDDI inquiry endpoint You can manually browse the UDDI tree from the Resource Palette but well be going back to the project to replace the WSDL in our project.
Now click the icon to bring up the SOA Resource Browser to select a new wsdl for this reference.
Section K.6
Page 24 of 28
5/26/2009
Select the Resource Palette and expand the tree for your new UDDI connection.
You may see activity while it loads and parses the wsdl so be patient.
Section K.6
Page 25
5/26/2009
You will see an Update Reference dialogue showing the orauddi protocol URL with the UDDI serviceKey uniquely identifying the service. This updates the composite.xml external reference that you can see if you go to source view.
Click OK when you see the Artifact Localized dialogue and save your project.
restart JDeveloper and make sure that all of your servers are running Make sure that the Port and hostnames of the URL Access Points for the bindings are accessible. Go back and look at the assets in OER. You may want to change the WSDL URL location to reflect the http location instead of the rep:// access which points back to OER from OSR.
Section K.6
Page 26 of 28
5/26/2009
When prompted, enter 2.0 for the New Revision ID and click OK.
Now go to the SOA EM Console to see the new revision and test it.
Now you are ready to open the test file at C:\po\input\ small_validCC.xml and enter the data into the Test Web Service XML View box. The first test may take a while but you should receive the following message once it is completed.
The web service invocation was successful. However, there was no response to the invocation from the server.
Section K.7 Page 27
5/26/2009
Note that the SOA runtime server loads the wsdl and endpoint into its WSDL cache from OSR during bootstrap and deployment. This means that after server startup or deployment, you will never see any updates to the OSR Statistics page, which eliminates any performance overhead in accessing the locations from OSR. If you want to test it, look at the OSR statistics page by logging in and going to Manage->Statistics and then restart the SOA server. You will see messages in the SOA server console where it uses the orauddi protocol to load the locations and the OSR statistics will increment
K.8 Summary
This has been an OER/OSR add on training lab for the 11gR1 SOA Infrastructure training using the 10.3 version of OER and OSR. Look for additional updates to this material when the 11g versions of OER and OSR products are released. For any additional information and the latest information on those releases, go to http://otn.oracle.com/goto/regrep.
Section K.8
Page 28 of 28
5/26/2009