Re: SQL Send Adapter
- From: john_j <johnj@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 7 Jul 2008 12:41:02 -0700
I am trying to use this suggestion without success so far. I get an error re:
not being able to construct a message outside a construct block. Any
suggestions/insight?
Thanks.
-John
"Alan Smith" wrote:
Hi,.
You can use an expression shape in the orchestration for this.
1 Set the field for the XML part of the SQL insert message to distinguished.
2 Add an XmlDocument as an orchestration variable.
3 Create an espresstion shape
4 Add code that looks a like this:
xmlDocument = theMessageYouWantToInsertAsXml;
sqlMessage.TheFieldThatShouldCOntianThisXml = xmlDocument.OuterXml;
5 send the message
Hope this helps, shout if it dosn't.
Regards,
Alan
--
The Bloggers Guide to BizTalk
http://geekswithblogs.com/asmith
"Nikki" wrote:
Marian,
thanks for the response.
I am clear on how to create the schema and the ports; however, I'm not clear
on how to pass the input XML message to the stored procedure. Does BTS do
that automatically or do I need to map the inbound message schema to the
adapter schema? if the latter, what functoid or other mapping mechanism do I
use to
pass the entire message, not elements, as input paremeter to the stored
procedure?
Thanks!!
"Marian Drumea" wrote:
The XML schema for the stored procedure call is generated when you use
the "Add Generated Item" feature on the project in VS. Is this what you
are trying? It will ask you to provide namespace and the name for the
request and response roots, as well as the connection string and the
stored procedure you want to call.
Then, in your orchestration, you can construct the message based on the
generated schema and send it with a Send shape linked to a port of the
type also generated. BTW, you don't need to prepare the parameters on
the stored procedure in any way in order to call it from BizTalk and
there is simple change to have the result returned in XML.
Does this help?
Thanks,
Marian Drumea
http://www.MarianDrumea.com/BizTalk
- Follow-Ups:
- Re: SQL Send Adapter
- From: Dan Rosanova
- Re: SQL Send Adapter
- From: Daniel S
- Re: SQL Send Adapter
- From: Piotrek
- Re: SQL Send Adapter
- Prev by Date: Schema Element Node - Default Value
- Next by Date: Re: Could we monitor the errors using the BAM?
- Previous by thread: Schema Element Node - Default Value
- Next by thread: Re: SQL Send Adapter
- Index(es):
Relevant Pages
|