MuleSoft · Web Service Consumer Connector
WSC:CANNOT_DISPATCH
Short answer
WSC:CANNOT_DISPATCH is raised when the request cannot be dispatched and the HTTP error cannot be turned into a SOAP fault. In version 3.0 that covers one-way operations, WSDL or schema requests, an empty HTTP error body, or an error body over 1048576 bytes.
VerifiedLast verified
01Error text
Error type: WSC:CANNOT_DISPATCH02Likely causes
- On a custom HTTP transport in version 3.0, an HTTP error with a non-empty SOAP fault body raises
WSC:SOAP_FAULT. Version 2.x raisedWSC:CANNOT_DISPATCHfor it. - Version 3.0 still raises
WSC:CANNOT_DISPATCHfor one-way operations, WSDL or schema requests, an undetermined one-way style, an empty HTTP error body, or an error body over 1048576 bytes.
03How to fix it
- Turn on wire logging for the HTTP transport: in
log4j2.xmladd<AsyncLogger name="org.mule.service.http.impl.service.HttpMessageLogger" level="DEBUG" />. Check the HTTP status and body the service returned. - If the error body is larger than 1048576 bytes, the limit is the system property
mule.wsc.maxReinjectedBodyBytes. - Handle the failure with an error handler of type
WSC:CANNOT_DISPATCH.
04Official documentation
→Related errors
- WSC:SOAP_FAULTWSC:SOAP_FAULT means the SOAP service returned a fault, or the response did not match the format in the WSDL. Read the fault text in error.errorMessage.payload.reason and the detail in error.errorMessage.payload.detail.
- WSC:SOAP_FAULT with faultcode soap:MustUnderstandA WSC:SOAP_FAULT with the fault code soap:MustUnderstand happens because the connector's security Must Understand field defaults to true and the service does not process that header. Set Must Understand to false.
- WSC:EMPTY_RESPONSEWSC:EMPTY_RESPONSE occurs when mandatory fields are missing from the SOAP response (Illegal Empty Response). Inspect the HTTP status and headers on the error and check what the service actually returned.
Test every fix in a non-production environment before you apply it to production. See how entries are verified.
More for MuleSoft work:Open MuleSoft jobsMuleSoft rates and salariesHire a senior MuleSoft developer