How to add Detail to a SOAP Fault using Sonic Connect 8.5

Posted by dobrien on 26-Mar-2012 11:06

Hello Forum,

I have a WSDL (attached) which I've loaded into Sonic Connect Project as a Top Down Web Service development.

Everything's working fine (and as expected) except that none of the Fault Steps in my processes return any Fault Detail. SOAP Faults are generated (with HTTP Status 500), but just don't have any detail.

I've followed the manual and made sure the following has been done:

     1. Add a Fault step at the end of the branch from which a SOAP fault must be returned.

     2. Set the

SonicESB.Fault.Name ESB message header. The value for the header must be same as the fault name defined on the Interface page. You can also set the Error Name runtime parameter of the Fault step. If the header is not set, the SOAP fault detail will not be generated.

     3. Set the message part with the same name as defined for the fault part on the Interface page (for example, Param1). This will be used as the SOAP fault detail.

     4. Set the

SonicESB.Fault.String ESB message header. The value of the header will be the fault string of the SOAP fault. You can also set the Error Message runtime parameter of the Fault step.

     5. Set the

SonicESB.Fault.Code ESB message header. The value of the header will be the fault code of the SOAP fault. You can also set the Error Code runtime parameter of the Fault step.

I'm assuming that the Fault Parameter part defined on the Process Interface (from the WSDL) is somehow mapped to the message part name to use for the Fault detail, but all I get is a SOAP Fault with my SonicESB.Fault.String and SonicESB.Fault.Code values below:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Body>
      <soap:Fault>
         <faultcode>soap:Server</faultcode>
         <faultstring>An unknown error occured</faultstring>
      </soap:Fault>
   </soap:Body>
</soap:Envelope>

Can anyone shed any light on exactly how the Interface Fault Part is retreived/mapped from the ESB Message parts?

Thanks a lot for any help...

Dave.

Web Service Definitions.zip

All Replies

Posted by wtam on 26-Mar-2012 12:52

Hi Dave,

What is the SonicESB.Fault.Name header set to?  It should be one of the following:

GetRate operation:

* genericfault

MaintainOrganisation operation:

* maintainorganisationfault

MethodFeedback operation:

* methodfeedbackfault

It looks like the above fault messages all have part name "parameters".   So, your (fault) ESB message message should have a message part with content id "parameters" or you can explciity map the fault parameter from something else.  The mapped parameter or the "parameters" ESB part will appear in the SOAP fault detail.

Thanks.

Posted by dobrien on 26-Mar-2012 13:50

Thanks William (and for the v. fast response),

Worked like a charm! I was setting the SonicESB.Fault.Name to the name of my Fault parameter (Fault0).  I renamed my fault parameter to maintainorganisationfault (as per the WSDL), updated the SonicESB.Fault.Name and all is now well...

So... pushing my luck then - is there any way I can get a faultactor element into the SOAP Fault body too?

Dave.

Posted by wtam on 26-Mar-2012 14:28

We currently don't support Fault Actor.  We'll look into supporting it in the future releases.

Thanks.

Posted by dobrien on 27-Mar-2012 03:47

In that case then, is there anyway we can build the complete SOAP Fault 'manually' (including our faultactor element) and return it with an HTTP 500 Status?

Posted by wtam on 27-Mar-2012 14:53

Hmm... I don't think it is possible.  You might want to contact tech support to open a patch request to add Fault Actor support.

This thread is closed