Click Finish to generate the files for your portlet. The following files should be

Creating Java Portlets 6-25

9. In the Application Navigator, right-click your project and select Deploy, then

select the deployment profile, next select to, and finally select the IntegratedWLSConnection .

10. In the Select deployment type dialog box, select Yes and click OK.

11. When the Deployment Finished message displays in the Deployment Log at the

bottom of Oracle JDeveloper, verify that no errors occurred. 12. Construct the WSDL URL for your JPS-compliant portlet as follows: http:host:portcontext-rootportletswsrp2?WSDL where host is the server to which your producer has been deployed. port is the Oracle Web Cache HTTP Listener port from the Ports tab of the Application Server Control Console main page. context-root is the Web Applications Context Root, which is found in the WAR Deployment Profile Properties under General. 13. In a Web browser, enter the WSDL URL from the previous step to ensure that it is working. If the WSDL definition does not appear in the browser, then the deployment of your WAR file must have failed. Refer to Appendix B.2, Diagnosing Java Portlet Problems . 14. If you are using SSL HTTPS, you must modify your WSDL URL before registering the producer with Oracle Portal. If you are not using SSL, you may skip to the next step now. To modify your WSDL URL, perform the following steps: a. In a Web browser, enter the HTTPS WSDL URL. For example: http:host:portcontext-rootportletsWSRPBaseService?WSDL Each port in the definition should be displayed with an HTTPS location, for example: wsdl:port binding=bind:WSRP_v1_Markup_Binding_SOAP name=WSRPBaseService soap:address location=https:host:portcontext-rootportletsWSRPBaseService wsdl:port b. If the ports are not listed with HTTPS locations, you must change them manually before proceeding. You can do this by saving the XML to a file from the browser and opening it in a text editor. c. Save a copy of the WSDL definition to a file on your application server in a location where it can be accessed externally over HTTP. For example, the htdocs directory of your Apache installation. When you register the producer in Oracle Portal, use the location of this WSDL for your WSDL URL on the Define Connection page of the registration. Note: In order for HTTPS to work with a producer, you must have previously configured the server certificate in the infrastructure server certificate store as described in the Oracle Fusion Middleware Administrators Guide for Oracle Portal. 6-26 Oracle Fusion Middleware Developers Guide for Oracle Portal 15. You should now register your producer and view your portlet. Refer to Section 6.3.4, Registering and Viewing Your JSR 168 Portlet . When you redeploy your portlets to the portlet container, all existing sessions between the producer and all of its consumers are lost. If a consumer tries to reuse an existing producer session, it may receive an error message the first time it tries to contact the producer after redeployment. Error: Could not get markup. The cookie or session is invalid or there is a runtime exception. To reestablish the producers session, refresh the portal page. You wont see this error message if you are re-accessing the portlet from a new browser session because it automatically establishes a new producer session.

6.3.4 Registering and Viewing Your JSR 168 Portlet

After youve created and deployed the provider and its portlets, you should register the provider with Oracle Portal. Registering your provider gives Oracle Portal the information it needs to locate and communicate with that provider. After you register a provider, the provider and its portlets become available in the Portlet Repository. They are also listed in the Oracle Portal Navigator. To register providers for your standards-based portlets:

1. Open Oracle Portal and log in. Note that to register your provider, you need to

have Manage or Edit privileges on providers. If you do not have these privileges, you need to request them from your administrator.

2. If you are not already on the Portal Builder page, click Builder in the upper right

corner.

3. Click the Administer tab.

4. Click the Portlets subtab.

5. In the Remote Providers portlet, click Register a Provider to display the Register

Provider page Figure 6–18 . Note: When you build portlets and providers with built-in tools, such as the Portlet Builder, Oracle Portal automatically registers the provider for you. Once youve created your portlet, it automatically displays in the Portlet Repository. Oracle Portal also offers built-in portlets that are contained in a preconfigured provider. For example, OmniPortlet and Web Clipping are portlets that you can use out of the box, and are already registered with Oracle Portal. You can view these portlets in the Add Portlets list. However, if you build the portlets and providers programmatically, you must then register these providers to make them available to the portal user. Note: If you do not want to install Oracle Portal but you still need to test your portlets, you may want to use the Oracle Portal Verification Service on OTN to validate your WSRP producers: http:portalstandards.oracle.comportalpageportal OracleHostedWSRPPortalWelcome