Skip to main content

build_dispatch_table

Function build_dispatch_table 

Source
pub fn build_dispatch_table(
    resolved: &ResolvedWsdl,
    handlers: HashMap<String, Arc<dyn SoapHandler>>,
    auth_bypass: &HashSet<String>,
    default_handler: Option<Arc<dyn SoapHandler>>,
) -> Result<DispatchTable, DispatchError>
Expand description

Build the dispatch table at startup.

handlers is keyed by operation name (e.g., “GetProfiles”). auth_bypass is the set of operation names that skip authentication. default_handler is an optional catch-all used when no specific handler matches. When Some, operations without a registered handler are silently skipped (no error). When None, every WSDL operation must have a handler or UnregisteredOperation is returned.

Returns Err(DispatchError::UnregisteredOperation) if any WSDL operation has no handler and no default. Returns Err(DispatchError::UnknownOperation) if any registered handler has no WSDL operation.