|
Home > Archive > BizTalk Server Orchestration > January 2005 > Simple One...
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]
|
|
| Brian C 2005-01-26, 5:54 pm |
| How do I do this...
I have a stored proc that expects 1 variable to be passed in. Then in the
select statement, I use the variable (see below). How do I set up my
messages in an orchestration to accept the variable and call the stored
proc? I have a receive port that will 'listen' to a file location for an
XML file. Once I get a file, I want to use the "order_info_id" in the XML
to run the stored proc I'm talking about, then I use the XML I created from
the stored proc to send it to my send port...
select * from Order_Info where order_info_id =@order_info_id
FOR XML auto
| |
| Joe Gaska 2005-01-26, 5:54 pm |
|
Either use the SQL Adapter C:\Program Files\Microsoft BizTalk Server
2004\SDK\Samples\Adapters\SQLAdapter
or
Write an assembly to to call the stored proc using the SQL code block. Your
assemvly would return an XmlDocument set it = to the message in the
expression and set your send port to return the message.
-Joe
"Brian C" <brian.cesafsky@midwestwireless.com> wrote in message
news:%23$ofUu7AFHA.2568@TK2MSFTNGP11.phx.gbl...
> How do I do this...
>
> I have a stored proc that expects 1 variable to be passed in. Then in the
> select statement, I use the variable (see below). How do I set up my
> messages in an orchestration to accept the variable and call the stored
> proc? I have a receive port that will 'listen' to a file location for an
> XML file. Once I get a file, I want to use the "order_info_id" in the XML
> to run the stored proc I'm talking about, then I use the XML I created
from
> the stored proc to send it to my send port...
>
> select * from Order_Info where order_info_id =@order_info_id
> FOR XML auto
>
>
| |
| Brian C 2005-01-26, 5:54 pm |
| I've used the SQL adapter before, and I understand that part... I guess what
I'm looking for help on is how to use it when I have to pass the stored proc
a variable. I'm confused how to do that part in an orchestration.
Any help is appreciated...
Thanks!
"Joe Gaska" <gaskaj@hotmail.com> wrote in message
news:%23iCAFx8AFHA.2012@TK2MSFTNGP15.phx.gbl...
>
> Either use the SQL Adapter C:\Program Files\Microsoft BizTalk Server
> 2004\SDK\Samples\Adapters\SQLAdapter
>
> or
>
> Write an assembly to to call the stored proc using the SQL code block.
> Your
> assemvly would return an XmlDocument set it = to the message in the
> expression and set your send port to return the message.
>
> -Joe
>
> "Brian C" <brian.cesafsky@midwestwireless.com> wrote in message
> news:%23$ofUu7AFHA.2568@TK2MSFTNGP11.phx.gbl...
> from
>
>
| |
| Joe Gaska 2005-01-26, 5:54 pm |
| SQL Adapter.
What you are trying to do is the exact scenerio in the sample from the SQL
data adpater. Look at the project in the sample "Loan Acceptance" and you
can see exactly how they do it with the adapter (Xml Document in, Call a
proc, Xml document out). You would create a mapping from your inbound
source document to the sproc call. You have to take in an inbound XML
document and map it.
Assembly
If you are using code to pass your stored proc variable you can promote the
field in your inbound schema then you will have access to the value. Double
click the inbound schema and right click the root node node "Promote" and
"Show Promotions" then you promote the field you want to access.
You would then use a Construct message shape (constructing the outbound
message), then you would call a static function from within your assembly
returning an XmlDocument. The outbound message would be set = to the
returned value from your method/prod.
OutBoundMessage=MyAssembly.AssemblyName.SqlAccess.MyMethod(InboundMessageNam
e.PromotedField);
"Brian C" <brian.cesafsky@midwestwireless.com> wrote in message
news:eTRcPA9AFHA.3592@TK2MSFTNGP09.phx.gbl...
> I've used the SQL adapter before, and I understand that part... I guess
what
> I'm looking for help on is how to use it when I have to pass the stored
proc
> a variable. I'm confused how to do that part in an orchestration.
>
> Any help is appreciated...
>
> Thanks!
>
>
> "Joe Gaska" <gaskaj@hotmail.com> wrote in message
> news:%23iCAFx8AFHA.2012@TK2MSFTNGP15.phx.gbl...
an[vbcol=seagreen]
>
>
| |
| Brian C 2005-01-26, 5:54 pm |
| Thank you very much... that example is exactly what I want to do. Thanks
for pointing it out!
Brian
"Joe Gaska" <gaskaj@hotmail.com> wrote in message
news:uFKAKk9AFHA.208@TK2MSFTNGP12.phx.gbl...
> SQL Adapter.
>
> What you are trying to do is the exact scenerio in the sample from the SQL
> data adpater. Look at the project in the sample "Loan Acceptance" and you
> can see exactly how they do it with the adapter (Xml Document in, Call a
> proc, Xml document out). You would create a mapping from your inbound
> source document to the sproc call. You have to take in an inbound XML
> document and map it.
>
> Assembly
>
> If you are using code to pass your stored proc variable you can promote
> the
> field in your inbound schema then you will have access to the value.
> Double
> click the inbound schema and right click the root node node "Promote" and
> "Show Promotions" then you promote the field you want to access.
>
> You would then use a Construct message shape (constructing the outbound
> message), then you would call a static function from within your assembly
> returning an XmlDocument. The outbound message would be set = to the
> returned value from your method/prod.
>
> OutBoundMessage=MyAssembly.AssemblyName.SqlAccess.MyMethod(InboundMessageNam
> e.PromotedField);
>
>
>
>
> "Brian C" <brian.cesafsky@midwestwireless.com> wrote in message
> news:eTRcPA9AFHA.3592@TK2MSFTNGP09.phx.gbl...
> what
> proc
> an
>
>
|
|
|
|
|