Manual Invokation of orchestration from remote machine.
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > BizTalk Server > BizTalk Server General > Manual Invokation of orchestration from remote machine.




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Manual Invokation of orchestration from remote machine.  
Ashish Shukla


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-30-04 01:03 AM

Hi BizTalk Gurus

I have a requirement where I need to invoke orchestration through code. I
found the SubmitDirect adapter in SDK was perfect for me.  I will be invokin
g
orchestration through a web application. Web server is hosted on a different
machine and BizTalk server is on different machine. If I use the dll provide
d
in the SDK on my web application, how will it know which BizTalk server to
connect to and where. Please advice me what I need to do to get this working
.
Is registering the TransportProxyUtils.dll(supplied with SubmitDirect adapte
r
sample), on web server enough.

Thanks
Ashish Shukla





[ Post a follow-up to this message ]



    RE: Manual Invokation of orchestration from remote machine.  
Gilles [MSFT]


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-30-04 01:03 AM

Hello,

>I have a requirement where I need to invoke orchestration through code. I
>found the SubmitDirect adapter in SDK was perfect for me.  I will be invoki
ng
>orchestration through a web application. Web server is hosted on a differen
t
>machine and BizTalk server is on different machine. If I use the dll provid
ed
>in the SDK on my web application, how will it know which BizTalk server to
>connect to and where. Please advice me what I need to do to get this workin
g.
>Is registering the TransportProxyUtils.dll(supplied with SubmitDirect adapt
er
>sample), on web server enough.

The direct submit allows you to submit mesasges to the message box directly.
 As a result,
an orchestartion with the right subscription will be activated.

Is there any reason why you cannot send a message from your web application 
to a port (perhaps an HTTP port)?
This is really simple, in fact simpler that the submit direct: you define an
 HTTP receive port (and an optional pipeline).
In your web application, use the .NET object HttpWebRequest or equivalent (W
ebClient)  to post a message.
That would work for any machine, remote or not. I believe this solution is s
uperior to yours, at least with the limited amount
of information I have gleaned from your post.

The Biztalk tutorial has already such a sample application that you could re
use in your web application.
Make sure you download the tutorial (free):

http://www.microsoft.com/downloads/...&displaylang=en

After installing it, look under <bts install directory>\SDK\Tutorial\Lessons
\BAS\HttpPost.
If you cannot install it for some reason, I have copied the code below:

byte[] buffer = null;
Stream f = null;		// File stream
Stream s = null;		// Http Request stream

// Initialize the web request
WebClient cli=new WebClient();

// <-- Put the proper credentials here, if any are needed -->
cli.Credentials=CredentialCache.DefaultCredentials;

// Loop through the files and post them to the passed in URL
buffer = new byte[1024];

// <-- Make sure f is a stream to the data you want to send -->
// <-- Maybe a string reader or a file -->
f=File.OpenRead(<file> );

// <-- Replace url below with the actual URL of the receive location -->
// <-- This perhaps comes from web.config -->
s=cli.OpenWrite(url,"POST");
while(f.Position<f.Length)
{
int bytes=f.Read(buffer,0,1024);
s.Write(buffer,0,bytes);
}
s.Close();
s = null;
f.Close();
f = null;

You can even use other methods in WebClient to facilitate the upload process
 (UploadData for instance).

Thanks,
-Gilles.






[ Post a follow-up to this message ]



    RE: Manual Invokation of orchestration from remote machine.  
Ashish Shukla


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-30-04 03:40 PM

Hi Gilles

Thanks a lot for your reply. I will try out what you have suggested.

Thanks and Regards
Ashish Shukla







[ Post a follow-up to this message ]



    RE: Manual Invokation of orchestration from remote machine.  
Ashish Shukla


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
10-04-04 10:52 PM

Hi Gilles

I tried what you had suggested. I have a orchestration with a port using
http adapter and I send xml document to that url and everything is fine. I
have another question. We need to use BTSHTTPReceive.dll. Do we need to have
the virtual directory with the above mentioned dll on the same machine where
biztalk is installed or this dll can be put on any web server. If yes please
direct me to the documentation.

THanks and Regards
Ashish Shukla




"Gilles [MSFT]" wrote:

> Hello,
> 
>
> The direct submit allows you to submit mesasges to the message box directl
y. As a result,
> an orchestartion with the right subscription will be activated.
>
> Is there any reason why you cannot send a message from your web applicatio
n to a port (perhaps an HTTP port)?
> This is really simple, in fact simpler that the submit direct: you define 
an HTTP receive port (and an optional pipeline).
> In your web application, use the .NET object HttpWebRequest or equivalent 
(WebClient)  to post a message.
> That would work for any machine, remote or not. I believe this solution is
 superior to yours, at least with the limited amount
