SOAP - Simple Object Access Protocol
SOAP Server
Download: → /perl/ files/soap/hibye cgi.txt
#!/usr/bin/perl -w
use strict;
# -- Server
# -- SOAP::Lite -- guide.soaplite.com -- Copyright (C) 2001 Paul Kulchenko --
use SOAP::Transport::HTTP;
SOAP::Transport::HTTP::CGI
-> dispatch_to('Demo')
-> handle;
package Demo;
sub hi(%) {
my ($class, $who) = @_;
$who ||= 'SOAP';
return "Hello, \"$who\" world!";
}
sub bye {
return "Goodbye, cruel world";
}
sub languages {
return ("Perl", "C", "sh");
}
|
|
SOAP Client
Download: → /perl/ files/soap/hibye pl.txt
#!/usr/bin/perl -w
# -- Client
# -- SOAP::Lite -- guide.soaplite.com -- Copyright (C) 2001 Paul Kulchenko --
use SOAP::Lite;
print "Content-type: text/plain\n\n";
print SOAP::Lite
-> uri('http://yoursoaphost.example.org/Demo')
-> proxy('http://yoursoaphost.example.org/cgi-bin/soap/hibye.cgi')
-> hi('Reto')
-> result, "\n";
print SOAP::Lite
-> uri('http://yoursoaphost.example.org/Demo')
-> proxy('http://yoursoaphost.example.org/cgi-bin/soap/hibye.cgi')
-> bye()
-> result;
Raw XML
POST / HTTP/1.1
TE: deflate,gzip;q=0.3
Connection: TE, close
Accept: text/xml
Accept: multipart/*
Host: localhost:7890
User-Agent: SOAP::Lite/Perl/0.60
Content-Length: 504
Content-Type: text/xml; charset=utf-8
SOAPAction: "http://localhost/Demo#hi"
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/1999/XMLSchema"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<namesp1:hi xmlns:namesp1="http://localhost/Demo">
<c-gensym3 xsi:type="xsd:string">Reto</c-gensym3>
</namesp1:hi>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Autogenerate SOAP Code
perl /usr/bin/stubmaker.pl "http://e-channel.example.ch/echannel/pub/wsdl/Catalogue.wsdl"
See also:
- → SOAP with PHP: /know how/php/soap
-
Perl Know-how: eBay API
- Perl Reference
GetItem request, GeteBayOfficialTimeRequest etc.
infocopter.com/perl/ebay.html
-
SOAP::Lite




- Reference Perl
Examples and hints
infocopter.com/perl/soap/soap-lite.html
-
NoXML, Another SOAP::Lite Alternative



- Reference Perl
NoXML is a regular expressions-based, XML Parser-free drop-in alternative to SOAP::Lite
hacks.oreilly.com/pub/h/174
-
SOAP::Lite Docs: SOAP Serializer







- Reference Perl
The SOAP::Serializer class is the means by which the toolkit manages the expression of data as XML. The object that a SOAP::Lite instance uses by default is generally enough for the task, with no need for the application to create its own. The main purpose of this class is to provide a place for applications to extend the serializer by defining additional methods for handling new datatypes
majordojo.com/soaplite/docs/SOAP/Serializer.html
-
Group SOAP::Lite

- Reference Perl
Discussions about SOAP::Lite, XMLRPC::Lite and UDDI::Lite for Perl (www.soaplite.com). Easy access to information about released versions, features and on-going development
groups.yahoo.com/group/soaplite/
-
Guide: SOAP::Lite








- Reference Perl
Quick Start Guide with SOAP and SOAP::Lite
guide.soaplite.com/
-
SOAP::Lite
- Reference Perl
How to Access Nested SOAP Body Element
majordojo.com/soaplite/2004/02/how_to_access_n.html
-
Perl SOAP Error handling








- Reference
SOAP Error Handling in Perl
infocopter.com/perl/soap-error-handling.html
-
amazon.de/exec/obidos/ASIN/3898424774/... - Book
Google, Amazon, eBay - Die neuen APIs nutzen mit PHP, Perl und .NET, mit CD
amazon.de/exec/obidos/ASIN/3898424774/qid%3D1097188632/302-5348732-5771232
-
Perl.com/pub/a/2004/09/30/drop_the_soap.html - Reference
Don't Be Afraid to Drop the SOAP
perl.com/pub/a/2004/09/30/drop_the_soap.html
-
W3.org/TR/wsdl - Reference
SOAP WSDL Definition
w3.org/TR/wsdl
-
oxygenxml.com - Software Downloads
SOAP WSDL Editor with syntax checks
oxygenxml.com/
-
w3schools.com/wsdl/default.asp - Reference
WSDL
w3schools.com/wsdl/default.asp
-
wdvl.com/Authoring/.../XML/WebServices/WSDL/Essentials/... - Reference
Provides a WSDL file for the XMethods eBay Price Watcher Service. The service takes an existing eBay auction ID, and returns the value of the current bid
wdvl.com/Authoring/Languages/XML/WebServices/WSDL/Essentials/wse1_5.html