Have to dispute some things...

SOAP is an RPC-esq way of doing message passing in a language agnostic way.

...except when it isn't, such as when document/literal encoded - reasonable description here.

The intention, I believe, is to cover all bases.

There in lies the whole problem - design by committee. Many of the use cases were fantasy - something vendors where / are hoping to sell in the SOA orgy. That's compared to REST, which was an abstraction principles and experiences gained with HTTP and what went before it - specifically REST isn't trying to be a one size fits all - Roy Fielding explicitly describes the things it's bad at.

Wrong. It's a format protcol, so to speak. It's a method of formatting a messgae call, or a function call which is a fancier message call.

So what's the addressing scheme for? And how did we get to HTTP over SOAP?. Also document / literal style services aren't about calling remote APIs - what you describe is only a subset of SOAP - Encoded / RPC over HTTP.

SOAP is simple for those who know SOAP. People who know SOAP know what NOT to do, and what TO do to make working easy. People, including myself, have the tools to takea WSDL (Soap descriptor) file and turn it into a stub in minutes, w/ far less reading to do and less code to write. It's the ability for a person to go from one SOAP shoppe to another, or for one SOAP user to use many shoppes at once, w/o relearning SOAP, is its power.

I know where you're coming from but in the end that's the illusion of SOAP - it feels good when everything "just works" like this. But the moment it doesn't, you got a huge stack of code to debug + verbose wire formats (can you do XSD by hand?). And with networks involved, there are a lot of things that can go wrong. And have mercy the moment you need to scale to anything but low volume Intranet / Extranet interfaces...

All I can do is express the opposite point of view with the following code;

#!/usr/bin/perl -w use strict; use Carp; use LWP::Debug qw(+ -conns); use LWP::UserAgent; use XML::Simple; use Data::Dumper; my $ua = LWP::UserAgent->new; my $res = $ua->get('http://perlmonks.org/?displaytype=xml;node_id=3333 +'); if (!$res->is_success) { croak("Failed!\n".$res->as_string); } print Dumper XMLin($res->content);

It's got error handling, a trace of the "raw" HTTP conversation and it gives you an instant data structure to examine. It's relatively easy to extend this to support conditional GETs and you're already on your way to preserving bandwidth / scaling.

We can argue the ins and outs of this ad infinitum but from my perspective, simple always wins.


In reply to Re^3: start over with SOAP in Perl? by harryf
in thread start over with SOAP in Perl? by McMahon

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.