> of information I have gleaned from your post.
>
> The Biztalk tutorial has already such a sample application that you could 
reuse in your web application.
> Make sure you download the tutorial (free):
>
> http://www.microsoft.com/downloads/...&displaylang=en
>
> After installing it, look under <bts install directory>\SDK\Tutorial\Lesso
ns\BAS\HttpPost.
> If you cannot install it for some reason, I have copied the code below:
>
>                                                                 byte[]
 buffer = null;
> 			                Stream f = null;		// File stream
> 			                Stream s = null;		// Http Request stream
>
>                                                                 // Initial
ize the web request
> 				WebClient cli=new WebClient();
>
>                                                                 // <-- Put
 the proper credentials here, if any are needed -->
> 				cli.Credentials=CredentialCache.DefaultCredentials;
>
> 				// Loop through the files and post them to the passed in URL
> 				buffer = new byte[1024];
>
>                                                                 // <-- Mak
e sure f is a stream to the data you want to send -->
>                                                                 // <-- May
be a string reader or a file -->
> 				f=File.OpenRead(<file> );
>
>                                                                 // <-- Rep
lace url below with the actual URL of the receive location -->
>                                                                 // <-- Thi
s perhaps comes from web.config -->
> 				s=cli.OpenWrite(url,"POST");
> 				while(f.Position<f.Length)
> 				{
> 					int bytes=f.Read(buffer,0,1024);
> 					s.Write(buffer,0,bytes);
> 				}
> 				s.Close();
> 				s = null;
> 				f.Close();
> 				f = null;
>
> You can even use other methods in WebClient to facilitate the upload proce
ss (UploadData for instance).
>
> Thanks,
> -Gilles.
>
>





[ Post a follow-up to this message ]



    RE: Manual Invokation of orchestration from remote machine.  
Gilles [MSFT]


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
10-04-04 10:52 PM

Hello,

[...]

>I tried what you had suggested. I have a orchestration with a port using
>http adapter and I send xml document to that url and everything is fine. I
>have another question. We need to use BTSHTTPReceive.dll. Do we need to hav
e
>the virtual directory with the above mentioned dll on the same machine wher
e
>biztalk is installed or this dll can be put on any web server. If yes pleas
e
>direct me to the documentation.

BTSHttpReceive.dll is the piece that allows BizTalk to receive messages from
 HTTP. IN other words, it listens to
incoming HTTP connections and figures out which message should be sent to wh
ich port.

Internally, BTSHttpReceive needs to submit a message to BizTalk and its uses
 a mecanism that is similar to the
"submitdirect" example you first investigated. It sounds like you have only 
one BizTalk machine so in this case, yes,
BTSHttpReceive has to be on the same machine as BizTalk.

Thanks,
-Gilles.






[ Post a follow-up to this message ]



    RE: Manual Invokation of orchestration from remote machine.  
Ashish Shukla


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
10-05-04 10:54 PM

Hi Gilles

Thanks for the help.

Thanks and Regards
Ashish Shukla



"Gilles [MSFT]" wrote:

> Hello,
>
> [...]
> 
>
> BTSHttpReceive.dll is the piece that allows BizTalk to receive messages fr
om HTTP. IN other words, it listens to
> incoming HTTP connections and figures out which message should be sent to 
which port.
>
> Internally, BTSHttpReceive needs to submit a message to BizTalk and its us
es a mecanism that is similar to the
> "submitdirect" example you first investigated. It sounds like you have onl
y one BizTalk machine so in this case, yes,
> BTSHttpReceive has to be on the same machine as BizTalk.
>
> Thanks,
> -Gilles.
>
>





[ Post a follow-up to this message ]



    RE: Manual Invokation of orchestration from remote machine.  
Vish


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
11-09-04 10:49 PM

Hi,

I have a question regarding the orchestration as a webservice. I tried
exposing the orchestration as web services and used the webservice publishin
g
wizard. The wizard created the webservice which is in turn calling the
orchestration. This webservice is referred as server proxy so i guess we wil
l
need a client proxy to call this webservice which in turn calls the
orchestration. Now since the orchestration can directly consume a SOAP
message why should we add extra layer of proxies for the same process ? Is i
t
not advantageous to make a http or a soap call to the orchestration on the
biztalk server directly ? The only concern is security but we can use SSL or
multi header SOAP message. Let me know. Thanks!


"Ashish Shukla" wrote:
[vbcol=seagreen]
> Hi Gilles
>
> Thanks for the help.
>
> Thanks and Regards
> Ashish Shukla
>
>
>
> "Gilles [MSFT]" wrote:
> 





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 12:16 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

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

Back To The Top
Home | Usercp | Faq | Register