Dynamically typed languages should (hopefully) just 'do the right thing'
Here's a Perl client of a JWS that expects and returns float values
#!/usr/bin/perl

use SOAP::Lite;

my $soap = SOAP::Lite
  -> proxy('http://localhost:8082/axis/DoubleServer.jws')
  -> uri('urn:DoubleServer')
  -> twiceOf('9')
  -> result;

print "$soap\n";
Perl sends an int, Java promotes it to a float and returns a float (which Perl does the right thing with anyway); everyone's happy!

Strings are pretty straight forward. There may be times when the implementing language needs to be coerced into describing the correct types of the data elements. That may require writing your own serializers/deserializers, manipulating how the service is deployed or both. Run slide_38.pl and examine the tcpmon screen.

Slide 35 of 58 Contents
  1 |   2 |   3 |   4 |   5 |   6 |   7 |   8 |   9 | 10
11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20
21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30
31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40
41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50
51 | 52 | 53 | 54 | 55 | 56 | 57 | 58
www.arachna.com > Educational Resources > Tutorials > O'Reilly Open Source Conference (2002) > Exchanging Objects and Messages With SOAP

spidaman
© 2002-2009 Ian Kallen | Copyright Notice