BizTalk Server Tools - Deploying assembly with BizTalk 2004

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server Tools > June 2004 > Deploying assembly with BizTalk 2004





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Deploying assembly with BizTalk 2004
Sebastian Hek

2004-06-20, 11:10 pm

Dear all,

I'm trying to deply an assembly from my test/development environment onto the acceptance environment we have here. My assembly contains an orchestration which receives a file (over FTP) and sends this file to another party (party2), again over FTP.

Another (correlated) message is created by party2 and received/polled over FTP.
In my test environment, the FTP addresses and settings are different from the acceptance & production environment.

How can I change the settings easily as an administrator when I deply my assembly, or after I deplyed it.
I've checked a binding file, but the FTP adapter settings are stored into a XML string. Because the binding file is also XML, the adapter string is converted into "HTML-like text":
========================================
====
<SendPortCollection>
<SendPort Name="SendPortName" IsStatic="true" IsTwoWay="false">
<TransmitPipeline Name="PipelineName" FullyQualifiedName="PipelineName, Assemblyname, Version=1.0.0.0, Culture=neutral, PublicKeyToken=112233445566" Type="2" />
<PrimaryTransport>
<Address>ftp://127.0.0.1:21/test/Out/testfile1.txt</Address>
<TransportType Name="FTP" Capabilities="15371" ConfigurationClsid="3979ffed-0067-4cc6-9f5a-859a5db6e9bb" />
<TransportTypeData>&lt;CustomProps><AdapterConfig vt="8">&lt;Config xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;&lt;uri&gt;ftp://127.0.0.1:21/test/Out/testfil...mp;lt;serverAdd
ress&gt;127.0.0.1&lt;/serverAddress&gt;&lt;serverPort&gt;21&lt;/serverPort&gt;&lt;userName&gt;ftpuser&lt;/userName&gt;&lt;password&gt;******&lt;/password&gt;&lt;targetFolder&gt;test/Out&lt;/targetFolder&gt;&lt;targetFileName&gt;testfile1.txt&lt;/targetFil
eName&gt;&lt;representationType&gt;ASCII&lt;/representationType&gt;&lt;allocateStorage&gt;False&lt;/allocateStorage&gt;&lt;passiveMode&gt;False&lt;/passiveMode&gt;&lt;firewallType&gt;NoFirewall&lt;/firewallType&gt;&lt;firewallPort&gt;21&lt;/firewallPort&g
t;&lt;/Config&gt;</AdapterConfig></CustomProps></TransportTypeData>
<RetryCount>3</RetryCount>
<RetryInterval>5</RetryInterval>
<ServiceWindowEnabled>false</ServiceWindowEnabled>
<FromTime>2004-06-14T00:00:00.0000000-07:00</FromTime>
<ToTime>2004-06-14T23:59:59.0000000-07:00</ToTime>
<Primary>true</Primary>
<OrderedDelivery>false</OrderedDelivery>
</PrimaryTransport>
<SecondaryTransport>
<Address />
<RetryCount>3</RetryCount>
<RetryInterval>5</RetryInterval>
<ServiceWindowEnabled>false</ServiceWindowEnabled>
<FromTime>2004-06-14T00:00:00.0000000-07:00</FromTime>
<ToTime>2004-06-14T23:59:59.0000000-07:00</ToTime>
<Primary>false</Primary>
<OrderedDelivery>false</OrderedDelivery>
</SecondaryTransport>
<ReceivePipelineData xsi:nil="true" />
<Tracking>0</Tracking>
<Filter />
<Transforms />
</SendPort>
========================================
====

As you see, the 'TransportTypeData' node contains an XML string, where the < and the > are replaced with there corresponding HTML tags. This makes it not very easy (?) to maintain the assembly. Furthermore, some fields exist more than once in the string,
like the address (127.0.0.1) or the filename (textfile1.txt) etc. This is asking for mistakes I think.

