Search code examples
c#.netbiztalkbiztalk-mapper

Extension function parameters or return values which have Clr type 'XmlQualifiedName' are not supported trying to use FILE.ReceivedFileName


I am creating import application using BizTalk. I have created File schema and Database tables schema and map those schemas as below: enter image description here

Also, I want Filename into the table so I created scripting functiod and its scripts as below: enter image description here

Now I am validating and testing map but it is giving me below error: Extension function parameters or return values which have Clr type 'XmlQualifiedName' are not supported.

Please see below SS for Orchestration: enter image description here

enter image description here

enter image description here

enter image description here


Solution

  • As it looks you might have some repeating nodes, and you can't promote or distinguish a field that occurs multiple times, do the following.

    1. Create an internal schema where the fname only occurs once.
    2. Distinguish that field by right clicking anywhere on the schema tree, select Promote, Show Promotions enter image description here
    3. Select the field to distinguish (e.g. fName), make sure the tab is in Distinguished Fields (the default), click the Add button, click the OK Button enter image description here
    4. Have a map from your rcv_msg to the internal_msg wich either sets a default value to that field or use a functoid like the String Concatenate to set a default value. This is so that the map creates that element. enter image description here
    5. Inside your construct shape in your Orchestration add a Message Assignment shape following your transform shape. enter image description here
    6. In the assignment shape have code like the following internal_msg.fName = rcv_msg(FILE.ReceivedFileName); enter image description here enter image description here
    7. Map from the internal schema to your snd_msg, you can either execute that in the Orchestration or in the Send Port.