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

MuleSoft error
Error type: WSC:CANNOT_DISPATCH

02Likely 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 raised WSC:CANNOT_DISPATCH for it.
  • Version 3.0 still raises WSC:CANNOT_DISPATCH for 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

  1. Turn on wire logging for the HTTP transport: in log4j2.xml add <AsyncLogger name="org.mule.service.http.impl.service.HttpMessageLogger" level="DEBUG" />. Check the HTTP status and body the service returned.
  2. If the error body is larger than 1048576 bytes, the limit is the system property mule.wsc.maxReinjectedBodyBytes.
  3. Handle the failure with an error handler of type WSC:CANNOT_DISPATCH.

04Official documentation

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

The iPaaS Brief

Subscribe to The iPaaS Brief.

The iPaaS newsletter for the people who run integrations. From iPaaS Group.

Free. You finish on theipaasbrief.com and confirm by email.