$self->_push_handlers(Start => sub { $self->_body_on_start(@_) },
Char => sub { $self->_body_on_char (@_) },
End => sub { $self->_body_on_end (@_) },
);
}
elsif ($soap_header eq $element) {
unless (2 == $parser->element_index()) { $self->_throw("Unexpected $soap_header element (if present, $soap_header must be the first element under $soap_envelope)") }
$self->_verify_soap_namespace($parser, $element);
$self->_push_handlers(Start => sub { $self->_header_on_start(@_) },
Char => sub { $self->_header_on_char (@_) },
End => sub { $self->_header_on_end (@_) },
);
}
else {
$self->_throw("Unexpected element: $element");
}
}
sub _envelope_on_char {
my ($self, $parser, $s) = @_;
$self->_complain_if_contains_non_whitespace($s);
}
sub _envelope_on_end {
my ($self, $parser, $element) = @_;
__diagnostic_leave_element($parser, $element);
$self->_pop_context();
$self->_pop_handlers();
}
sub _header_on_start {
my ($self, $parser, $element) = (shift, shift, shift);