locked
Mapped SourceSchema element to DestinationSchema node has missing value RRS feed

  • Question

  • Hi all,

    I'm struggling to understand why the value of my mapped schema results in one of the nodes containing no value.

    I am mapping a custom schema to a pain.002.001.05. 

    All values map correctly, however I cannot seem to get the value for the currency and amount to copy across.

    The source document contains the following:

      <OTxInf_InstAmtCcy>AUD</OTxInf_InstAmtCcy>
      <OTxInf_InstAmt>1.00</OTxInf_InstAmt>

    and the result is:

    <ns0:Amt>
     <ns0:InstdAmt Ccy=""></ns0:InstdAmt>
    </ns0:Amt>

    however needs to be:

    <ns0:Amt>
     <ns0:InstdAmt Ccy="AUD">1.00</ns0:InstdAmt>
    </ns0:Amt>

    I've tried changing properties, but am unable to get the correct result. 

    Any advice is most welcome,

    Vick

    Wednesday, October 21, 2015 1:13 AM

Answers

All replies

  • Hi,

    Can you please paste the screenshot of your transform?

    Cheers


    JB

    Wednesday, October 21, 2015 2:23 AM
  • Hi JB

    Sorry, I'm getting an error about verifying my account and am unable to post the image.

    However the transform is very basic.  The source schema contains the following:

      <xs:element name="OTxInf_InstdAmt" type="xs:string" />
      <xs:element name="OTxInf_InstdAmtCcy" type="xs:string" />

    While the destination is the ISO standard pain.002.001.05:

    <xs:element name="InstdAmt" type="ActiveOrHistoricCurrencyAndAmount" />
    <xs:complexType name="ActiveOrHistoricCurrencyAndAmount">
      <xs:simpleContent>
        <xs:extension base="xs:decimal">
          <xs:attribute name="Ccy" type="ActiveOrHistoricCurrencyCode" use="required" />
        </xs:extension>
      </xs:simpleContent>
    </xs:complexType>


    The link between each have:

      Source Links: Copy text value
      Target Links: Flatten links


    thanks Vick

    Wednesday, October 21, 2015 3:39 AM
  • Hi Vick,

    it seems that can be solved by simple links... but in fact only with the input and output schemas is possible to validate and be sure.

    Never the less I end it creating a sample for you: https://onedrive.live.com/redir?resid=98A008F39B7BBF8E!109936&authkey=!ACuBorF-6oGSj9U&ithint=file%2czip

    Regards


    Sandro Pereira
    DevScope | MVP & MCTS BizTalk Server 2010
    http://sandroaspbiztalkblog.wordpress.com/ | @sandro_asp
    Oporto BizTalk Innovation Day | 14th March 2013 – Oporto, Portugal
    Please mark as answered if this answers your question.

    • Marked as answer by Vick-ASL Wednesday, October 21, 2015 11:28 PM
    Wednesday, October 21, 2015 4:14 PM
    Moderator
  • Hi Sandro

    Thanks for your help ... I've been looking at this for a week.  It appears that it had nothing to do with my mapping or my schema's.

    The party I needed to create the output message for wanted the file to have extension '.asc' not '.xml'.  when I changed the output back to .xml it all worked as expected.

    Kind regards, Vick

    Wednesday, October 21, 2015 11:31 PM