1SOAP::Schema(3)       User Contributed Perl Documentation      SOAP::Schema(3)
2
3
4

NAME

6       SOAP::Schema - provides an umbrella for the way in which SOAP::Lite
7       manages service description schemas
8

DESCRIPTION

10       This class provides an umbrella for the way in which SOAP::Lite manages
11       service description schemas. Currently, the only support present is for
12       the Web Services Description Language (WSDL). This is another of the
13       classes not generally designed to be directly instantiated by an
14       application, though it can be if so desired.
15

METHODS

17       new(optional key/value pairs)
18               $schema = SOAP::Schema->new(parse => $schema_uri);
19
20           This is the class constructor. With no arguments, it creates a
21           blank object of the class. Any arguments that are passed are
22           treated as key/value pairs in which the key represents one of the
23           methods described here, and the value is what gets passed when the
24           method itself gets invoked.
25
26       parse(service description URI)
27               $schema->parse('http://schemas.w3.org/soap.wsdl');
28
29           Parses the internal representation of the service description prior
30           to the generation of stub routines to provide method-like access to
31           the remote services.
32
33       access(service description URI)
34               $schema->access('http://soap.org/service.wsdl');
35
36           Loads the specified service description from the given URL, using
37           the current value of the schema accessor if none is provided. The
38           full content of the URL is returned on success, or an exception is
39           thrown (via "die") on error.
40
41       load
42               $schema->load;
43
44           Takes the internal representation of the service and generates code
45           stubs for the remote methods, allowing them to be called as local
46           object methods. Stubs are generated for all the functions declared
47           in the WSDL description with this call because it's enough of a
48           class framework to allow for basic object creation for use as
49           handles.
50
51       schema
52               $current_schema = $schema->schema;
53
54           Gets (or sets) the current schema representation to be used by this
55           object. The value to be passed when setting this is just the URI of
56           the schema. This gets passed to other methods such as access for
57           loading the actual content.
58
59       services
60               $hashref = $schema->services;
61
62           Gets or sets the services currently stored on the object. The
63           services are kept as a hash reference, whose keys and values are
64           the list of returned values from the WSDL parser. Keys represent
65           the names of the services themselves (names have been normalized
66           into Perl-compatible identifiers), with values that are also hash
67           references to the internal representation of the service itself.
68
69       stub
70           Returns the autogenerated Perl code as a string. This code is
71           generated from the WSDL provided by the "service" method call. The
72           code contains a package definition for the service being called.
73
74               my $client = SOAP::Lite->new;
75               my $code = $client->service($WSDL_URL)->stub;
76               open FILE,">ServicePackage.pm";
77               print FILE $code;
78               close FILE;
79
80       cache_dir
81           Sets/retrieves the value of the directory where generated stubs
82           will be cached. If "cache_dir" is null, then no caching will be
83           performed.
84
85               my $client = SOAP::Lite->new;
86               my $code = $client->cache_dir("/tmp")->service($WSDL_URL)->stub;
87
88           If "cache_dir" is undefined, no caching will take place.
89
90       cache_ttl
91           Sets/retrieves the value of the time to live (in seconds) for
92           cached files. This is only relevant when used in conjunction with
93           "cache_dir".
94
95           If "cache_ttl" is set to 0, the cache will never expire. Files will
96           have to be removed manually in order for the cache to be refreshed.
97
98               my $client = SOAP::Lite->new;
99               my $code = $client->cache_ttl(3600)->cache_dir("/tmp")->service($WSDL_URL)->stub;
100
101           The default time to live is 0.
102
103       useragent(LWP::UserAgent)
104               my $client = SOAP::Lite->new;
105               $ua = $client->schema->useragent;
106               $ua->agent("Fubar! 0.1");
107               my $response = $client->service("http://localhost/some.wsdl")
108                                     ->someMethod("Foo");
109
110           Gets or sets the classes UserAgent used for retrieving schemas over
111           the web.  This allows users to have direct access to the UserAgent
112           so that they may control the credentials passed to a remote server,
113           or the specific configuration of their HTTP agent.
114

SOAP::Schema::WSDL

116       At present, the SOAP::Lite toolkit supports only loading of service
117       descriptions in the WSDL syntax. This class manages the parsing and
118       storing of these service specifications. As a general rule, this class
119       should be even less likely to be used directly by an application
120       because its presence should be completely abstracted by the previous
121       class (SOAP::Schema). None of the methods are defined here; the class
122       is only mentioned for sake of reference.
123

ACKNOWLEDGEMENTS

125       Special thanks to O'Reilly publishing which has graciously allowed
126       SOAP::Lite to republish and redistribute large excerpts from
127       Programming Web Services with Perl, mainly the SOAP::Lite reference
128       found in Appendix B.
129
131       Copyright (C) 2000-2004 Paul Kulchenko. All rights reserved.
132
133       This library is free software; you can redistribute it and/or modify it
134       under the same terms as Perl itself.
135

AUTHORS

137       Paul Kulchenko (paulclinger@yahoo.com)
138
139       Randy J. Ray (rjray@blackperl.com)
140
141       Byrne Reese (byrne@majordojo.com)
142
143
144
145perl v5.30.1                      2020-01-30                   SOAP::Schema(3)
Impressum