67 |
}); |
}); |
68 |
}; |
}; |
69 |
|
|
70 |
|
=head2 xml |
71 |
|
|
72 |
|
Used to implement methods which modify just body of soap message. |
73 |
|
For examples, see source of this module. |
74 |
|
|
75 |
|
=cut |
76 |
|
|
77 |
sub xml { |
sub xml { |
78 |
my $self = shift; |
my $self = shift; |
79 |
|
|
84 |
|
|
85 |
confess "no ID in state ", dump( $state ) unless ( $state->{ID} ); |
confess "no ID in state ", dump( $state ) unless ( $state->{ID} ); |
86 |
|
|
87 |
|
warn "state used to generate xml = " . dump( $state ) if $self->debug; |
88 |
|
|
89 |
my $X = XML::Generator->new(':pretty'); |
my $X = XML::Generator->new(':pretty'); |
90 |
|
|
91 |
return $X->Envelope( $soap, { 'soap:encodingStyle' => "http://schemas.xmlsoap.org/soap/encoding/" }, |
return $X->Envelope( $soap, { 'soap:encodingStyle' => "http://schemas.xmlsoap.org/soap/encoding/" }, |
92 |
$X->Header( $soap, |
$X->Header( $soap, |
93 |
$X->ID( $cwmp, { mustUnderstand => 1 }, $state->{ID} ), |
$X->ID( $cwmp, { mustUnderstand => 1 }, $state->{ID} ), |
94 |
|
$X->NoMoreRequests( $cwmp, $state->{NoMoreRequests} || 0 ), |
95 |
), |
), |
96 |
$X->Body( $soap, $closure->( $X, $state ) ), |
$X->Body( $soap, $closure->( $X, $state ) ), |
97 |
); |
); |