简体   繁体   中英

Perl web services without using XML or SOAP?

The software I'm working on uses SOAP::Lite and XML::Parser to communicate with a web service. We are looking into support older machines, but currently cannot because SOAP::Lite requires that OpenSSL be installed and uses XML::Parser which requires that "expat" be installed.

These older machines (Solaris 9) do not have 'expat' in the base install and our users are hesitant about modifying these machines for any reason.

Is there an easy to use non-SSL/non-expat solution for web service communication? Perhaps using LWP::UserAgent and some non-XML data packets?

If you are looking for a very simple Perl LWP::UserAgent based SOAP client to communicate to a server then this page may be of interest...

http://users.skynet.be/pascalbotte/rcx-ws-doc/perlpost.htm

Personally, I don't really like the idea of having to encode and decode the SOAP data packets myself, but for simple transactions it may meet your requirements.

I think my best bet is to use LWP::UserAgent and communicate via JSON. Thanks for the help "brainstorming" in the comments.

May not be your cup of tea, but check out RPC::ExtDirect and RPC::ExtDirect::Client . Cheap, ready to use RPC interface that just works; the server side should be compatible with perls down to 5.6.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM