locked
Catch exceptions via orchestration RRS feed

  • Question

  • Hi,

    I am using web services which have a downtime during the night, therefore I need something to catch the exception. I have tried using the exception of System.ServiceModel.EndpointNotFound. However the orchestration never hits this catch block, it hits the general exception block (this is there to handle something else and therefore I need the 2 catch blocks).

    Error Message: A message received by adapter "WCF-WebHttp" on receive location "Unknown " with URI "Unknown URL " is suspended. Error details: System.ServiceModel.EndpointNotFoundException: There was no endpoint listening at <URL> that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details. ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it <ip:port> at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult) at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception) --- End of inner exception stack trace --- at System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult asyncResult, TransportContext& context) at System.ServiceModel.Channels.HttpOutput.WebRequestHttpOutput.GetOutputStreamAsyncResult.CompleteGetRequestStream(IAsyncResult result) --- End of inner exception stack trace --- Server stack trace: at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result) at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.End(SendAsyncResult result) at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result) at System.ServiceModel.Channels.ServiceChannel.EndRequest(IAsyncResult result) Exception rethrown at [0]: at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) at System.ServiceModel.Channels.IRequestChannel.EndRequest(IAsyncResult result) at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.RequestCallback(IAsyncResult result) MessageId: {C79EFCE5-2E06-4F65-ACC4-333DA80DFDAE} InstanceID: {9B4DF13D-4093-44EB-977B-4B9AB402C195}

    Orchestration steps

    orchestration

    Kind regards,

    Steven.


    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.


    • Edited by Steven Audis Tuesday, July 11, 2017 9:46 AM formatting issues
    Tuesday, July 11, 2017 9:45 AM

Answers

  • What's probably happening is that the Port error is returned to the Orchestration as a SOAP Fault, not a standard .Net Exception.

    What you need to do is add the Fault response to the Port, then catch the Fault, probably 1.2.

    • Marked as answer by Steven Audis Tuesday, July 18, 2017 6:52 AM
    Tuesday, July 11, 2017 2:45 PM
    Moderator

All replies

  • Are you checking for System.ServiceModel.EndpointNotFoundException in your EndpointNotFound Block?

    /Peter


    Tuesday, July 11, 2017 10:06 AM
  • Hi Peter,

    Thanks for your reply. The exception object type is set to System.ServiceModel.EndpointNotFound.

    The logical port it set to Transmitted and the retry on the physical port is set to 0. I believe this is correct.

    Thanks, Bryony 

    Tuesday, July 11, 2017 11:04 AM
  • What's probably happening is that the Port error is returned to the Orchestration as a SOAP Fault, not a standard .Net Exception.

    What you need to do is add the Fault response to the Port, then catch the Fault, probably 1.2.

    • Marked as answer by Steven Audis Tuesday, July 18, 2017 6:52 AM
    Tuesday, July 11, 2017 2:45 PM
    Moderator
  • Hi John,

    I think you are correct and as such the orchestration is missing the error. I'll make some adjustments to the orchestration and see if I can get it to manage the faults as you suggest.

    Kind regards,

    Steven.


    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

    Tuesday, July 18, 2017 6:52 AM