Passing the Raw xml to a functoid?

Home Page Forums BizTalk 2004 – BizTalk 2010 Passing the Raw xml to a functoid?

Viewing 1 reply thread
  • Author
    Posts
    • #18205

      Hi,

      I am currently investigating the solution to a problem at work, and as a part of this I was wondering if there is a way to pass all (or part) of the souce xml message into a functoid as a string?

      My Google efforts have so far not paid off! 

      Any help gratefully received.

      Cheers

      Stu.

       

    • #18258

      Stuart,

      There may be a way using custom XSLT, but it'd need some research. What are you trying to acheive? there may be a better/easier solution.

      Nick. 

      • #18265

        Hi Nick,

        Basically what I am trying to achieve is feeding in a batch of parameters into a custom functoid which also accepts a message string (from a config file). 

        The functoid then iterates through the supplied parameters and replaces any "Names" it matches with the "Value" for that paramater.

        Basically I want an extended find and replace that runs from an indeterminate number of parameters. 

        Thanks for any ideas you may have.

        Cheers

        Stu.

        Partial xsd:

        <xs:element minOccurs="0" maxOccurs="unbounded" name="Parameters">
             <xs:complexType>
                 <xs:sequence>
                      <xs:element name="Name" type="xs:string" />
                      <xs:element name="Value" type="xs:string" />
              </xs:sequence>
          </xs:complexType>
        </xs:element>
        • #18539

          Hi there

           

          Are you familiar with the function called OuterXML. I use it all the time to grab the raw xml contents of a message.

          Step 1:
          Create a variable of type String: strVar
          Step 2:
          Create a variable of type System.Xml.XmlDocument: xmlVar
          Step3:
          Add an expression shape to orchestration
          Step 4:
          Enter Code ….
          varXML = msgIncomingMessage
          strVar = varXML.OuterXML

          Now that you have the xml message contents inside a string you can use it however you need to.

           Hope that helps
          JMan

Viewing 1 reply thread
  • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.