none
SOAP Fault msg

    Question

  • Hi,

    I have an orchestration to send request to customers' web service and get the response from it using soap adaptor. I am getting the following error when I get fault response message.

    Uncaught exception (see the 'inner exception' below) has suspended an instance of service ....
    ShapeId:
    Exception thrown from: segment -1, progress -1
    Inner exception: An exception has been raised as a result of client data.
    Message ID: {250E5B3E-BBD1-4EFB-A7AC-FD34EED341E5}
    Instance ID: {8C674A24-7904-4B62-8F60-A976D7E968B5}
    Error Description: An exception has been raised as a result of client data.      
    Exception type: XlangSoapException
    Source: Microsoft.XLANGs.BizTalk.Engine
    Target Site: Void VerifyTransport(Microsoft.XLANGs.Core.Envelope, Int32, Microsoft.XLANGs.Core.Context)
    ......

    I see the following message in the suspended Orchest.

    <?xml version="1.0" encoding="utf-16"?>
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
      <soap:Body>
        <soap:Fault>
          <faultcode>Client</faultcode>
          <faultstring>An exception has been raised as a result of client data.</faultstring>
          <detail>
            <err:Errors xmlns:err="http://*****/XMLSchema/XOLTWS/Error/v1.1">
              <err:ErrorDetail>
                <err:Severity>Hard</err:Severity>
                <err:PrimaryErrorCode>
                  <err:Code>151018</err:Code>
                  <err:Description>Invalid tracking number</err:Description>
                </err:PrimaryErrorCode>
              </err:ErrorDetail>
            </err:Errors>
          </detail>
        </soap:Fault>
      </soap:Body>
    </soap:Envelope>

    To fix this, I created catch exception block with exception type = System.Web.Service.Protocal.SoapExcetiopn in Orchestration to capture the exception. Now I am getting different error:

    Uncaught exception (see the 'inner exception' below) has suspended an instance of service ....
    Inner exception: Type 'Oracle.DataAccess.Client.OracleConnection' in Assembly 'Oracle.DataAccess, Version=2.111.6.20, Culture=neutral, PublicKeyToken=89b483f429c47342' is not marked as serializable.
           
    Exception type: SerializationException
    Source: mscorlib
    Target Site: System.Reflection.MemberInfo[] InternalGetSerializableMembers(System.RuntimeType)
    The following is a stack trace that identifies the location where the exception occured....

    I am calling a .NET assembly in the Orchestration to do some query on Oracle Database. I have the [Serializable] at the beging of  the class to make the class serializable.

    How can i fix this error? Why do I get this serializable error ?

    Thank you for your help in advance,

    Siv

    Wednesday, March 24, 2010 9:51 PM

Answers

  • The best practice is to actually add two exception handler blocks - one for SOAP and one for general excepions. The SOAP exception should be of type '"System.Web.Services.Protocols.SOAPExceptions' and the actual error is available by using errorObject.Detail.InnerText. The second exception handler can be of type System.Exception (when you select <.Net Exception> click the first type name on the right pane and then type exc.. - it should select a type name 'Exception' with fully qualified name 'System.Exception'. That's the one you want.
    Thiago Almeida - http://connectedthoughts.wordpress.com
    • Marked as answer by WatNxt Thursday, March 25, 2010 9:22 PM
    Thursday, March 25, 2010 4:33 AM
    Answerer
  • Hi,

    I assume that you call the webservice from within a scope and catch soap exception. To catch other types of exceptions you need to choose System.Exception. Your second error occurs I assume when you call a .NET assembly from within a scope. In that case your scope need to be an atomic scope. Your expression shape which contains the calling code needs to be in an atomic scope shape. atomic scopes does not have persistence points, so non-serizable code can be called from this.method.

    Regards,

    Steef-Jan Wiggers
    MCTS BizTalk Server
    http://soa-thoughts.blogspot.com/
    If this answers your question please mark it accordingly


    BizTalk
    • Marked as answer by WatNxt Thursday, March 25, 2010 3:33 AM
    Thursday, March 25, 2010 12:53 AM
    Moderator

All replies

  • Hi,

    I assume that you call the webservice from within a scope and catch soap exception. To catch other types of exceptions you need to choose System.Exception. Your second error occurs I assume when you call a .NET assembly from within a scope. In that case your scope need to be an atomic scope. Your expression shape which contains the calling code needs to be in an atomic scope shape. atomic scopes does not have persistence points, so non-serizable code can be called from this.method.

    Regards,

    Steef-Jan Wiggers
    MCTS BizTalk Server
    http://soa-thoughts.blogspot.com/
    If this answers your question please mark it accordingly


    BizTalk
    • Marked as answer by WatNxt Thursday, March 25, 2010 3:33 AM
    Thursday, March 25, 2010 12:53 AM
    Moderator
  • Thank you Steef for helping to fix this issue.

    I haven't used the "System.Exception".  I dont find it under the .NET Exceptions. Could you give me more info about this type of exception?

    Thursday, March 25, 2010 3:37 AM
  • The best practice is to actually add two exception handler blocks - one for SOAP and one for general excepions. The SOAP exception should be of type '"System.Web.Services.Protocols.SOAPExceptions' and the actual error is available by using errorObject.Detail.InnerText. The second exception handler can be of type System.Exception (when you select <.Net Exception> click the first type name on the right pane and then type exc.. - it should select a type name 'Exception' with fully qualified name 'System.Exception'. That's the one you want.
    Thiago Almeida - http://connectedthoughts.wordpress.com
    • Marked as answer by WatNxt Thursday, March 25, 2010 9:22 PM
    Thursday, March 25, 2010 4:33 AM
    Answerer
  • Thank you Thiago, It helps me alot.
    Thursday, March 25, 2010 9:22 PM