Skip to main content

validate_request

Function validate_request 

Source
pub fn validate_request(
    body_bytes: &[u8],
    type_registry: &TypeRegistry,
    input_type: Option<&QName>,
) -> Result<(), SoapFault>
Expand description

XSD-11: Structural validation of the request body against the operation’s input type.

Parses body_bytes as XML and checks that all elements with min_occurs > 0 in the resolved ComplexType are present as children of the root element.

Returns Ok(()) if:

  • input_type is None (no type information — skip validation)
  • input_type is Some(qname) but qname is not in the registry (unknown type — skip)
  • All required elements are present

Returns Err(SoapFault::sender(...)) if a required child element is missing.