"Proxy" is the SOAP Endpoint
"URI" is the namespace identifier for the Interface / Object
"pingHost" is the method itself.
"www.yahoo.com" is the string argument for the pingHost method.
When this line is executed, the library encodes the method parameters by autodetecting type and assigning a system-generated name to this parameter (for basic types like "string" or "integer" , most server implementations ignore the input parameter names and just focus on the values, using parameter order as a way to map to service method arguments). If you want more control over the encoding process, you can use the following:
pingHost ( SOAP::Data->name("Hostname")->value("www.yahoo.com")->type("string") );
Once the response object is created, you can check to see if a fault was returned:
die "Fault: ".$response->faultcode." ".$response->faultdetail." ".$response->faultstring if $response->faultcode;
Otherwise, the result is stored in $response->result:
In the case of this example, because the PING service responds with a string, the returned value is a string.
If the response had been an array, the returned value would have been an array reference.
If the response had been a structure, the returned value would have been a hash reference.
As you can see, writing SOAP::Lite clients is very easy!