use strict; use warnings; use SOAP::WSDL; use Data::Dumper; # config vars my $tocheck = "you want a test?\nthars ees my boody text"; my $license = '12345yourlicensekey'; my $service = 'http://ws.cdyne.com/SpellChecker/check.asmx'; my $wsdl = "$service?WSDL"; # initialise the SOAP proxy object my $soap = SOAP::WSDL->new(); $soap->wsdl($wsdl); # $soap->on_action(sub { return $_[0].$_[1]; }); # uncomment if you get a soapfault containing something like 'invalid SOAPAction'. $soap->proxy($service); $soap->wsdlinit(caching => 1) || die "couldn't connect to soap service!"; # call the CheckTextBody method exposed by the web-service my $som = $soap->CheckTextBody( BodyText => $tocheck, LicenseKey => $license); # examine the result returned by the web-service if ($som->fault) { print "REQUEST FAILED!\n\n"; print "Soap Fault ==> ".$som->faultstring."\n"; } else { print "REQUEST SUCCESSFUL!\n\n"; print Dumper($som->paramsall); }