I’ll provide a complete solution addressing all three critical aspects of this integration challenge:
1. SOAP Fault Mapping Configuration:
First, enable detailed fault mapping in your Integration Hub cloud deployment. Access your environment’s Service Center and navigate to Integration Hub settings. Add this configuration to the advanced settings:
<SOAPConfiguration>
<FaultHandling enabled="true">
<PreserveFaultDetails>true</PreserveFaultDetails>
<ParseCustomFaults>true</ParseCustomFaults>
</FaultHandling>
</SOAPConfiguration>
This ensures SOAP faults aren’t converted to generic exceptions before reaching your application logic.
2. Azure Logic Apps Integration Setup:
Azure Logic Apps requires specific configuration to return properly formatted SOAP faults. In your Logic App definition, ensure the error response action uses the correct SOAP 1.1 format:
<Response action="SetFaultResponse">
<StatusCode>500</StatusCode>
<ContentType>text/xml</ContentType>
<FaultCodeMapping>Azure-to-SOAP</FaultCodeMapping>
</Response>
Critically, Azure Logic Apps often wraps SOAP responses in HTTP layers. Configure your Integration Hub connector to handle HTTP 500 status codes and extract the SOAP fault from the response body rather than treating it as a transport-level error.
3. Cloud Deployment Error Handling:
Implement a custom exception structure in OutSystems that maps specific SOAP fault codes:
// Pseudocode - SOAP fault handler implementation:
1. Create SOAPFaultException structure with fields: faultCode, faultString, detail
2. In Integration Hub connector, add OnException handler
3. Parse raw SOAP response XML to extract fault elements
4. Map common Azure fault codes (InvalidCredentials, Timeout, RateLimitExceeded)
5. Throw structured exception with parsed fault details
6. Implement retry logic based on faultCode classification
// See Integration Hub SDK documentation section 6.3
Implementation Steps:
a) Create a Server Action called ‘ParseSOAPFault’ that takes the raw exception message and extracts fault details using XML parsing
b) Wrap all Integration Hub SOAP calls in a try-catch that calls ParseSOAPFault on exceptions
c) Configure Azure Logic App to include correlation IDs in fault details for traceability
d) Set up cloud logging to capture both the HTTP response and SOAP fault body
Testing and Validation:
- Test with intentional fault scenarios (invalid credentials, timeouts, malformed requests)
- Verify fault codes are correctly extracted and logged
- Confirm retry logic triggers only for transient faults (Timeout, ServiceUnavailable)
- Validate that permanent faults (InvalidCredentials, AuthorizationFailed) don’t retry
Common Pitfalls to Avoid:
- Don’t rely on HTTP status codes alone - Azure returns 500 for multiple fault types
- Ensure your cloud firewall/proxy doesn’t strip SOAP headers
- Azure Logic Apps may cache fault responses - include cache-control headers
- In multi-region deployments, fault formats might vary slightly between Azure regions
This comprehensive approach ensures reliable SOAP fault handling between OutSystems Integration Hub and Azure Logic Apps in cloud deployments, with proper error classification and retry logic.