locked
handle wcf service fault RRS feed

  • Question

  • Hi

    I am consuming a wcf service in orchestration. I am getting the following exception from a wcf service

    <Fault xmlns="http://www.w3.org/2003/05/soap-envelope">
     <Code>
      <Value>Sender</Value>
      <Subcode>
       <Value>Sender</Value>
      </Subcode>
     </Code>
     <Reason>
      <Text xml:lang="en-US">Runtime</Text>
     </Reason>
     <Detail>
       <ServiceFault xmlns="http://schemas.xxx.yyy/aaa.bbb" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
         <ExceptionID>EX000000001</ExceptionID>
         <ExceptionMessage>Operator '=' is not defined for type 'DBNull' and 'Nothing'.</ExceptionMessage>
       </ServiceFault>
     </Detail>
    </Fault>


    I am having the following xpath set in my wcf-send Recieve port in the inbound message properties

    /*[local-name()='Fault']/*[local-name()='detail']/*[local-name()='ServiceFault'] | /*[local-name()='1st RootNode'] | /*[local-name()='2nd root node']

    And i chose the exception type as below in the orchestration exception handler.

    Port_Name.MethodName.ServiceFaultFault

    But i am getting the error as "Unable to find match for inbound body path expression."

    Can anybody tell me if i missed something.

    Thanks
    Vinoth
    • Edited by vinothanu Saturday, July 25, 2009 8:36 AM
    Saturday, July 25, 2009 8:30 AM

Answers

  • Usually BizTalk will wrap the response. You could try using a send port filter to dump out the fault message and see if there are extra elements you need to refer to in the XPath.

    Thanks,
    If this answers your question, please use the "Answer" button to say so | Ben Cline
    • Proposed as answer by edhickey Wednesday, July 29, 2009 7:18 PM
    • Marked as answer by Ben Cline1 Thursday, July 30, 2009 9:03 PM
    Tuesday, July 28, 2009 2:07 AM