Friday, July 11, 2008

BizTalk WCF Oracle Dynamic Send Port

How to implement WCF Oracle Dynamic Send Port? There is an example in Microsoft BizTalk Adapter 3.0 for Oracle Database Documentation:-

Request2(BTS.OutboundTransportType)="WCF-Custom";
Request2(WCF.Action)="http://Microsoft.LobServices.OracleDB/2007/03/SCOTT/Table/ACCOUNTACTIVITY/Select";
Request2(WCF.BindingType) = "oracleDBBinding";
Request2(WCF.UserName)="SCOTT";
Request2(WCF.Password)="TIGER";
SendPort(Microsoft.XLANGs.BaseTypes.Address)="oracledb://adapdoc/";

If you deployed the code may hit the error:-
Event Type: Error
Event Source: BizTalk Server 2006
Event Category: BizTalk Server 2006
Event ID: 5754
Date: 7/3/2008
Time: 11:21:31 AM
User: N/A
Computer: AMSDC1-S-7538
Description:A message sent to adapter "Oracle" on send port "OracleDynamicSendPort_1.0.0.0_OracleDynamicSendPort.OracleSend_Port_DynamicOracle_beec5c3523602cdb" with URI "oracledb://TNSNAME/?PollingId=1" is suspended. Error details: Value cannot be null.Parameter name: s MessageId: {A7F0A852-C315-4521-9B63-E0BFE221F4AE} InstanceID: {FF53A23E-3F21-4098-A02B-8381E6C3D851}

The solution is to add additional line in the code above:-

SendPort(Microsoft.XLANGs.BaseTypes.TransportType) = "WCF-Custom";

Then this exception will be resolved.

NOTE: to use the WCF Oracle Dynamic Send Port, the Adapter's default send handler, i.e. the BizTalk hosts must be running.

No comments: