 |
|
 |
|
|
 |
Dynamic use of FTP Adapter |
 |
 |
|
|
04-25-04 03:35 PM
Hi Samyu!
Have good news for you :-) Please do following:
- construct a dynamic send port
- connect your send shape to it
- before sending a message to it, drop an expression shape
- enter following to achieve your goals: (just a sample, you'll need to
adjust)
//configure your dynamic FTP port:
orchprtSndMyMessagePort(Microsoft.XLANGs.BaseTypes.Address) =
ftp://myserver/mydirectory/myfilename.xml;
//set context on the message you want to send:
msgMyMessage(FTP.UserName) = "myFTPUsername";
msgMyMessage(FTP.Password) = "myFTPPassword";
msgMyMessage(BTS.RetryCount) = 20;
msgMyMessage(BTS.RetryInterval) = 2;
So far the dynamic use of the FTP adapter. There's no way you can grasp the
return value of the FTP operation. That kind of things is completely hidden
by the adapter itself. HOWEVER: to achieve your final goal (being: just
knowing whether it succeeded): there's a switch on the level of your
orchestration's send port, called: "DeliveryNotification". Set this to
"Transmitted". This will ensure that your orchestration stops working,
until the adapter has succesfully transmitted the message. If the message
fails, an exception will be thrown "XLang.DeliveryFailureException" (Not
sure... just a guess.). You can catch this one if you like.
Kind regards,
Christof
"Samyu" <anonymous@discussions.microsoft.com> wrote in message
news:CCC24F94-6974-40FB-8671-5D16EE315E0C@microsoft.com...
> Christof
>
> Thanks for your help. First of all, I would like to know how to configure
FTP Adpater.
> I know that we can give user name and password at design time by clicking
on properties.
>
> But in my case, depending on a condition the ftp path, user name and
password would vary.
> Hence I used to store thse information in DB and fetch it and do the
necessart ftp.
> How will I achieve this?
>
> After successful completion of ftping the files, I need to know the
status.
>
> Depending on its success or failure, I need to send additional files for
the same.
>
> Thanks in advance
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
 |
RE: Dynamic use of FTP Adapter |
 |
 |
|
|
04-26-04 01:35 PM
Christof
Thanks a lot for your guidance
I will try out a sample, can you please correct if I end up with any issues.
.
[ Post a follow-up to this message ]
|
|
|
 |
|
|
|
 |
RE: Dynamic use of FTP Adapter |
 |
 |
|
|
04-26-04 04:37 PM
Hi christof
I tried your sample
How will I give the following
//set context on the message you want to send:
msgMyMessage(FTP.UserName) = "myFTPUsername";
msgMyMessage(FTP.Password) = "myFTPPassword";
msgMyMessage(BTS.RetryCount) = 20;
msgMyMessage(BTS.RetryInterval) = 2;
I understand that msgMyMessage is a message whose message operation type pro
perty is set to a
valid schema. But assuming msgMyMessage do not have these details (FTP usern
ame, etc.,),
as I need to fetch the same from DB, how will I assign to message variables
and use it?
I am not very clear about this. Please explain.
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
 |
RE: Dynamic use of FTP Adapter |
 |
 |
|
|
04-26-04 04:37 PM
Christof
I will be getting a flat file schema to this send port which may not have ho
ld any ftp details.
Also, while configuring a direct binding in send port, whcih option should I
select such as
Correlation, directiong to other orchestration etc.,?
Thanks in advance
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
 |
Re: Dynamic use of FTP Adapter |
 |
 |
|
|
04-26-04 06:37 PM
Enter this in the construct message shape for your outbound message.
The FTP.UserName etc are part of the FTP adapter's context. This kind of
context can be set regardless of the type of message you send. Just try it,
then come back to me :-)
The strings "myFTPUsername" and "myFTPPassword" for example can be variables
as well. (Just call a .NET component wich fetches those from a database.)
Kind regards,
Christof
"Samyu" <anonymous@discussions.microsoft.com> wrote in message
news:13592348-F88A-4F96-8273-312AA16BB502@microsoft.com...
> Hi christof
>
> I tried your sample
>
> How will I give the following
>
> //set context on the message you want to send:
> msgMyMessage(FTP.UserName) = "myFTPUsername";
> msgMyMessage(FTP.Password) = "myFTPPassword";
> msgMyMessage(BTS.RetryCount) = 20;
> msgMyMessage(BTS.RetryInterval) = 2;
>
> I understand that msgMyMessage is a message whose message operation type
property is set to a
> valid schema. But assuming msgMyMessage do not have these details (FTP
username, etc.,),
> as I need to fetch the same from DB, how will I assign to message
variables and use it?
>
> I am not very clear about this. Please explain.
>
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
 |
