WebCenter .NET Accelerator - Microsoft SharePoint Data via WSRP

Sharepoint_WSRP_NET.png
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.

wsrp_sharepoint_webcenter_620.png

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)

Sharepoint_NET_Accelerator_WSRP_producer.png

Registration in EM

Sharepoint_NET_Accelerator_WSRP_reg.png

Adding the .NET application from the Business Dictionary

Sharepoint_NET_Accelerator_WSRP_adding_portlet.png

.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 follows

    Failed 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:\buildroot\Release\wsrpproducer\1.1.x\WSRPService\src\1.0\WSRPRegistrationService.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:\buildroot\Release\wsrpproducer\1.1.x\WSRPService\src\1.0\WSRPRegistrationService.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.

Sharepoint_NET_Accelerator_WSRP_1_620.png

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!

Comments:

John.. that is really well documented. Thanks for sharing this. Executing this in a POC is an ace effort enough but putting it in a blog and that too in such an articulate manner is a whole different level. Kudos !

Posted by Anoop Deshpande on May 27, 2010 at 01:09 AM CDT #

John.. like Anoop said it is well documented. Infact I'm using this as reference to a POC that i'm involved. I require an existing ASP.Net application to run inside of an webcenter as portlet. I've installed .Net accelerator which installs wsrpproducer in my IIS (webserver). But, when trying to access a webservice of this wsrpproducer I'm getting an object reference error. Below error. When i looked into the assembly version and the referenced version they all looked the same, not sure why this error happened. Also, not sure why error shows e:\buildroot\... as reference I've installed accelerator in c:\ Your valuable suggestion on this is my appreciated. [NullReferenceException: Object reference not set to an instance of an object.] Com.Plumtree.Remote.Transformer.PTTransformer.HandleRequest(HttpContext ctx) in e:\buildroot\Release\wcfilter\3.1.x\filter\src\Com\Plumtree\Remote\Transformer\PTTransformer.cs:60 Com.Plumtree.Remote.Transformer.PTTransformer.BeginRequestHandler(Object sender, EventArgs e) in e:\buildroot\Release\wcfilter\3.1.x\filter\src\Com\Plumtree\Remote\Transformer\PTTransformer.cs:54 System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +68 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75 Thanks & Regards, VJ

Posted by VJ on June 08, 2010 at 05:47 PM CDT #

VJ, Thank you for your comments. Where are you seeing this error surfaced? Is it when you try to register the WSRP endpoint in Enterprise Manager? Also - have you used the correct template in Visual Studio when creating your application? You will need to create your application using a particular templates that ships with the .NET Accelerator. HTH! John

Posted by john.brunswick on June 09, 2010 at 01:52 AM CDT #

John, great write up. You mention that one of the issues in creating the integration is making sure that the xml is well formatted and conforms to the specifications. Do you have any recommendations on troubleshooting the xml in the event that they error seems to be coming from there? Thanks again!

Posted by ronald schindler on July 19, 2010 at 01:27 AM CDT #

Thanks Roland. The issues that I generally hit around the XML were the following 1. Network connectivity - I was running 2VMs on a single physical machine and for whatever reason Enterprise Manager / WebCenter had some issues resolving certain hosts / IPs even if they were able to be pinged, located through the browser. I chalk this up to my own error and not the error of the applications, but it did cost me a few late nights. 2. WebLogic Logs - if you have WebLogic running so that you can see the console output, this is where the best error info for the WSDL issues will be found. Anytime that things were not well formatted, the console quickly pointed to which line in my XML was the culprit. 3. Use the Samples and Work Backward - when using the .NET accelerator it ships with a sample XML file. I used that and worked backward from it. If you are still having issues drop me a line and I will do my best to help! HTH

Posted by john.brunswick on July 21, 2010 at 05:14 AM CDT #

Post a Comment:
Comments are closed for this entry.
About

Enterprise 2.0 and Content Management

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today