view release on metacpan or  search on metacpan

examples/  view on Meta::CPAN

use SOAP::Lite +autodispatch =>
  uri => '',
  proxy => 'http://localhost/',
# proxy => 'http://localhost/cgi-bin/soap.cgi', # local CGI server
# proxy => 'http://localhost/soap',             # local mod_perl server
# proxy => 'https://localhost/soap',            # local mod_perl SECURE server
  on_fault => sub { my($soap, $res) = @_;
    die ref $res ? $res->faultdetail : $soap->transport->status, "\n";
sub SOAP::Transport::HTTP::Client::get_basic_credentials { return ('user' => 'password') };

print getStateName(1), "\n\n";
print getStateNames(12,24,26,13), "\n\n";
print getStateList([11,12,13,42])->[0], "\n\n";
print getStateStruct({item1 => 10, item2 => 4})->{item2}, "\n\n";

# OR if you have SOAP::Lite object you can do
# $s->transport->credentials('host_port', 'realm', 'user' => 'password');

# see LWP::UserAgent for difference and more documentation

# OR add user and password to your URL as follows:
# proxy => 'http://user:password@localhost/'

lib/SOAP/Schema.pod  view on Meta::CPAN

=item useragent(LWP::UserAgent)

    my $client = SOAP::Lite->new;
    $ua = $client->schema->useragent;
    $ua->agent("Fubar! 0.1");
    my $response = $client->service("http://localhost/some.wsdl")

Gets or sets the classes UserAgent used for retrieving schemas over the web.
This allows users to have direct access to the UserAgent so that they may control
the credentials passed to a remote server, or the specific configuration of their
HTTP agent.


=head1 SOAP::Schema::WSDL

At present, the SOAP::Lite toolkit supports only loading of service descriptions in the WSDL syntax. This class manages the parsing and storing of these service specifications. As a general rule, this class should be even less likely to be used direc...


lib/SOAP/Transport.pod  view on Meta::CPAN


   $soap->transport->proxy("http" => "http://my.proxy.server");

The above code samples should specify a proxy server for you. And should you use C<HTTP_proxy_user>
and C<HTTP_proxy_pass> for proxy authorization, C<SOAP::Lite> will handle it properly.


HTTP Basic authentication is accomplished by overriding the get_basic_credentials subroutine in C<LWP::UserAgent> (which C<SOAP::Transport::HTTP::Client> is a subclass):

    sub SOAP::Transport::HTTP::Client::get_basic_credentials {
      return 'username' => 'password';


    use HTTP::Cookies;
    my $cookies = HTTP::Cookies->new(ignore_discard => 1);
    # you may also add 'file' if you want to keep them between sessions
    my $soap = SOAP::Lite->proxy('http://localhost/');

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 1.063 second using v1.00-cache-1.14-grep-28634ff-cpan-76051f2a956 )