Bibhakar's profileBibhakar's spacePhotosBlogLists Tools Help

Bibhakar's space

take a deep breathe, pause for a moment - savour
September 17

BizTalk and WSS Adapter

BizTalk WSS Adapter is returning empty strings when using the XPath values as referenced in the documentation at Windows SharePoint Services Adapter Expressions

The document recommends use of syntax as in "PurchaseOrder2 %XPATH=//pons:PurchaseOrder/pons:PurchaseOrderID%.xml". I think the document should clarify that the XPath syntax is valid where element names are "qualified" :)

For example, if you follow the walkthrough modules for the WSS adapter the following expression will work:

"PurchaseOrder2 %XPATH=//pons:PurchaseOrder/PurchaseOrderID%.xml"

Hope this helps

September 11

Using LOB Oracle adapters with BizTalk Server 2006 R2

There are two Oracle adapters:

  1. LOB Oracle DB adapter released as part of R1 - This adapter only works with Tables and has very limited stored procedures execution capability, i.e. stored procedures returning or accepting row sets do not generate valid schemas.
  2. The BizTalk Adapter Pack based on WCF LOB Adapter SDK using WCF is supposed to overcome those limitations.

Note: Both adapters use ODBC data source to connect to Oracle database.

Installing Oracle WCF Adapter from the BizTalk Adapter Pack

Please check the BizTalk Adapter Pack to ensure that you have a compatible version of database and Oracle client installed.

Configuration details for the Oracle WCF Adapter

Sujan's article on Configuring WCF-Custom Adapter for Oracle databases describes the installation process with links to all required components.

Troubleshooting the Oracle WCF Adapter connectivity

After the installation, the key points to get the WCF Oracle adapter working are:

  1. I have used the http://msdn.microsoft.com/en-us/library/cc185273.aspx as guidance to resolve:

"Connecting to the system LOB failed. Could not load file or assembly 'Oracle.DataAccess' Version=2.102.2.20, Culture=neutral, PublicKeyToken=<token>' or one of its dependencies. The system cannot find the file specified."

 By default, Oracle Policy files ensure the use of latest versions of the Oracle.DataAccess.dll.

I had Policy files 1.102 (v1.102.4.0), 10.1(v1.102.2.20) and 10.2 (v1.102.2.20) installed in GAC. Removing the Oracle Policy registrations from GAC resolved error.

  1. Manually register the Oracle.DataAccess.dll. As it is already registered - unregister it first and register it using the gacutil. This step ensures you can connect successfully to Oracle database.
  2. If you get the following error: "Connecting to the LOB system has failed. ORA-12154: TNS:could not resolve the connect identifier specified." Make sure that the ODBC data source name is same as the alias Oracle expects, otherwise it will result in this error and will not connect to Oracle via WCF LOB Oracle adapter.
  3. The username and password are both case sensitive for Oracle DB. Although from ODBC you can use lowercase username to connect to Oracle via ODBC test and Toad, in WCF LOB Oracle adapter, the same was required in uppercase - I have no explanation for this
  4. If you get error about adapter being incompatible with the Oracle client, remove the Oracle client and install the versions as recommended in BizTalk Adapter Pack.

Using the Oracle Package

The following shows a sample Oracle package that was used to generate the schemas and bindings using the Consume Adapter Service option.

    TYPE TechDocsDocAdd IS RECORD (

        DOC_NBR char,

        DOC_REV char,

        TITLE_LINE char     

    );  

   

    TYPE TechDocsDocAddCursor IS REF CURSOR RETURN TechDocsDocAdd; 

   

   PROCEDURE NType_TechDocs_DocAdd(

      i_targetdate   IN       DATE,

      o_resultset    OUT      TechDocsDocAddCursor

    );

 

Note, that where table and package operations are selected at once, the table operation is rarely included in the action mapping in the generated port binding definitions. This leads to “message routing failure” suggesting that the schema for the root element cannot be found.  If this happens, check that you have all the operations listed in the port action mapping in the binding file.

To overcome the above issue, I have used two separate ports one for table related operations and another for Packages. This basically means that I have to generate two sets of metadata via the Consume Adapter service wizard. This is not my preferred option, but it works 100%.

March 10

Creating a VPC imapge for SharePoint development

I am embarking on some workflow development and their integration with SharePoint. So I decided to create a VPC image to setup the developent environment.

 

The following is a list of items I needed to install:

  1. Windows 2003 Server
  2. Office 2007
  3. SQL Server 2005
  4. VS 2005
  5. .NET 3.0 framework with WCF/WPF & WWF extensions for VS2005
  6. SharePoint Server 2007
  7. VS2005 extensions and SDK
  8. Apply all service packs

This post is to summarise what I did to sucessfully create the VPC image from scratch with pointers along the steps to resolve or prevent any issues that may arise.

The first attempt was a install everything required in the order listed above and it failed. The Visual Studio extensions for SharePoint and SDK require the VS2005 SP1 to be correctly installed. It turns out that the required SP1 for VS2005 could not be installed due to signature mismatch error. This happens if your VPC OS is Windows 2003 Server, but does not occur for XP2 with  SP2 or Vista. The resolution was to install a patch http://support.microsoft.com/kb/925336 to allow working with large install files and possibly fragmented memory page files. Thanks to Paul Stovell for pointing out this resource.

 

Given that preparing a VPC image is time consuming task I started the second attempt and creatd regular backup copies of VHD at various success points, not only to return to a known good point but also because I could use that copy of vhd for some other purpose.

 

This attempt also failed. This time, I was still unable to create the SharePoint workflow projects.
 
Oops - given that was the main purpose of the whole exercise.
So what went wrong? Before I answer this, I would like to note that there are a few blog posts that describe this situation and how to resolve it http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2307756&SiteID=1. But it didn't help in my  case.
The suggestions were to:
  1. Register the projectaggregator.dll located in the “%vs80comntools&\..\IDE" folder using the command "Regsvr32 “%vs80comntools&\..\IDE\projectaggregator.dll”"
  2. Type devenv /setup from the Start | Run... and click OK.
  3. Type devenv /ResetSkipPkgs from the Start | Run... and click OK.
The verification of log files revealed that the installation for WF extensions for VS2005 NET3.0 never completed successfully.
 
So in my next attempt I started from W2K3 with SQL server base VPC. At this point the BI components were installed as part of SQL Server 2005 installation and therefore VS2005 was already installed. I proceeded in the following order:
  1. .NET 3.0 framework.
  2. Install WCF/WPF (CTP) extensions for Visual Studio
  3. Apply .NET3.0 SP1
  4. Install SharePoint Server
  5. Install VS WWF extensions
  6. Install VS extensions WSS version 1.1
  7. Install WSS SDK
  8. Apply all service packs
Every thing worked from the word go :)
 
Note: One of my colleague, Chris Hewitt, suggested "the VPC should be a domain controller – if you want to be able to use WebSSO, Profile Imports etc." Keep this in mind if you plan to use these features.
 
 
 

February 06

Publishing BizTalk orchestration as WCF services

 
I have prepared a BizTalk orchestration. build, deployed, configured.
Published the orchestration as webservice and updated web.config file to allow full trust connection.
Testing the webservice thus published (by right-click - browse on the svc file) results in the EXECUTE Permission denied error.
 
 
Fix to the problem:
Verify that the user account used for the BizTalk services is member of the "BizTalk Application Users" and "BizTalk Isolated Host Users" groups.
 
Locat the receive port in the BTS Administration console disable and enable the receive port
Restart the application
 
If this doesn't help - restart the box.
 
... and the web service is working OK.  
 

Bibhakar Saran

No list items have been added yet.