AquaLogic .NET Portlet Toolkit WSRP Development Guide

     Previous Next  Open TOC in new window   View as PDF - New Window  Get Adobe Reader - New Window
Content starts here

Debugging WSRP Portlets

To debug WSRP portlets, use WebLogic Portal logging tools and check the list of common configuration problems.

If you encounter trouble accessing the WSRP Producer from the WebLogic Portal IDE or online administrative tools, attempt to access the WSRPService.wsdl using a web browser at this address: http://<IP-address>:<port-number>/wsrpproducer/1.0/WSRPService.wsdl If errors are returned, correct them; if no errors are returned, switch to the WLP Eclipse tools and examine the error log.

WebLogic Portal also provides a SOAP monitor to track SOAP traffic between a WSRP Consumer and Producer. For detailed instructions on accessing the SOAP monitor, see Using the Monitor Servlet When using the SOAP monitor, it is helpful to create a new .portal file with a single portlet so you can view the traffic between the Consumer and a single Producer.

The following list provides solutions to common configuration problems.

  • Preferences don't work over WSRP in WebLogic Portal: Ensure that the WebLogic .portal file has been converted to streaming mode. For details, see Managing Portal Desktops in the WebLogic Portal documentation.
  • Images do not appear in WSRP portlets: The WebLogic Portal WSRP Consumer allows access to resources hosted in remote web applications acting as WSRP Producers. The AquaLogic Interaction .NET Application Accelerator’s WSRP Producer is a web application that is separate from the ASP.NET web sites being consumed. WebLogic Portal must be configured to allow URL-addressable content such as images, style sheets, and JavaScript includes to be returned to WLP and users' web browsers. To do this, a ResourceConnectionFilter must be added to the WebLogic Portal applications as shown in the example below. This code sample is for WebLogic Portal 9.2.
    <code>
    package local;
    import com.bea.wsrp.consumer.resource.ResourceConnectionFilter;
    public final class AllowAllResourceConnectionFilter
    	implements ResourceConnectionFilter 
    	{
    		/**
         * Accept all resource URIs.
         * @return always returns <code>true</code>
         */
            public boolean allowedURL(String resourceURI) {
            return true;
            }
    	}
    </code>
    This class is registered in WLP by adding an entry in the appropriate location in the WEB-INF/web.xml file. For example, the following code registers the permissive ResourceConnectionFilter implemented above.
    <!--  WLP 9.2 ResourceProxyServlet -->
    <servlet>
    	<servlet-name>com.bea.wsrp.consumer.resource.ResourceProxyServlet</servlet-name>
    	<servlet-class>com.bea.wsrp.consumer.resource.ResourceProxyServlet</servlet-class>
    		<init-param>
    			<param-name>resourceConnectionFilter</param-name>
    			<param-value>local.AllowAllResourceConnectionFilter</param-value>
    	</init-param>
    </servlet>
    	<servlet-mapping>
    		<servlet-name>com.bea.wsrp.consumer.resource.ResourceProxyServlet</servlet-name>
    			<url-pattern>/resource/*</url-pattern	>
    	</servlet-mapping>
    Note: This code is intended as an example and is not suitable for production. In production environments, we recommend that applications constrain allowable URLs to those that are known to produce remote ASP.NET web sites. For more information, see the WLP 9.2 API documentation. For details on configuring a ResourceConnectionFilter in WLP 8.1, see Establishing WSRP Security
  • Portlet styles and themes are not displayed: Some portals strictly enforce the HTML 4.01 DTD. Portlets that use deprecated HTML might not be displayed correctly. Confirm the DTD used by the target portal and design your portlets accordingly.

  Back to Top      Previous Next