Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7404597
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T05:16:38+00:00 2026-05-29T05:16:38+00:00

Here’ the situation. I have a sequence of 12 integration tasks to be run

  • 0

Here’ the situation.
I have a sequence of 12 integration tasks to be run every 15 minutes, most of them actually reading something from the oracle server and pushing it into a web service. I have created a port for both oracle and web service and I created a main orchestration which loops every 15 minutes and calls other orchestrations that will do their tasks.

Now, my problem is that those orchestrations are not invoked by a message arrival, and I have a need to construct a message that I will send to the oracle port. The one that will look like this:

<Select xmlns="http://Microsoft.LobServices.OracleDB/2007/03/HR/Table/EMPLOYEES">
    <COLUMN_NAMES>*</COLUMN_NAMES>
    <FILTER>DATE=somedate</FILTER>
</Select>

I know what the node values will be but I do not know how to construct the message other than to use “magic strings” and concatenating strings that I will load into xmlDoc using LoadXml and then assigning that to message parameters which I would very much like to avoid for a lot of reasons (starting with a change in namespace in the future). Is there a way for orchestration to create the “blank” message which I will then fill in?

Maybe the question is very simple and I can’t see the tree from the forest, but all the samples I saw on the net are simplified (meaning someone just drops a ready xml in a watched folder to invoke orchestration) and do not help me.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T05:16:38+00:00Added an answer on May 29, 2026 at 5:16 am

    Here’s a solution I implemented for a similar problem: As Hugh suggests I use a helper inheriting from XmlDocument.

    The Xml Template class

    using System;
    using System.Globalization;
    using System.IO;
    using System.Reflection;
    using System.Xml;
    
    namespace Acme
    {
        [Serializable]
        public class ResourceXmlDocument : XmlDocument
        {
            public ResourceXmlDocument(Type assemblyType, string resourceName, QueryValues queryValues)
            {
                try
                {
                    Assembly callingAssembly = Assembly.GetAssembly(assemblyType);
    
                    if (null == callingAssembly)
                    {
                        throw new ResourceException("GetExecutingAssembly returned null");
                    }
    
                    Stream resourceStream = callingAssembly.GetManifestResourceStream(resourceName);
    
                    Load(resourceStream);
    
                    if (null == queryValues)
                    {
                        throw new ResourceException("queryValues not initialized");
                    }
    
                    if (queryValues.Keys.Count < 1)
                    {
                        throw new ResourceException("queryValues.Keys must have at least one value");
                    }
    
    
                    foreach (string querycondition in queryValues.Keys)
                    {
                        XmlNode conditionNode = this.SelectSingleNode(querycondition);
    
                        if (null == conditionNode)
                        {
                            throw new ResourceException(string.Format(CultureInfo.InvariantCulture, "Condition: '{0}' did not return a XmlNode", querycondition));
                        }
    
                        XmlAttribute valueAttribute = conditionNode.Attributes["value"];
    
                        if (null == valueAttribute)
                        {
                            throw new ResourceException(string.Format(CultureInfo.InvariantCulture, "Condition: '{0}' with attribute 'value' did not return an XmlAttribute ", querycondition));
                        }
    
                        valueAttribute.Value = queryValues[querycondition];
                    }
                }
                catch (Exception ex)
                {
                    throw new ResourceException(ex.Message);
                }
            }
        }
    }
    

    Of course my expample targets a fixed attribute value to be set so you’ll have to adapt this to your needs.

    The QueryValues helper class

    using System;
    using System.Collections.Generic;
    using System.Runtime.Serialization;
    
    namespace Acme
    {
        [Serializable]
        public class QueryValues : Dictionary<string, string>
        {
            public QueryValues()
            {
            }
    
    
            protected QueryValues(SerializationInfo info, StreamingContext context) : base(info, context)
            {
            }
        }
    }
    

    The Xml Template

    Add a Xml doc MyTemplate.xml to your project and change the compile action to Embedded Resource so ResorceXmlDocument can load it via Reflection.

    <?xml version="1.0" encoding="utf-8" ?>
    <root>
        <SomeOtherNode>some (fixed) value</SomeOtherNode>
        <MyNodeName tablename="MyTableName" fieldname="MyFieldName" value="0" />
        <YetAnotherNode>
            <SubNode>Foo</SubNode>
        </YetAnotherNode>
    </root>
    

    Orchestration variables and Messages

    You’ll need to declare

    • a variable *queryValues* of type `Acme.QueryValues`
    • a variable *resourceXmlDoc* of type `Acme.ResourceXmlDocument`
    • a message of type `MySchemaType`

    Putting it together inside a Message Assignment Shape

    inside a Construct Message Shape creating a Message MyRequest of type MySchemaType

    queryValues = new Acme.QueryValues();
    
    queryValues.Add("//MyNodeName[@tablename='MyTableName' and @fieldname='MyFieldName']", "MyValueToSet");
    
    resourceXmlDoc = new Acme.ResourceXmlDocument(typeof(Acme.MySchemaType), "MyTemplate.xml", queryValues);
    
    MyRequest = resourceXmlDoc;
    

    I’m keeping ResourceXmlDocument and QueryValues in a util lib and reference it from any BizTalk project I need. The various Xml template docs are embedded into the respective BizTalk assembly.

    EDIT by OP: Actually the only way I go this to work is to also implement ISerializable on ResourceXmlDocument and persist message using custom serialization of OuterXml. The XmlDocument in the base is simply not serializable on its own. If there is another approach, feel free to edit this.

    [Serializable]
    public class ResourceXmlDocument : XmlDocument, ISerializable
    {
    
        ...
    
        protected ResourceXmlDocument(SerializationInfo info, StreamingContext context)
        {
            if (info == null) throw new System.ArgumentNullException("info");
            Load(info.GetString("content"));
        }
    
    
        void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
        {
            if (info == null) throw new System.ArgumentNullException("info");
            info.AddValue("content", this.OuterXml);
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here is my situation: I am using telerik with winform. I have a dataset
Here's my situation: I have a Data Template set up which contains a ToggleButton
Here is my problem...I have a page that loads a list of clients and
Here is the situation, I am attempting to fire a set of Gallio tests
Here is an example: I have a file 1.js, which has some functions. I
Here's the basic setup: I have a thin bar at the top of a
Here is my problem : I have a post controller with the action create.
Here is an example: I have the generic type called Account. I wish to
Here I have an int x=3; NSLog(@%i, x); How to have it displayed like
Here is my code...I have two dimensional matrices A,B. I want to develop the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.