initial commit
[Geo-EZLocate.git] / EZLocate / Interfaces / Geocoding / Geocoding.pm
1 package Geo::EZLocate::Interfaces::Geocoding::Geocoding;
2 use strict;
3 use warnings;
4 use Class::Std::Fast::Storable;
5 use Scalar::Util qw(blessed);
6 use base qw(SOAP::WSDL::Client::Base);
7
8 # only load if it hasn't been loaded before
9 require Geo::EZLocate::Typemaps::Geocoding
10     if not Geo::EZLocate::Typemaps::Geocoding->can('get_class');
11
12 sub START {
13     $_[0]->set_proxy('http://mmezl.teleatlas.com/axis/services/Geocoding') if not $_[2]->{proxy};
14     $_[0]->set_class_resolver('Geo::EZLocate::Typemaps::Geocoding')
15         if not $_[2]->{class_resolver};
16
17     $_[0]->set_prefix($_[2]->{use_prefix}) if exists $_[2]->{use_prefix};
18 }
19
20 sub getServices {
21     my ($self, $body, $header) = @_;
22     die "getServices must be called as object method (\$self is <$self>)" if not blessed($self);
23     return $self->SUPER::call({
24         operation => 'getServices',
25         soap_action => 'Geocoding:GeocodingPortType#getServices',
26         style => 'document',
27         body => {
28             
29
30            'use'            => 'literal',
31             namespace       => 'http://schemas.xmlsoap.org/wsdl/soap/',
32             encodingStyle   => '',
33             parts           =>  [qw( Geo::EZLocate::Elements::getServices )],
34         },
35         header => {
36             
37         },
38         headerfault => {
39             
40         }
41     }, $body, $header);
42 }
43
44
45 sub getServiceDescription {
46     my ($self, $body, $header) = @_;
47     die "getServiceDescription must be called as object method (\$self is <$self>)" if not blessed($self);
48     return $self->SUPER::call({
49         operation => 'getServiceDescription',
50         soap_action => 'Geocoding:GeocodingPortType#getServiceDescription',
51         style => 'document',
52         body => {
53             
54
55            'use'            => 'literal',
56             namespace       => 'http://schemas.xmlsoap.org/wsdl/soap/',
57             encodingStyle   => '',
58             parts           =>  [qw( Geo::EZLocate::Elements::getServiceDescription )],
59         },
60         header => {
61             
62         },
63         headerfault => {
64             
65         }
66     }, $body, $header);
67 }
68
69
70 sub findAddress {
71     my ($self, $body, $header) = @_;
72     die "findAddress must be called as object method (\$self is <$self>)" if not blessed($self);
73     return $self->SUPER::call({
74         operation => 'findAddress',
75         soap_action => 'Geocoding:GeocodingPortType#findAddress',
76         style => 'document',
77         body => {
78             
79
80            'use'            => 'literal',
81             namespace       => 'http://schemas.xmlsoap.org/wsdl/soap/',
82             encodingStyle   => '',
83             parts           =>  [qw( Geo::EZLocate::Elements::findAddress )],
84         },
85         header => {
86             
87         },
88         headerfault => {
89             
90         }
91     }, $body, $header);
92 }
93
94
95 sub findMultiAddress {
96     my ($self, $body, $header) = @_;
97     die "findMultiAddress must be called as object method (\$self is <$self>)" if not blessed($self);
98     return $self->SUPER::call({
99         operation => 'findMultiAddress',
100         soap_action => 'Geocoding:GeocodingPortType#findMultiAddress',
101         style => 'document',
102         body => {
103             
104
105            'use'            => 'literal',
106             namespace       => 'http://schemas.xmlsoap.org/wsdl/soap/',
107             encodingStyle   => '',
108             parts           =>  [qw( Geo::EZLocate::Elements::findMultiAddress )],
109         },
110         header => {
111             
112         },
113         headerfault => {
114             
115         }
116     }, $body, $header);
117 }
118
119
120
121
122 1;
123
124
125
126 __END__
127
128 =pod
129
130 =head1 NAME
131
132 Geo::EZLocate::Interfaces::Geocoding::Geocoding - SOAP Interface for the Geocoding Web Service
133
134 =head1 SYNOPSIS
135
136  use Geo::EZLocate::Interfaces::Geocoding::Geocoding;
137  my $interface = Geo::EZLocate::Interfaces::Geocoding::Geocoding->new();
138
139  my $response;
140  $response = $interface->getServices();
141  $response = $interface->getServiceDescription();
142  $response = $interface->findAddress();
143  $response = $interface->findMultiAddress();
144
145
146
147 =head1 DESCRIPTION
148
149 SOAP Interface for the Geocoding web service
150 located at http://mmezl.teleatlas.com/axis/services/Geocoding.
151
152 =head1 SERVICE Geocoding
153
154
155
156 =head2 Port Geocoding
157
158
159
160 =head1 METHODS
161
162 =head2 General methods
163
164 =head3 new
165
166 Constructor.
167
168 All arguments are forwarded to L<SOAP::WSDL::Client|SOAP::WSDL::Client>.
169
170 =head2 SOAP Service methods
171
172 Method synopsis is displayed with hash refs as parameters.
173
174 The commented class names in the method's parameters denote that objects
175 of the corresponding class can be passed instead of the marked hash ref.
176
177 You may pass any combination of objects, hash and list refs to these
178 methods, as long as you meet the structure.
179
180 List items (i.e. multiple occurences) are not displayed in the synopsis.
181 You may generally pass a list ref of hash refs (or objects) instead of a hash
182 ref - this may result in invalid XML if used improperly, though. Note that
183 SOAP::WSDL always expects list references at maximum depth position.
184
185 XML attributes are not displayed in this synopsis and cannot be set using
186 hash refs. See the respective class' documentation for additional information.
187
188
189
190 =head3 getServices
191
192
193
194 Returns a L<Geo::EZLocate::Elements::getServicesResponse|Geo::EZLocate::Elements::getServicesResponse> object.
195
196  $response = $interface->getServices( {
197     identity =>  $some_value, # int
198   },,
199  );
200
201 =head3 getServiceDescription
202
203
204
205 Returns a L<Geo::EZLocate::Elements::getServiceDescriptionResponse|Geo::EZLocate::Elements::getServiceDescriptionResponse> object.
206
207  $response = $interface->getServiceDescription( {
208     service =>  $some_value, # string
209     identity =>  $some_value, # int
210   },,
211  );
212
213 =head3 findAddress
214
215
216
217 Returns a L<Geo::EZLocate::Elements::findAddressResponse|Geo::EZLocate::Elements::findAddressResponse> object.
218
219  $response = $interface->findAddress( {
220     service =>  $some_value, # string
221     input =>  { # Geo::EZLocate::Types::Record
222       nv =>  { # Geo::EZLocate::Types::NameValue
223         name =>  $some_value, # string
224         value =>  $some_value, # string
225       },
226     },
227     identity =>  $some_value, # int
228   },,
229  );
230
231 =head3 findMultiAddress
232
233
234
235 Returns a L<Geo::EZLocate::Elements::findMultiAddressResponse|Geo::EZLocate::Elements::findMultiAddressResponse> object.
236
237  $response = $interface->findMultiAddress( {
238     service =>  $some_value, # string
239     inputs =>  { # Geo::EZLocate::Types::RecordSequence
240       record =>  { # Geo::EZLocate::Types::Record
241         nv =>  { # Geo::EZLocate::Types::NameValue
242           name =>  $some_value, # string
243           value =>  $some_value, # string
244         },
245       },
246     },
247     identity =>  $some_value, # int
248   },,
249  );
250
251
252
253 =head1 AUTHOR
254
255 Generated by SOAP::WSDL on Fri Nov  2 14:12:17 2012
256
257 =cut