Microsoft Developer Network > Forums Home > BizTalk Server Forums > BizTalk ESB Toolkit > Error: The itinerary header could not be found
Ask a questionAsk a question
 

AnswerError: The itinerary header could not be found

  • Tuesday, October 27, 2009 9:59 AMGerbenvO Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I receive the next message: "The itinerary header could not be found". I have 2 scenarios. In the first scenario I'm using the ItinerarySelectReceivePassthrough pipeline. In this scenario I'm calling a webservice via the Itinerary and it just works fine. In the second scenario I've created a custom pipeline with the same components (ESB Itinerary Selector and ESB Dispatcher) as in the ItinerarySelectReceivePassthrough, but with an additional component: BTAHL7 2.X Disassembler (second stage). The ResolverConnectionString is entered correctly. I also see that the ItineraryHeader is on the context from the message. But it still fails in the ESB Dispatcher (note: setting the Enabled to false is not an option).

    The complete message I receive: 'There was a failure executing the receive pipeline: "mycompany.myproduct.BTAHL7PipelinesESB.ItinerarySelectReceivePassthroughHL7X, mycompany.myproduct.BTAHL7PipelinesESB, Version=1.0.0.0, Culture=neutral, PublicKeyToken=91608530323964c9" Source: "ESB Dispatcher" Receive Port: "ReceiveADTMessage" URI: "127.0.0.1:14123" Reason: The itinerary header could not be found. '

    Anyone a suggestion? Or a clue?

Answers

  • Sunday, November 01, 2009 12:07 AMLeandroDG Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     AnswerHas Code
    Gerben, I've been reflecting the code for ESB Toolkit, the error is currently happening in Microsoft.Practices.ESB.Itinerary assembly, when the method Create(IBaseMessage) or Create(XLANGMessage) are called in class ItineraryOMFactory.

    The code for this methods:

        public static IItinerary Create(IBaseMessage msg)
        {
            if (msg == null)
            {
                throw new ArgumentNullException("msg");
            }
            string str = msg.get_Context().Read(ItineraryProperties.ItineraryHeader.Name, ItineraryProperties.ItineraryHeader.Namespace) as string;
            if (string.IsNullOrEmpty(str))
            {
                throw new ItineraryOMException(Resources.NoItineraryHeaderFound);
            }
            return Create(str);
        }
    
        public static IItinerary Create(XLANGMessage msg)
        {
            if (msg == null)
            {
                throw new ArgumentNullException("msg");
            }
            string propertyValue = msg.GetPropertyValue(typeof(ItineraryHeader)) as string;
            if (string.IsNullOrEmpty(propertyValue))
            {
                throw new ItineraryOMException(Resources.NoItineraryHeaderFound);
            }
            return Create(propertyValue);
        }
    
    

    It looks like the property is not being correctly set.

    I think the problem may be related to the message creation in the Disassembler, if you are creating a new message in the disassembler you may be missing setting the appropiate context property.

    If you can post the code for the disassembler or a sample code that reproduces the problem maybe I can be of further help.

    Regards,
    Leandro.

All Replies

  • Thursday, October 29, 2009 12:41 AMDwight Goins Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I'd suggest turning on ESB Tracing. To See what's happening.

    http://dwightgoins.blogspot.com/2009/10/how-to-turn-on-esb-2.html


    -Dwight
    MCT, MCSD.NET, BizTalk TS
  • Thursday, October 29, 2009 9:40 AMGerbenvO Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Hi Dwight,

    Thanks for your reply. I turned on the tracing, but it doesn't give me any information I can use. If you have any other suggestions, please let me know.

    The tracing:
    * ItinerarySelector.Execute() :  **LOOKUP VIA RESOLVER ** = ITINERARY:\\name=MyItinerary
    * ResolverMgr.GetResolver() : Resolver ** FOUND IN EXISTING CACHE ** = ITINERARY
    * Document strong name is  after first context read.
    * Document message type is  after first context read.
    * Document name is  after check.
    * Document string name is  after check.
    * Document message type is  after check.
    * Received ITINERARY:\\name=MyItinerary value in ITINERARY STATIC resolver.
    * ItineraryFactTranslator.TranslateFact() :  **FOUND ITINERARY IN ITINERARY CACHE ** = MyItinerary .
    * Itintilailizing itinerary services
    * Adding itinerary services ef2bb9245a42492a9c36d88d32490a4e
    * Adding itinerary services 0dc3066798d840a4b61b2f572b073781
    * Adding itinerary services 577babbb29fb4745972eca1cc41888ed
    * Adding itinerary services d837666f80b94c369da4bed7ca4ee86b
    * Adding itinerary services e5ba58ba3f084434b427c94b4e196bd3
    * ItinerarySelector.Execute() :  **FOUND ITINERARY  ** = Resolver.Itinerary
    * Schema strong name is MyCompany.MyProduct.BTAHL7V2XCommon.ACK_25_GLO_DEF, MyCompany.MyProduct.BTAHL7V2XCommon, Version=1.0.0.0, Culture=neutral, PublicKeyToken=91608530323964c9 after first context read.
    * Document message type is http://microsoft.com/HealthCare/HL7/2X#ACK_25_GLO_DEF after first context read.

    and next I receive the error message:
    * The itinerary header could not be found.

    Best regards,
    Gerben

  • Sunday, November 01, 2009 12:07 AMLeandroDG Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     AnswerHas Code
    Gerben, I've been reflecting the code for ESB Toolkit, the error is currently happening in Microsoft.Practices.ESB.Itinerary assembly, when the method Create(IBaseMessage) or Create(XLANGMessage) are called in class ItineraryOMFactory.

    The code for this methods:

        public static IItinerary Create(IBaseMessage msg)
        {
            if (msg == null)
            {
                throw new ArgumentNullException("msg");
            }
            string str = msg.get_Context().Read(ItineraryProperties.ItineraryHeader.Name, ItineraryProperties.ItineraryHeader.Namespace) as string;
            if (string.IsNullOrEmpty(str))
            {
                throw new ItineraryOMException(Resources.NoItineraryHeaderFound);
            }
            return Create(str);
        }
    
        public static IItinerary Create(XLANGMessage msg)
        {
            if (msg == null)
            {
                throw new ArgumentNullException("msg");
            }
            string propertyValue = msg.GetPropertyValue(typeof(ItineraryHeader)) as string;
            if (string.IsNullOrEmpty(propertyValue))
            {
                throw new ItineraryOMException(Resources.NoItineraryHeaderFound);
            }
            return Create(propertyValue);
        }
    
    

    It looks like the property is not being correctly set.

    I think the problem may be related to the message creation in the Disassembler, if you are creating a new message in the disassembler you may be missing setting the appropiate context property.

    If you can post the code for the disassembler or a sample code that reproduces the problem maybe I can be of further help.

    Regards,
    Leandro.