BizTalk 2006 R2 mapping problem

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



I have this data (all the elements are optional):

<data>
<optionalElement1>...</optionalElement1>
<optionalElement2>...</optionalElement2>
<optionalElement3>...</optionalElement3>
</data>

I need to map this to another schema (all the elements are required):

<request>
<Element1>...</Element1>
<Element2>...</Element2>
<Element3>...</Element3>
</request>

Since the elements in the original request are optional, the mapping will
only generate the corresponding elements for the originally included
elements. But the validation of the request will fail.

Example:

<data>
<optionalElement3>
<value1>1</value1>
<value2>2</value2>
</optionalElement3>
</data>

will be mapped to

<request>
<Element3>
<subelement1>1</subelement1>
<subelement2>2</subelement2>
</Element3>
</request>

And the validation will fail because i'm missing Element1 and Element2. The
response should be (I think):

<request>
<Element1 xsi:nil="true" />
<Element2 xsi:nil="true" />
<Element3>
<subelement1>1</subelement1>
<subelement2>2</subelement2>
</Element3>
</request>

How can I do this in the mapping? How can I ensure that the element is
created in the output message?

And, by the way, if a subelement is not present (let's say
"data/optionalElement1/value1" how can I make sure that the destination
subelement "request/Element1/subelement1" is created?
.



Relevant Pages

  • Re: Vistas EULA Product Activation Worries
    ... when it goes out for its periodic check of the validation. ... You're asking for cases of Vista's periodic activation check failing, ... which most likely uses a similar validation scheme, could fail for the ... same reasons. ...
    (comp.sys.mac.advocacy)
  • Re: Vistas EULA Product Activation Worries
    ... when it goes out for its periodic check of the validation. ... You're asking for cases of Vista's periodic activation check failing, ... which most likely uses a similar validation scheme, could fail for the ... same reasons. ...
    (comp.sys.mac.advocacy)
  • Re: Need help using OBJECT tag
    ... Of course validation fails when you specify a document type ... I'm actually using XHTML 1.1 strict, but I'm not writing pure xhtml, ... but there are many minor things that just don't matter which fail). ...
    (comp.infosystems.www.authoring.html)
  • Re: fUnit finally released
    ... verifying that the tangent-linear and adjoint forms are consistent ... a routine to multiply an N-vector by the Jacobian of said mapping; ... need validation but are still self-contained within the system ... (e.g. pure math, even if nontrivial math). ...
    (comp.lang.fortran)
  • Re: Fastcode Memory Manager Testing Status
    ... A validation for one MM is considered complete ... results found for any compiler on any platform fail. ...
    (borland.public.delphi.language.basm)