Home Page › Forums › BizTalk 2004 – BizTalk 2010 › How to do multiple procedure call from one XML file
- This topic has 3 replies, 1 voice, and was last updated 9 years, 10 months ago by
community-content.
-
AuthorPosts
-
-
May 5, 2010 at 2:27 AM #24647
Hi,
I’m trying to insert into Oracle database some header row and a few position rows. I’ll use one source XML file to call SP to insert header and the same XML to call SP to insert positions.
My problem is that I don’t have an idea how to call the same procedure in BIZTALK2009 when when I have few position nodes in XMl file.
I’m newbie and trying to use BIZTALK2009 I thought about composite operations but I’m not sure.
Maybe you could linke me some tutorials bout that ?
regards
-
May 10, 2010 at 4:51 PM #24666
Hi,
you’re true, if you have got the BizTalk Adapter Pack 2.0, you could use composite operation for Oracle Database
http://msdn.microsoft.com/en-US/library/dd788415(v=BTS.10).aspx
The aim is to generate the schema of the SP(s), then you create a new schema Composite with a Root (called CompositeOperationRequest for exemple) and in this root you create Record element as many SP you want (in order you want they execute), finally you create a reference in this schema to include definition of the SP Schema and you type the record(s) with the type of the generated schema root.
In your case where you want to call the same stored procedure, the steps are :
Generate the schema of the stored procedure
Create a new schema with a root, Import the generated schema
Add a record in the root element, and type this record with the reference of the generated schema
Change the property of max occurs to unbounded(*)
Create a map to transform your XML to the XML that will call the SP with the Header and the insert positions
Create a Send Port WCF with OracleDbBindings and specify the action to http://Microsoft.LobServices.OracleDB/2007/03/CompositeOperation
(All these steps are described in the first link)
A good thing to know is in composite operations, all the call of the procedure(s) are do in the same transactions (so rollback to)
Have a good Sample 😉
Regards
-
May 12, 2010 at 5:06 AM #24676
Ok, thanks for the answer – I’ll try that.
I’ve got one more idea but I don’t know if it’s possible to do. I’ve got one source XML (with schema) and two output xml schemas (generated automaticly by Consume Adapter).
– I recieve source xml and map some header values to the first output schema – I’ve inserted header row,
– next I map the same source xml to another output schema to insert some positions. Here I can insert only first position.
I can construct loop in orchestration, count quantity of positions in source XML but how can I construct new output message and change some values in that ? This message should be the same as the second output schema. When in message Construct shape I use Transform and next I get error : “Inner exception: Illegal attempt to update the value of part ‘part’ in XLANG/s message ‘OraPosMessage’ after the message construction was complete.”
Is there any way to solve thie problem ?
regards,
-
May 12, 2010 at 1:18 PM #24683
as i understand, you create a message and after you try to update some values in his content ( in a other construct shape?)
A message is immutable, when it is created you can’t modify it. You must create a new instance of this message , copy the content and change some value, all this action in the same Construct Msg.
If your are in a loop be sure that your message is defined in the loop scope, indeed, the instance will be created at each loop I think.
regards.
-
-
-
-
AuthorPosts
- The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.