SOAP gateway fixed.

"Adam Rifkin" <[email protected]>
Newsgroups gmane.comp.web.mod-pubsub.devel
Message-ID <[email protected]>
Last night we checked in some changes to

   mod_pubsub/cgi-bin/soap_gateway/

so do a "cvs update" if you want to stay up-to-date with
these things.  In particular, we fixed

   mod_pubsub/cgi-bin/soap_gateway/PubSubService.cgi

so it works as an invocable cgi script, and updated

   mod_pubsub/cgi-bin/soap_gateway/soapdesign.html

to include the recent changes.  We ran the following
examples and they all worked.

   Adam



Examples using Perl and SOAP::Lite

The following samples assume your PubSub Server is running on the same machine on port 80, waiting for requests on the /kn URL (i.e. http://127.0.0.1/.) If your server is at some other URL, replace http://127.0.0.1/ with the correct URL for your server:


A Perl RPC stub generated using stubmaker.pl from the SOAP::Lite distro; the resulting perl module PubSubService.pm will be used in the following example: 

stubmaker.pl "http://127.0.0.1/cgi-bin/soap_gateway/PubSubService.cgi?kn_request_format=wsdl;do_method=wsdl"


A Perl publisher using the RPC stub module generated in the previous example: 

perl -MPubSubService -e '
        print ((PubSubService::publish("/what/chat",["hello"]))[1]->{"status"}."\n")'


A Perl & SOAP::Lite sample client demonstrating nested requests: 

perl -MSOAP::Lite -e '
        print (SOAP::Lite
                ->service("http://127.0.0.1/cgi-bin/soap_gateway/PubSubService.cgi?kn_request_format=wsdl;do_method=wsdl")
                ->pubsubrequest([
                        do_method=>batch,
                        kn_batch=>{do_method=>notify, kn_to=>"/what/chat", kn_payload=>"Hello"},
                        kn_batch=>{do_method=>batch,
                                kn_batch=>{do_method=>notify,kn_to=>"/what/chat",kn_payload=>hi}
                        }])->{status}."\n")
        '


-------------------------------------------------------
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.