Skip to Content

No custom fault exception returned to SharePoint

As specified in the Developer Guide, if we add a message to the message container, specifying an error (E) and setting the result code to failed_permanent, it generates a StandardMessageFault.

So when I test the proxy (in SE80) I have the correct result:

<nm:StandardMessageFault xmlns:nm="http://mycompany.com/duet" xmlns:prx="urn:sap.com:proxy:DUT:/1SAI/TAS9B2825F673DBE6C48B46:702">
- <standard>
  <faultText>Proxy Class (generated)</faultText> 
- <faultDetail>
  <severity>error</severity> 
  <text>Non-Retriable Exception with message: Data not found. Reason : Test error</text> 
  <id>110(/IWFND/CM_COS)</id> 
  </faultDetail>
- <faultDetail>
  <severity>error</severity> 
  <text>Data not found. Reason : Test error</text> 
  <id>011(Z_ECIS)</id> 
  </faultDetail>
  </standard>
  </nm:StandardMessageFault>

But when I do the call from SharePoint (External List) we just received "Application exception occured!"

When I look into SRT_UTIL, I see that my fault contain also a CX_PROXY_INBOUND_APP_ERROR in addition to my custom fault:

- <ERROR_CONTEXT>
- <ERROR_INFO>
- <EXCEPTION_INFO>
  <TYPE>ZDREQ_CX_STANDARD_MSG_FAULT</TYPE> 
  <ERROR_TEXT>Application Error</ERROR_TEXT> 
- <CX_PROXY_INBOUND_APP_ERROR>
  <ERROR_PART href="#o696" /> 
  <ID>APPLICATION_ERROR</ID> 
  <RETRY_MODE>M</RETRY_MODE> 
  <ERROR_CLASS_NAME>ZDREQ_CX_STANDARD_MSG_FAULT</ERROR_CLASS_NAME> 
  </CX_PROXY_INBOUND_APP_ERROR>
- <ZDREQ_CX_STANDARD_MSG_FAULT>
  <AUTOMATIC_RETRY /> 
  <CONTROLLER /> 
  <NO_RETRY /> 
- <STANDARD>
  <FAULT_TEXT>Proxy Class (generated)</FAULT_TEXT> 
- <FAULT_DETAIL>
- <ZDREQ_EXCHANGE_LOG_DATA>
  <SEVERITY>error</SEVERITY> 
  <TEXT>Non-Retriable Exception with message: Data not found. Reason : Test error</TEXT> 
  <ID>110(/IWFND/CM_COS)</ID> 
  </ZDREQ_EXCHANGE_LOG_DATA>
- <ZDREQ_EXCHANGE_LOG_DATA>
  <SEVERITY>error</SEVERITY> 
  <TEXT>Data not found. Reason : Test error</TEXT> 
  <ID>011(Z_ECIS)</ID> 
  </ZDREQ_EXCHANGE_LOG_DATA>
  </FAULT_DETAIL>
  </STANDARD>
  <WF_TRIGGERED /> 
  </ZDREQ_CX_STANDARD_MSG_FAULT>
  </EXCEPTION_INFO>
  </ERROR_INFO>

So it's like an error saying that an error of type ZDREQ_CX_STANDARD_MSG_FAULT has occured.

And as it is before my custom fault (ZDREQ_CX_STANDARD_MSG_FAULT) it seems that only the "Application Error" is returned to SharePoint, instead of the "Data not found. Reason: Test Error".

How I could make the fault returned to SharePoint the same as the one I see when testing the server proxy?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Sep 23, 2011 at 10:34 AM

    I've created an additional endpoint for the service with no security (HTTP, User/password authentication) to be able to test it with soapUI (because the first endpoint is using SAML authentication).

    In soapUI I have the soap fault displayed correctly.

    The only difference I see between the SAML endpoint and the basic one I've created is that the SAML one contain the following parameter in the Security tab (SOAMANAGER):

    SOAP Fault Security = No SOAP Faults

    Is it possible this setting prevents the server from returning SOAP fault so it generates always a generic one? In this case, how to change it to make the endpoint behavior the same as in the Developer Guide?

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 27, 2011 at 12:48 PM

    Problem solved.

    SharePoint was referencing a SOAP 1.1 binding.

    Changing it to a SOAP 1.2 binding solved the problem.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.