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 3331288
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T23:34:14+00:00 2026-05-17T23:34:14+00:00

Is there anyway in a BizTalk map to force destination elements to be created

  • 0

Is there anyway in a BizTalk map to force destination elements to be created when the source elements don’t exist without using an xslt call template?

I’m mapping parent/child xml to a wcf-sql adapter generated schema that has table-valued parameters for stored proc parameters.

So my source xml is:

<Category>
  <CategoryId>1</CategoryId>
  <CategoryName>Test</CategoryName>
</Category>

and/or a Category with Media

<Category>
  <CategoryId>1</CategoryId>
  <CategoryName>Test</CategoryName>
  <Media>
    <Medium>
      <MediumId>1</MediumId>
      <MediumName>test.jpg</MediumName>
    </Medium>
  </Media>
</Category>

The schema for the TypedProcedure is something like:

<ImportCategoryRequest>
  <Category>
    <CategoryId>1</CategoryId>
    <CategoryName>Test</CategoryName>
  </Category>
  <Media>
    <Medium>
      <MediumId>1</MediumId>
      <MediumName>test.jpg</MediumName>
    </Medium>
  </Media>
</ImportCategoryRequest>

So it doesn’t like it when is all that shows up in the destination XML. Instead of passing null for a table-valued parameter it wants at least 1 row and to pass null values for the columns in the tvp. I can create the dummy xml with a xslt call-template but I’d like to avoid that.

  • 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-17T23:34:14+00:00Added an answer on May 17, 2026 at 11:34 pm

    The BizTalk mapper seems to use <xsl:for-each> and as a result won’t generate an output element if there is no input.

    But using xslt is really easy – see here how to scrape the xslt out of your existing map (and just remove the escaping around double quotes and slashes), and to change the map to custom XSLT.

    The bit you need to change is around the Media is something like:

            <xsl:choose>
                <xsl:when test="count(ns0:Media)!=0">
                    <!-- Copy the mapper generated XSLT in the for each here-->
                    <xsl:foreach >
                        </xsl:for-each>
                    </xsl:when>
                <xsl:otherwise>
                    <Media>
                        <Medium>
                            <MediumId>1</MediumId>
                            <MediumName>test.jpg</MediumName>
                        </Medium>
                    </Media>
                </xsl:otherwise>
            </xsl:choose>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there anyway to force XAML to completely redraw all of its elements and
Is there anyway to create a BizTalk map with multiple input schema from scratch
Is there anyway to get a SUBSTRING of string literal in COBOL without using
Is there anyway to grab the referring URL using javascript, lets say the reffering
Is there anyway for a BizTalk receive port to initialize an orchestration, pulling in
Is there anyway to map Spring exceptions (eg. JpaObjectRetrievalFailureException ) to REST status code
Is there anyway to translate CodeIgniter's form validation error messages without touching to system
Is there anyway I could visualize the call stack of an Android app? All
Is there anyway I can use this to display an image without having to
Is there anyway to get the web service generated by the BizTalk Web Services

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.