/[cwmp]/google/lib/CWMP/Response.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /google/lib/CWMP/Response.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 32 - (hide annotations)
Mon Jun 18 23:52:41 2007 UTC (17 years ago) by dpavlin
File size: 964 byte(s)
implement Inform response
1 dpavlin 31 package CWMP::Response;
2    
3     use strict;
4     use warnings;
5    
6     use XML::Generator;
7 dpavlin 32 use base qw/Class::Accessor/;
8     __PACKAGE__->add_accessor( qw/
9     debug
10     /);
11 dpavlin 31
12 dpavlin 32 =head1 NAME
13 dpavlin 31
14 dpavlin 32 CWMP::Response - generate SOAP meesage for response
15 dpavlin 31
16 dpavlin 32 =head2 METHODS
17    
18     =head2 new
19    
20     my $response = CWMP::Response->new({ debug => 1 });
21    
22     =cut
23    
24     sub new {
25     my $class = shift;
26     my $self = $class->SUPER::new( @_ );
27    
28     warn "created XML::Generator object" if $self->debug;
29    
30     return $self;
31     }
32    
33    
34 dpavlin 31 my $cwmp = [ cwmp => 'urn:dslforum-org:cwmp-1-0' ];
35     my $soap = [ soap => "http://schemas.xmlsoap.org/soap/envelope/" ];
36    
37 dpavlin 32 =head2 Inform
38 dpavlin 31
39 dpavlin 32 $response->Inform;
40    
41     =cut
42    
43     sub Inform {
44     my $self = shift;
45    
46     my $X = XML::Generator->new(':pretty');
47    
48     return $X->Envelope( $soap, { 'soap:encodingStyle' => "http://schemas.xmlsoap.org/soap/encoding/" },
49     $X->Header( $soap,
50     $X->ID( $cwmp, { mustUnderstand => 1 }, 1234 ),
51     ),
52     $X->Body( $soap,
53     $X->InformResponse( $cwmp,
54     $X->MaxEnvelopes( $cwmp, 1 )
55     )
56     ),
57     );
58     }
59    
60     1;

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26