RE: Passing parameters to SPs (SQL Adapter)
- From: Neal Walters <NealWalters@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 19 Aug 2005 05:37:55 -0700
(1) That would just be to easy and logical! I don't know why Microsoft
didn't make the obvious easy, but they didn't.
Think of a message as an object. You cannot set variables in an object
until you instantiate the object. Constructing is both instantiation, and
setting up the initial tree structure, i.e. the basic elements and attributes
required.
For example, you could construct an message with a root element (x) and a
sub-element (y). But in your schema, you also have sub-elemnet (z). The
software would allow you to construct this (it does not validate the data
against the schema).
Then you could even say msg.z = "test" (it would compile), but you will then
get an XLANG run-time error complaining about no such element.
(2) Does your orch. receive any message before you call SQL? If so, map
that message since any message you receive is already constructed. Now, the
map doens't even need any lines attaching the left side to the right side.
You could use string concatenate to initialize various elements on the right
side.
The are other posts that describe this, but the other two ways to constuct
are:
1) Call a .NET program - what a pain
2) Use a variable of type System.Xml.XmlDocument, do something like
myXmlDoc.Load ("<root><x/><y/></root>").
3) Set your message:
myMsg = myXmlDoc
Someday, I'm going to create a .NET program that constructs and initializes
an empty document according to the schema spec. IMHO Microsoft should have
provided this feature.
Neal Walters
http://Biztalk-Training.com
"BizTalk Benjamin" wrote:
> Neal,
> Yes, I am getting a "message not constructed" error. Issues are
>
> (1) I dont understand why I need a map when i have two variables with the
> data. Shouldnt i be able to assign values into the parts of the message
> directly?
>
> (2)I tried creating a dummy message with the data so i could then create a
> map between the dummy and the stored proc message. While constructing that
> dummy message i got the same errors (unconstructed message). Bit of a vicious
> cycle actually. I am not able to create any message at all.
>
> Anyway, for now I just bit the bullet and created a separate DB helper and
> that works fine. Guess I'll fight this battle again when I have some spare
> time
>
> Thanks for replying.
>
> "Neal Walters" wrote:
>
> > Are you getting error "message not constructed"? All messages, whether they
> > go to SQL or a flat file must be constructed first. There are many posts
> > here on how to construct - the easiest is to create a Biztalk Map. Use the
> > construct shape, add the transform shape. The map should map to your sql
> > Request message.
> >
> > Neal Walters
> > http://Biztalk-Training.com - Yes, I have an entire intermediate
> > video on the SQL adapter!
.
- Follow-Ups:
- RE: Passing parameters to SPs (SQL Adapter)
- From: BizTalk Benjamin
- RE: Passing parameters to SPs (SQL Adapter)
- References:
- Passing parameters to SPs (SQL Adapter)
- From: BizTalk Benjamin
- RE: Passing parameters to SPs (SQL Adapter)
- From: Neal Walters
- RE: Passing parameters to SPs (SQL Adapter)
- From: BizTalk Benjamin
- Passing parameters to SPs (SQL Adapter)
- Prev by Date: 405 Method Not Allowed Error
- Next by Date: Re: 405 Method Not Allowed Error
- Previous by thread: RE: Passing parameters to SPs (SQL Adapter)
- Next by thread: RE: Passing parameters to SPs (SQL Adapter)
- Index(es):
Relevant Pages
|