Sample Files Writing a Subscription Notification Service

Example 14. package.xml ?xml version=1.0 encoding=UTF-8? package xmlns=http:systinet.comwasppackage1.2 xsi:schemaLocation=http:systinet.comwasppackage1.2 http:systinet.comwasppackage1.2 targetNamespace=http:my.org version=1.0 name=ExampleNotificationListener client-package=false library=false xmlns:xsi=http:www.w3.org2001XMLSchema-instance xmlns:tns=http:my.org xmlns:uddi_subr_v3=urn:uddi-org:subr_v3 xmlns:uddiclient_subscription_listener_v3= http:systinet.comuddiclientsubscriptionlistenerv35.0 dependency ref= uddiclient_subscription_listener_v3:UDDIClient-subscription-listener-v3 version=5.0 service-endpoint name=ExampleNotificationListener path=ExampleNotificationListener service-instance=tns:ExampleNotificationListenerInstance processing=uddiclient_subscription_listener_v3:UDDIClientProcessing wsdl uri=uddi_subr_v3.wsdl service=uddi_subr_v3:UDDI_SubscriptionListener_SoapService service-endpoint service-instance name=ExampleNotificationListenerInstance implementation-class=com.systinet.subscription.ExampleNotificationListener preload=false ttl=600 instantiation-method=shared package

3.6. Writing a Content Checker

In this section, we will show you how to create a content checker. The content checker provides an approver the ability to programmatically check data for approval. We assume you are familiar with the Approval Process, which is described in the following sections: • Users Guide, Section 1.5, Approval Process in Oracle Service Registry • Administrators Guide, Section 7, Approval Process Principles We will show you how to create and deploy a content checker on the following example: an Approver set a rule that each business entity name must start with prefix org_. Data that does not satisfy this rule cannot be approved that is, copied to a discovery registry. The content checker is executed when a approver clicks on the Approve button in the Approve request page of the Oracle Service Registry console. To set up this optional content checking: 1. Write a class that implements the class org.systinet.uddi.approval.checker.v3.CheckerApi. 2. Deploy the implementation class to the Oracle Service Registry. 3. Register the implementation of the content checker class in the Oracle Service Registrys data. Now, we will look at the steps in detail: Page 548

3.6. Writing a Content Checker

1. Write a class that implements the org.systinet.uddi.approval.checker.v3.CheckerApi a. Create the content checker class as shown in Example 15, Content Checker Implementation . b. Compile the CheckerApiImpl.java, and add jars from the directory PUBLICATION_REGISTRY_HOMEdist to the class path. 2. Deploy the implementation class to the Oracle Service Registry. Note In the case of deployment to an application server, you must make the modifications in the location where they will be used. This may mean in the registry directory where registry is unpacked inside the application server, not in the installation directory. If the registry is not yet deployed, but the WAREAR file is available, modify the WAREAR file first and then deploy it. The relative paths for files are the same but PUBLICATION_REGISTRY_HOME is different. a. Copy the CheckerApiImpl.class to the file PUBLICATION_REGISTRY_HOMEappuddiservicesWASP- INFlibapproval_staging_v3.jar to the folder comsystinetuddiapprovalv3approver inside the jar file. b. Shutdown the Publication Registry, delete the PUBLICATION_REGISTRY_HOMEwork directory, and restart the Publication Registry. 3. Register the implementation of the content checker class in the Oracle Service Registry data. a. Log on to the Publication Registry as an approver. The content checker will be applicable to an approver who follows these steps: b. Publish the WSDL of the checker service: Publish the WSDL located at http:host_name:http_portuddidocwsdlapproval_checker.wsdl to a new or already existing business entity. Use the Advanced publishing mode and be sure to reuse the e x i s t i n g W S D L p o r t T y p e t M o d e l n a m e : CheckerApi , t M o d e l s k e y : uddi:systinet.com:uddi:service:porttype:approvalchecker . The WSDL service approval_checker_SoapService will be published under the business entity. c. Specify the checker in the access point of a new binding template under the approval_checker_SoapService service. Enter the value of access point which starts with the class: prefix and continue with the fully qualified class name. For example, class:com.systinet.uddi.approval.v3.approver.CheckerApiImpl. Page 549

3.6. Writing a Content Checker