WebCenter .NET Accelerator – Microsoft SharePoint Data via WSRP

Platforms in the enterprise will never be homogeneous. As much as any vendor would enjoy having their single development or application technology be exclusively adopted by customers, too much legacy, time, education, innovation and vertical business needs exist to make using a single platform practical. JAVA and .NET are the two industry application platform heavyweights and more often than not, business users are leveraging various systems in their day to day activities that incorporate applications developed on top of both platforms.

BEA Systems acquired Plumtree Software to complete their “liquid” view of data, stressing that regardless of a particular source system heterogeneous data could interoperate at not only through layers that allowed for data aggregation, but also at the “glass” or UI layer. The technical components that allowed the integration at the glass thrive today at Oracle, helping WebCenter to provide a rich composite application framework. Oracle Ensemble and the Oracle .NET Application Accelerator allow WebCenter to consume and interact with the UI layers provided by .NET applications and a series of other technologies. The beauty of the .NET accelerator is that it can consume any .NET application and act as a Web Services for Remote Portlets (WSRP) producer.

I recently had a chance to leverage the .NET accelerator to expose a ASP .NET 2.0 (C#) application in the WebCenter UI (pictured above) and wanted to share a few tips to help others get started with similar integrations. I was using two virtual machines for the exercise – one with Windows Server 2003, running SharePoint and the other running WebCenter Spaces 11g. For my sample application data I ended up using SharePoint 2007 lists and calendars (MOSS 2007) to supply results using a .NET API for SharePoint.


Setting up the .NET Accelerator and Servers

  • Download the latest version of the .NET accelerator (WSRP Producer / .NET Portlet Toolkit) from the Oracle® E-Delivery Web site. You can find the download within the “Oracle® Application Server 10g Release 3 (10.1.3) Media Pack for Microsoft Windows” Product Pack “Oracle WebCenter Application Accelerator for .NET 10.3.0 for Microsoft Windows (32-bit and 64-bit)”.
  • Make sure that the prerequisites are installed like Web Services Enhancements – Windows Server 2003 SP2, WSE 2.0 SP3, ASP .NET 2.0, IIS 6 – view requirements
  • Install the .NET Application Accelerator – installing the WSRP producer
  • Install the WebCenter Portlet Toolkit for .NET, which will allow you to create projects using templates that will add the necessary libraries and configuration files for your application – installing the .NET portlet toolkit
  • Grab a copy of MS Visual Web Developer 2008 Express Edition to use with the .NET Portlet Toolkit for development. Once this is installed and you have
    the ability to create a “WSRP Portlet Page” from within Visual Studio. Details can be found at WRSP authoring – creating a .NET portlet

Once you have configured the wsrp-producer.xml file the .NET producer application in IIS shown below, it can be registered in EM – then added as a portlet from the Business Dictionary. For more details about the wsrp-producer.xml read the guide located at WSRP Producer Configuration Elements (wsrp-producer.xml)
Registration in EM

Adding the .NET application from the Business Dictionary

.NET Accelerator Tips

  • When registering the WSRP endpoint in Enterprise Manager (EM) you may receive an error. In order to make sense of the error output within EM make sure that any errors within the .NET are displayed by modifying the WebConfig for the .NET Producer to set customerErrors mode to “Off”. This allows you to get detailed information about a failure as followsFailed to register the portlet producer. See log for details.
    The attempt to register the producer with ID ‘/oracle/adf/portlet/dn_f18ba447-1085-4cbb-b646-b1a6050e4766’ for connection ‘dn’ failed.
    HTTP request to URL http://172.16.168.142/wsrpproducer/1.0/WSRPService.wsdl failed with status code 500 reason . Check that the producer URL has been correctly specified, that the producer server machine and producer container are running, that the producer application is deployed correctly, and that the client can reach the server if behind a firewall.
    System.Web.Services.Protocols.SoapException: Registration not required.
    at WSRPService._1_0.WSRPRegistrationService.register(RegistrationData register1) in e:buildrootReleasewsrpproducer1.1.xWSRPServicesrc1.0WSRPRegistrationService.asmx.cs:line 49
    javax.management.RuntimeMBeanException: The attempt to register the producer with ID ‘/oracle/adf/portlet/dn_f18ba447-1085-4cbb-b646-b1a6050e4766’ for connection ‘dn’ failed.HTTP request to URL http://172.16.168.142/wsrpproducer/1.0/WSRPService.wsdl failed with status code 500 reason . Check that the producer URL has been correctly specified, that the producer server machine and producer container are running, that the producer application is deployed correctly, and that the client can reach the server if behind a firewall.

    System.Web.Services.Protocols.SoapException: Registration not required.
    at WSRPService._1_0.WSRPRegistrationService.register(RegistrationData register1) in e:buildrootReleasewsrpproducer1.1.xWSRPServicesrc1.0WSRPRegistrationService.asmx.cs:line 49

  • XML, XML, XML – one of the most common issues registering with EM has to do with invalid XML markup in the wsrp-producer.xml file. The above stack trace is an example of the output that EM will receive if the remoteErrors is set to “Off”. Check and make certain that the markup is well formated and conforms to the specifications outlined at WSRP Producer Configuration Elements (wsrp-producer.xml)
  • Logs – Use Windows Event Viewer to check for issues within the various logs that may collect data about errors, specifically the WSRP log that is added.

MOSS 2007 APIs Authentication

  • The actual API work is easy to pull the records for the lists and calendars (2 lines!), but make certain that the authentication between systems is sorted out. Your application may run fine when it runs stand-alone and pulls the data, but may fail when using the WSRP Producer with a “401 UNAUTHORIZED” error. This is most likely due to failure with authentication during your web services call to SharePoint to grab the list data. A few things to check 1. ACLs on SharePoint items (set in SharePoint admin interface), 2. User that you are using to connect to the SharePoint instance with 3. Security on the SharePoint web service instance set in IIS 4. The user account that is running the system level process that actually runs the application that you are using to request the data from SharePoint. Think about each layer in the authentication and it will eventually make sense at what point the failure is happening. For testing purposes and to rule out any issues with the user that the service is running under, you can encapsulate your code using the SharePoint APIs with the following command “SPSecurity.RunWithElevatedPrivileges(delegate(){**your code here**})”.

Networking Issues

  • When you are registering the .NET Producer inside of EM make sure that the network connectivity, host names, etc are accessible for the machines involved in the WSRP communication. For testing I ran two virtual machines and found that even though the machines could ping each other and request HTTP from each other without issue the EM registration process had some issues if my host changed networks. To counter this issue, I restarted my VMs each time that I did development to save the remainder of my hair and sanity.

Once you have the pattern down around registration it is straightforward to quickly re-use and develop .NET assets to use inside of WebCenter.

I hope that the above helps people to get started with .NET development within the WebCenter technology. I would be interested in hearing about other people’s experiences, as this is certainly an excellent technology for Oracle to continue innovating with. Happy .NETing!

Leave a comment