BizTalkSendHandler Class CustomCfg. Can it be used to set a Biztalk Adapter proxy?

May 24, 2010 at 1:48 PM

I am using MSBuild extension pack v3.5.5.0 for BizTalk 2006 R2 deployments. I use the BizTalkSendHandler Class to create send adapters but there is still a manual step in the deployment where we have to set the Proxy for the adapter.

 I think that the BizTalkSendHandler Class does support this through its CustomCfg property but I cannot find any documentation or examples that show me how to use it.

 If anyone can point me in the right direction it would be much appreciated.

 Many thanks,  Geoff

Coordinator
May 24, 2010 at 2:10 PM

Hi Geoff

Looks like the BizTalk documentation is not complete. I'll fix it for 3.5.6.0 (due this week). There is a CustomCfg property available where you can pass in the config, e.g. I use something like this

        <BizTalkSendHandlersToCreate Include="$(SampleHostName)">
            <DatabaseServer>$(BizTalkSQLServer)</DatabaseServer>
            <ConfigDatabase>$(BiztalkConfigDatabase)</ConfigDatabase>
            <BizTalkServer>$(BizTalkApplicationServer)</BizTalkServer>
            <AdapterName>SMTP</AdapterName>
            <IsDefault>true</IsDefault>
            <CustomCfg>&lt;CustomProps&gt;&lt;SMTPHost vt='8'&gt;$(USMSMTPHost)&lt;/SMTPHost&gt;&lt;SMTPAuthenticate vt='19'&gt;$(SMTPAuthenticate)&lt;/SMTPAuthenticate&gt;&lt;From vt='8'&gt;$(HostSenderEmailAddress)&lt;/From&gt;&lt;/CustomProps&gt;</CustomCfg>
        </BizTalkSendHandlersToCreate>
.....

Then the task runs:

        <MSBuild.ExtensionPack.BizTalk.BizTalkSendHandler TaskAction="Create" HostName="%(BizTalkSendHandlersToCreate.Identity)" MachineName="%(BizTalkSendHandlersToCreate.BizTalkServer)" DatabaseServer="%(BizTalkSendHandlersToCreate.DatabaseServer)" Database="%(BizTalkSendHandlersToCreate.ConfigDatabase)" AdapterName="%(BizTalkSendHandlersToCreate.AdapterName)" Default="%(BizTalkSendHandlersToCreate.IsDefault)" CustomCfg="%(BizTalkSendHandlersToCreate.CustomCfg)" Force="true" Condition="'@(BizTalkSendHandlersToCreate)' != ''"/>

Let me know it that helps you.

Mike

 

May 24, 2010 at 2:14 PM

Hi Mike

Thanks for your swift response.
I will try this today and let you know how it goes.

Regards,

Geoff Corney
Senior Software Engineer
Steria
d +44 (0)118 9847206 (short dial 806 7280)
m +44 (0)780 897 4793

geoff.corney@steria.co.uk

http://www.steria.co.uk
+44 (0)8702 416181

Steria
420 Thames Valley Park Drive
Thames Valley Park
Reading
RG6 1PU
UK


Think before you print - Steria is committed to supporting a sustainable world




"Mikefourie" <notifications@codeplex.com>

24 May 2010 06:10 MST

Please respond to
MSBuildExtensionPack@discussions.codeplex.com

To
geoff.corney@steria.co.uk
cc
Subject
Re: BizTalkSendHandler Class CustomCfg. Can it be used to set a Biztalk Adapter proxy? [MSBuildExtensionPack:213634]





From: Mikefourie

Hi Geoff

Looks like the BizTalk documentation is not complete. I'll fix it for 3.5.6.0 (due this week). There is a CustomCfg property available where you can pass in the config, e.g. I use something like this

<BizTalkSendHandlersToCreate Include="$(SampleHostName)">
<DatabaseServer>$(BizTalkSQLServer)</DatabaseServer>
<ConfigDatabase>$(BiztalkConfigDatabase)</ConfigDatabase>
<BizTalkServer>$(BizTalkApplicationServer)</BizTalkServer>
<AdapterName>SMTP</AdapterName>
<IsDefault>true</IsDefault>
<CustomCfg><CustomProps><SMTPHost vt='8'>$(USMSMTPHost)</SMTPHost><SMTPAuthenticate vt='19'>$(SMTPAuthenticate)</SMTPAuthenticate><From vt='8'>$(HostSenderEmailAddress)</From></CustomProps></CustomCfg>
</BizTalkSendHandlersToCreate>

.....

Then the task runs:

<MSBuild.ExtensionPack.BizTalk.BizTalkSendHandler TaskAction="Create" HostName="%(BizTalkSendHandlersToCreate.Identity)" MachineName="%(BizTalkSendHandlersToCreate.BizTalkServer)" DatabaseServer="%(BizTalkSendHandlersToCreate.DatabaseServer)" Database="%(BizTalkSendHandlersToCreate.ConfigDatabase)" AdapterName="%(BizTalkSendHandlersToCreate.AdapterName)" Default="%(BizTalkSendHandlersToCreate.IsDefault)" CustomCfg="%(BizTalkSendHandlersToCreate.CustomCfg)" Force="true" Condition="'@(BizTalkSendHandlersToCreate)' != ''"/>

Let me know it that helps you.

Mike

Read the full discussion online.

To add a post to this discussion, reply to this email (MSBuildExtensionPack@discussions.codeplex.com)

To start a new discussion for this project, email MSBuildExtensionPack@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com


This email originates from Steria*. It, and any attachments, may contain confidential information and may be subject to copyright or other intellectual property rights. It is only for the use of the addressee(s). You may not copy, forward, disclose, save or otherwise use it in any way if you are not the addressee(s) or responsible for delivery.
If you receive this email by mistake, please advise the sender and cancel it immediately.
Steria may monitor the content of emails within its network to ensure compliance with its policies and procedures.
Any email is susceptible to alteration and its integrity cannot be assured. Steria shall not be liable if the message is altered, modified, falsified, or edited.
_____________________________________________________
* Steria Limited, number 4077975;
Steria Recruitment Limited, number 1437998.
Registered in England and Wales; registered office Three Cherry Trees Lane, Hemel Hempstead, Hertfordshire HP2 7AH

www.steria.co.uk