Debugging WSRP Portlets
To debug WSRP portlets, use Oracle WebLogic Portal logging
tools and check the list of common configuration problems.
If you encounter trouble accessing the WSRP Producer from
the Oracle 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 Oracle WebLogic Portal Eclipse tools and examine the
error log.
Oracle 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 in the Oracle WebLogic Portal documentation. 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 Oracle WebLogic
Portal: Ensure that the WebLogic .portal file has been converted
to streaming mode. For details, see Managing Portal Desktops in the Oracle WebLogic Portal documentation.
- Images do not appear in WSRP portlets: The Oracle
WebLogic Portal WSRP Consumer allows access to resources hosted in
remote web applications acting as WSRP Producers. The Oracle WebCenter
Application Accelerator for .NET WSRP Producer is a web application
that is separate from the ASP.NET web sites being consumed. Oracle
WebLogic Portal must be configured to allow URL-addressable content
such as images, style sheets, and JavaScript includes to be returned
to Oracle WebLogic Portal and users' web browsers. To do this, a ResourceConnectionFilter must be added to the portal applications
as shown in the example below. This code sample is for Oracle 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 Oracle WebLogic
Portal 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 Oracle WebLogic Portal 9.2 API documentation. For details
on configuring a ResourceConnectionFilter in Oracle
WebLogic Portal 8.1, see Establishing WSRP Security in the
Oracle WebLogic Portal documentation.
- 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.