Rediger

Del via


Configure dynamic ports in the SQL adapter

In BizTalk Server, you can configure dynamic ports for a WCF-Custom adapter. Because the SQL adapter is a WCF-based adapter, you can dynamically configure a port for the SQL adapter by using message context properties.

Use an expression shape

For the SQL adapter, the URI, action, and binding may be determined from a property on an incoming message, and then specified in the Expression shape, as shown in the following example:

Request2=Request1;  
Request2(WCF.Action)="TableOp/Insert/dbo/CustomerTable";  
Request2(WCF.BindingType)="sqlBinding";  
Request2(WCF.UserName)="myuser";  
Request2(WCF.Password)="mypass";  
SendPort(Microsoft.XLANGs.BaseTypes.Address)="mssql://sql_server/my_instance/my_database";  
SendPort(Microsoft.XLANGs.BaseTypes.TransportType)="WCF-Custom";  
  

Note

If you are using a WCF-SQL adapter in BizTalk Server Administration console, you can also specify the transport type as SendPort(Microsoft.XLANGs.BaseTypes.TransportType)="SQLAdapter", where SQLAdapter is the name with which you added the WCF-SQL adapter in BizTalk Server Administration console.

In the preceding example,

  • Request2 message is being created from Request1 message. Both messages map to an operation schema, which is generated using the Consume Adapter Service Add-in.

  • SendPort is the name of the logical send port in the BizTalk orchestration.

    The Expression shape is part of the BizTalk orchestration. Deploying the orchestration also creates a WCF-Custom send port.

    For more information about configuring dynamic ports, see Configuring Dynamic Send Ports Using WCF Adapters Context Properties.

See Also

Building blocks to develop BizTalk applications with the SQL adapter