Cannot able to catch exceptions sometimes. RRS feed

  • Question

  • Hi All,
    I have BizTalk Solution where i send request XML to SAP ..i use BizTalk Adapter V2.0 SAP adapter.
    To catch exceptions i use System.Web.Services.Protocols.SoapException by using scope shape..
    Now most of the times i can catch exception and i reset SQL table flags in exception handling to resubmit the request XML.
    Now sometimes Biztalk don't seems to catch exception and it dehydrates Orchestration with all batch request XML..
    the error i get is 

    The Messaging Engine received an error from transport adapter "SAP" when notifying the adapter with the BatchComplete event. Reason "Value does not fall within the expected range.".

    Now due to this when i check in SAP out of say 5 request XML 3 of them is parked and SAP didn't send any response XML and remaining two did not park due to error..which could be like..
    Error Description: Invalid Posting Key 31 this error could be application specific..

    How can i resolve this issue ..

    Pls Advise..

    -- Regards Sandeep
    Thursday, March 18, 2010 12:50 PM


  • Hi Sandeep,

    To handle errors using a scope shape is good practice and you want to catch these kind of exceptions: System.Web.Services.Protocols.SoapException. In your case other exceptions than this type a not catched. You will need to implement another exception handler (general exception handler) see this demo: http://www.codeproject.com/KB/biztalk/ExceptionDemo.aspx.



    Steef-Jan Wiggers
    MCTS BizTalk Server
    If this answers your question please mark it accordingly

    • Marked as answer by Andrew_Zhu Thursday, March 25, 2010 1:28 AM
    Friday, March 19, 2010 1:25 PM