X-Git-Url: http://git.rot13.org/?p=perl-cwmp.git;a=blobdiff_plain;f=lib%2FCWMP%2FResponse.pm;fp=lib%2FCWMP%2FResponse.pm;h=4094114d421eb66fae99e0f899f1aaa9e6f0c846;hp=353a1940c9c73b270ef838b43081a94aca93bf5a;hb=6ce75d1058721ecaf61a4db0256bb82ab9e44821;hpb=605415ce181a87894a351eb8c1f8d6e275bff968 diff --git a/lib/CWMP/Response.pm b/lib/CWMP/Response.pm index 353a194..4094114 100644 --- a/lib/CWMP/Response.pm +++ b/lib/CWMP/Response.pm @@ -34,7 +34,8 @@ sub new { my $cwmp = [ cwmp => 'urn:dslforum-org:cwmp-1-0' ]; -my $soap = [ soap => "http://schemas.xmlsoap.org/soap/envelope/" ]; +my $soap = [ soap => 'http://schemas.xmlsoap.org/soap/envelope/' ]; +my $xsd = [ xsd => 'http://www.w3.org/2001/XMLSchema-instance' ]; =head2 InformResponse @@ -103,21 +104,26 @@ sub GetParameterNames { =head2 GetParameterValues - $response->GetParameterValues( $state, $ParameterPath, $NextLevel ); + $response->GetParameterValues( $state, $ParameterNames ); =cut sub GetParameterValues { - my ( $self, $state, $ParameterPath, $NextLevel ) = @_; - $ParameterPath ||= ''; # all - $NextLevel ||= 0; # all - warn "# GetParameterValues( '$ParameterPath', $NextLevel )\n" if $self->debug; + my $self = shift; + my $state = shift; + my @ParameterNames = @_; + confess "need ParameterNames" unless @ParameterNames; + warn "# GetParameterValues", dump( @ParameterNames ), "\n" if $self->debug; + $self->xml( $state, sub { my ( $X, $state ) = @_; $X->GetParameterValues( $cwmp, - $X->ParameterPath( $cwmp, $ParameterPath ), - $X->NextLevel( $cwmp, $NextLevel ), + $X->ParameterNames( $cwmp, + map { + $X->string( $xsd, $_ ) + } @ParameterNames + ) ); }); }