Re: Dynamic use of FTP Adapter |
 |
 |
|
|
04-26-04 07:35 PM
I'm sorry... must have missed something. Where did you need direct binding
for please?
Aren't you going to use the dynamic port type?
Direct binding enables to do publish subscribe between orchestrations. Is
this what you need?
Kind regards,
Christof
"Samyu" <anonymous@discussions.microsoft.com> wrote in message
news:318C7A49-7ACF-46C3-8A12-B735DC5ED65C@microsoft.com...
> Christof
>
> I will be getting a flat file schema to this send port which may not have
hold any ftp details.
> Also, while configuring a direct binding in send port, whcih option should
I select such as
> Correlation, directiong to other orchestration etc.,?
>
> Thanks in advance
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
 |
Re: Dynamic use of FTP Adapter |
 |
 |
|
|
04-27-04 05:35 AM
Christof
Sorry if I am not clear..after successfully BTS creating the flat file, it h
as to be ftp'd using FTP Adapter
This adpter would get the necessary details (Username, ftppath, ftpserver, i
p, password etc.,) from a DB.
Once it is received it would ftp the files to that location and not to any o
rchestration.
Thanks
Samyu
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
 |
Re: Dynamic use of FTP Adapter |
 |
 |
|
|
04-27-04 02:36 PM
Please Samyu...
Reread my posting on how to set the password, username, ftp location at
*runtime*.
I think you didn't understand me. By no means you need to use direct
binding.
Kind regards,
Christof
"Samyu" <anonymous@discussions.microsoft.com> wrote in message
news:68040615-54DC-49F3-987C-031F942D6D0E@microsoft.com...
> Christof
>
> Sorry if I am not clear..after successfully BTS creating the flat file, it
has to be ftp'd using FTP Adapter
> This adpter would get the necessary details (Username, ftppath, ftpserver,
ip, password etc.,) from a DB.
> Once it is received it would ftp the files to that location and not to any
orchestration.
>
> Thanks
> Samyu
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
 |
Re: Dynamic use of FTP Adapter |
 |
 |
|
|
04-29-04 03:36 PM
Christof
I tried the fiollowing to send an XML file to a FTP location
1) Created the follwing schema
<Vendors><alcoholicVendor name="Alcoholic"><Attribute type="Drink" value="10
"></alcoholicVendor></Vendors>
2) Created a Receive Port as Static One-way port and created a receive locat
ion as below:
Set its Transport Type as FILE and Address URI as a folder location and Rece
ive Pipeline as
Microsoft.BizTalk.DefaultPipelines.PassThruReceive (Microsoft.BizTalk.Defaul
tPipelines.PassThruReceive, Microsoft.BizTalk.DefaultPipelines, Version=3.0.
1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
3) Created a Send Port and set its Transport Type as FTP and gave the FTP lo
cation at its Address URI
Gave Send Pipeline as Microsoft.BizTalk.KwTpm.StsDefaultPipelines.StsSendPip
eline (Microsoft.BizTalk.KwTpm.StsDefaultPipelines.StsSendPipeline, Microsof
t.BizTalk.KwTpm.StsDefaultPipelines, Version=3.0.1.0, Culture=neutral, Publi
cKeyToken=31bf3856ad364e35)
Rebuild the project
Deployed the project
I placed a sample XML in the receive folder.
It is not getting picked up by the BizTalk process. I am getting error in th
e Eventviewer as some or parts of the message could not be taken etc.,
Thanks
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
 |
Re: Dynamic use of FTP Adapter |
 |
 |
|
|
04-29-04 04:36 PM
Christof
I am getting the following error:
There was a failure executing the receive pipeline: "Microsoft.BizTalk.Defau
ltPipelines.XMLReceive" Source: "XML disassembler" Receive Location: "D:\RP
1.1\Working samples\FTPTest\Input\*.xml" Reason: The disassembler cannot ret
rieve the document specific
ation by using this type: "Vendors". Either the schema is not deployed corre
ctly, or more than one schema is deployed for the same message type.
[ Post a follow-up to this message ]
|
|
|
 |
|
|
|
|
Sponsored Links |
 |
 |
|
|
 |
All times are GMT. The time now is 03:07 PM. |
 |
|
|
 |
|
 |
|
|
 |
|
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
|
|
|
|
Medical and Health forum | Computer Games Reviews | Graphics design forum
|
 |
|
 |
|