So, I looked into another option: WMI
But, the WMI CM Studio displys the same (HTML-encoded) string, so it doesn't get any better.

Can anyone tell me their experience with configuring and maintaining an assembly after deployment? Also, if the FTP adapter is used, how did you do that?
I'm not willing to install Visual Studio onto the "Production" environment just to be able to use BizTalk Explorer......
Monah Khalil [MSFT]

2004-06-20, 11:10 pm

Hi Sebastian,

You can use this script to programatically create the receive location:

/// <summary>
/// create receive location
/// </summary>
public void CreateCUSTOMReceiveLocation()
{
ReceivePort rp = bceExplorer.AddNewReceivePort(false);
rp.Name = "My CUSTOM Receive Port";

ReceiveLocation rl = null;

rl = bceExplorer.ReceivePorts["My CUSTOM Receive
Port"].AddNewReceiveLocation();
rl.Name= "My CUSTOM Receive Location";

foreach(ReceiveHandler handler in bceExplorer.ReceiveHandlers)
{
if(handler.TransportType.Name == "CUSTOM")
{
rl.ReceiveHandler = handler;
break;
}
}

foreach (ProtocolType protocol in bceExplorer.ProtocolTypes)
{
if(protocol.Name == "CUSTOM")
{
rl.TransportType = protocol;
break;
}
}

foreach(Pipeline pipeline in bceExplorer.Pipelines)
{
if(pipeline.FullName ==
"Microsoft.BizTalk.DefaultPipelines.PassThruReceive")
{
rl.ReceivePipeline = pipeline;
break;
}
}

string sTransportTypeData=@"<CustomProps>
<AdapterConfig vt=\"8\">
<Send xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"
xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">
<customProperty1>cp1</customProperty1>
<customProperty2>cp2</customProperty2>
<customProperty3>cp3</customProperty3>
<customProperty4>cp4</customProperty4>
</Send>
</AdapterConfig>
</CustomProps>";
rl.TransportTypeData = sTransportTypeData.Replace("\r\n",""); //flatten
out the string with no line breaks
rl.Address = "CUSTOM://WHATEVERADDRESS";

rl.Enable = true;

bceExplorer.SaveChanges();
}

Does that solve the issue?

--
Thanks,

Monah
Microsoft Corporation
http://www.microsoft.com
--
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
© 2003 Microsoft Corporation. All rights reserved.
"Please do not send email directly to this alias. This is our online account
name for newsgroup participation only."

--------------------
> Thread-Topic: Deploying assembly with BizTalk 2004
> thread-index: AcRSwXqkuCpgnjYKTXaMml6QEZ4y+w==
> X-WBNR-Posting-Host: 194.151.183.21
> From: "=?Utf-8?B?U2ViYXN0aWFuIEhlaw==?=" <Sebastian

Hek@discussions.microsoft.com>
> Subject: Deploying assembly with BizTalk 2004
> Date: Tue, 15 Jun 2004 03:14:01 -0700
> Lines: 49
> Message-ID: <59E34D89-EAFC-48D0-B2C5-1E704741ECF2@microsoft.com>
> MIME-Version: 1.0
> Content-Type: text/plain;
> charset="Utf-8"
> Content-Transfer-Encoding: 7bit
> X-Newsreader: Microsoft CDO for Windows 2000
> Content-Class: urn:content-classes:message
> Importance: normal
> Priority: normal
> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
> Newsgroups: microsoft.public.biztalk.tools
> NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 127.0.0.1
> Path:

cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA
03.phx.gbl
> Xref: cpmsftngxa10.phx.gbl microsoft.public.biztalk.tools:3768
> X-Tomcat-NG: microsoft.public.biztalk.tools
>
> Dear all,
>
> I'm trying to deply an assembly from my test/development environment onto

the acceptance environment we have here. My assembly contains an
orchestration which receives a file (over FTP) and sends this file to
another party (party2), again over FTP.
>
> Another (correlated) message is created by party2 and received/polled

over FTP.
> In my test environment, the FTP addresses and settings are different from

the acceptance & production environment.
>
> How can I change the settings easily as an administrator when I deply my

assembly, or after I deplyed it.
> I've checked a binding file, but the FTP adapter settings are stored into

a XML string. Because the binding file is also XML, the adapter string is
converted into "HTML-like text":
> ========================================
====
> <SendPortCollection>
> <SendPort Name="SendPortName" IsStatic="true" IsTwoWay="false">
> <TransmitPipeline Name="PipelineName"

FullyQualifiedName="PipelineName, Assemblyname, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=112233445566" Type="2" />
> <PrimaryTransport>
> <Address>ftp://127.0.0.1:21/test/Out/testfile1.txt</Address>
> <TransportType Name="FTP" Capabilities="15371"

ConfigurationClsid="3979ffed-0067-4cc6-9f5a-859a5db6e9bb" />
> <TransportTypeData>&lt;CustomProps><AdapterConfig

vt="8">&lt;Config xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;&lt;uri&gt;ftp://12
7.0.0.1:21/test/Out/testfile1.txt&lt;/uri&gt;&lt;serverAddress&gt;127.0.0.1&
lt;/serverAddress&gt;&lt;serverPort&gt;21&lt;/serverPort&gt;&lt;userName&gt;
ftpuser&lt;/userName&gt;&lt;password&gt;******&lt;/password&gt;&lt;targetFol
der&gt;test/Out&lt;/targetFolder&gt;&lt;targetFileName&gt;testfile1.txt&lt;/
targetFileName&gt;&lt;representationType&gt;ASCII&lt;/representationType&gt;
&lt;allocateStorage&gt;False&lt;/allocateStorage&gt;&lt;passiveMode&gt;False
&lt;/passiveMode&gt;&lt;firewallType&gt;NoFirewall&lt;/firewallType&gt;&lt;f
irewallPort&gt;21&lt;/firewallPort&gt;&lt;/Config&gt;</AdapterConfig></Custo
mProps></TransportTypeData>
> <RetryCount>3</RetryCount>
> <RetryInterval>5</RetryInterval>
> <ServiceWindowEnabled>false</ServiceWindowEnabled>
> <FromTime>2004-06-14T00:00:00.0000000-07:00</FromTime>
> <ToTime>2004-06-14T23:59:59.0000000-07:00</ToTime>
> <Primary>true</Primary>
> <OrderedDelivery>false</OrderedDelivery>
> </PrimaryTransport>
> <SecondaryTransport>
> <Address />
> <RetryCount>3</RetryCount>
> <RetryInterval>5</RetryInterval>
> <ServiceWindowEnabled>false</ServiceWindowEnabled>
> <FromTime>2004-06-14T00:00:00.0000000-07:00</FromTime>
> <ToTime>2004-06-14T23:59:59.0000000-07:00</ToTime>
> <Primary>false</Primary>
> <OrderedDelivery>false</OrderedDelivery>
> </SecondaryTransport>
> <ReceivePipelineData xsi:nil="true" />
> <Tracking>0</Tracking>
> <Filter />
> <Transforms />
> </SendPort>
> ========================================
====
>
> As you see, the 'TransportTypeData' node contains an XML string, where

the < and the > are replaced with there corresponding HTML tags. This makes
it not very easy (?) to maintain the assembly. Furthermore, some fields
exist more than once in the string, like the address (127.0.0.1) or the
filename (textfile1.txt) etc. This is asking for mistakes I think.
>
> So, I looked into another option: WMI
> But, the WMI CM Studio displys the same (HTML-encoded) string, so it

doesn't get any better.
>
> Can anyone tell me their experience with configuring and maintaining an

assembly after deployment? Also, if the FTP adapter is used, how did you do
that?
> I'm not willing to install Visual Studio onto the "Production"

environment just to be able to use BizTalk Explorer......
>


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com