<?xml version='1.0' encoding='utf-8'?>
<?xml-stylesheet href="/style/browser.xsl" type="text/xsl"?>
<essay xmlns="http://docbook.org/ns/docbook"
       xmlns:xlink="http://www.w3.org/1999/xlink"
       xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'
       xmlns:dc='http://purl.org/dc/elements/1.1/'
       xmlns:dcterms="http://purl.org/dc/terms/"
       xmlns:gal='http://norman.walsh.name/rdf/gallery#'
       xml:lang="en"
       version='pto'>
<info>
<title>WITW: WSDL: 1, Norm: 0</title>
<volumenum>8</volumenum>
<issuenum>33</issuenum>
<pubdate>2005-02-24T18:23:15-05:00</pubdate>
<date>$Date: 2006-07-14 10:06:19 -0400 (Fri, 14 Jul 2006) $</date>
<author><personname>
<firstname>Norman</firstname><surname>Walsh</surname>
</personname></author>
<copyright><year>2005</year><holder>Norman Walsh</holder></copyright>
<abstract>
<para>The complexity of WSDL has exceeded my level of interest
in deciphering the complexity of WSDL.</para>
</abstract>
</info>

<para xml:id='p1'>I tried to wrestle my way through the arcana of
<link xlink:href="http://en.wikipedia.org/wiki/WSDL">WSDL</link>, but
I'm giving up. I don't doubt that it can be done, but I don't care
<emphasis>enough</emphasis> to work my way through it.</para>

<para xml:id='p2'>I <emphasis>think</emphasis>
<link xlink:href="examples/witw.wsdl">this WSDL file</link> describes
the
<link xlink:href="soaprpc-2#name"><methodname>name</methodname></link>
method. At least, the <code>SOAP::Lite</code> module
<link xlink:href="examples/witw.wsdl.pl">swallows it</link>:</para>

<programlisting><textobject>
<textdata fileref="examples/witw.wsdl.pl"/>
</textobject></programlisting>

<para xml:id='p3'>If it works in some tool that you have, I'd been keen to hear it.
Likewise, if it doesn't work and you know how to fix it, I'd like to
hear that too.</para>

<para xml:id='p4'>I tried to extend the file to support all of the methods provided
by <link xlink:href="soaprpc-2">my SOAP server</link>, but I gave up.
I bungled it, or the tools I tried are buggy, or both. Sometimes I got
incomprehensible error messages, sometimes I got
incomprehensible results, and sometimes the
code just went off into an infinite loop.</para>

<para xml:id='p5'>That said, I do think some sort of web services description language
is necessary. While XML geeks may be happy building fancy URIs and 
parsing XML result documents to get work done, I'm afraid your average
programmer isn't going to go for that.</para>

<para xml:id='p6'>The WITW project uses a function to calculate the distance
between two points on the earth. I use that function by declaring it
and calling it:</para>

<programlisting>use Math::Trig qw(great_circle_distance);
…
$dist = great_circle_distance($lat, $long, $llat, $llong, $radius);</programlisting>

<para xml:id='p7'>Now suppose the implementation of
<function>great_circle_distance</function> was a web service. It could
be a straight-forward REST web service or it could be some sort of RPC
or it could be something else. As a programmer writing WITW,
<emphasis>I don't care</emphasis>! What has to happen is, I declare the
function and then I use it. A little boilerplate is OK, but making
me understand URIs or GET or POST or XML isn't.</para>

<para xml:id='p8'>I think something <emphasis>dramatically</emphasis> simpler than
WSDL could get the job done most of the time. We know the hard things
are possible, we just have to make the easy things easy.</para>

</essay>
