none
BizTalk Namespaces

    Question

  • Hi all,

    I'm really hoping someone can help as I've been hitting a bit of a brick wall. 

    I'm fairly new to BizTalk, but this is my scenario:

     

    I have added a new Orchestration into an existing application in which splits an order file based on different criteria, this all works fine.

     

    The new orchestration uses a map and when trying to get the new file back with the same namespace and header details as before to pass the modified file to the previous orchestration, I'm not sure how to keep the relevant header details. I have tried message assignment which does OrderMsgIn.OrderMsgPart = NewOrderMsg.OrderMsgPart but this replaces all the root detail as well in OrderMsgIn.

     

    This is what I want as is on the original for the message OrderMsgIn:


    This is what I have after transforming in a map:

    So it's missing the "desc", "xs" and "targetNamespace" criteria as the "ns0:". In order for this file to continue processing in the previous orchestration it needs to be the old namespace/header detail.

    Any guidance would be greatly appreciated.

    Thanks.


    Katie Smith Systems Developer Bakkavor IS Development



    Monday, September 16, 2013 2:06 PM

Answers

All replies

  • Monkey,

    desc is an attribute you can create a link between desc in source to desc in destination, however target namespace is something that you have to look for. are you getting any error? if Yes, can you please share the error details?


    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful.

    Monday, September 16, 2013 2:56 PM
  • The result of the Map should have the targetNamespace of the destination Schema, no matter what.

    As for the "desc" attribute, it must be mapped form the source to the destination.  The Map does not modify the message, it generates an entirely new one so anything you need in the new message must be mapped from the source.

    Finally, in your screen cap, <Document_Loop is preceded by a ']', that's not something I would expect.  Can you clarify the origin of that?

    Monday, September 16, 2013 3:22 PM
  • Yes I am getting the following error in debug viewer: "System InvalidOperationException: There is an error in XML document (0,0).  ---> System.Xml.XmlException: Root element is missing."

    So it seems that the next part of the application is looking for a specific element in the namespace which it can't find, i.e. one of those element detailed above. 

    This is the XSLT I am using to transform the file which is then losing that header information:

    Many thanks


    Katie Smith Systems Developer Bakkavor IS Development


    • Edited by KsCodeMonkey Tuesday, September 17, 2013 8:40 AM
    Tuesday, September 17, 2013 8:40 AM
  • Thanks for the responses. 

    The ']' was just a print screen cut, i had taken it from notepad++ so it was a cut off a square, so that is no issue but thank you. 

    I have tried to map all the details from the source, I am using the XSLT which I posted as a reply to the previous response from SAAkhlaq, am I missing something?

    Thanks


    Katie Smith Systems Developer Bakkavor IS Development

    Tuesday, September 17, 2013 8:43 AM
  • Yes I am getting the following error in debug viewer: "System InvalidOperationException: There is an error in XML document (0,0).  ---> System.Xml.XmlException: Root element is missing."

    Most likely, the Map is not producing any output.  Can you take a sample of the Map input and Test Map in Visual Studio?
    Tuesday, September 17, 2013 12:11 PM
  • Katie,

    Can you please share a input you are using?


    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful.

    Tuesday, September 17, 2013 1:12 PM
  • Please check you both input and output files as per schema s format.

    Thursday, September 19, 2013 10:34 AM