Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

Re: Help with using XML SpellChecker Service

by erroneousBollock (Curate)
on Nov 19, 2007 at 06:22 UTC ( #651602=note: print w/replies, xml ) Need Help??

in reply to Help with using XML SpellChecker Service

The web-service exposes a SOAP interface, including a WSDL description of the service at:

To talk to the service, use SOAP::WSDL.

Something like the following should work (modify as appropriate with license key and real content to be checked):

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 = ''; 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 ge +t 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); }
It just dumps the returned data-structure, so you'll need to have a look at what it contains to figure out what to do next.

The WSDL formally describes what will be returned in the definition of the DocumentSummary complexType.


Replies are listed 'Best First'.
Re^2: Help with using XML SpellChecker Service
by Anonymous Monk on Nov 20, 2007 at 01:07 UTC
    Thank you David.
    The hardest part to this is getting the SOAP::WSDL installed properly. After that, everything works like a charm.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://651602]
[stevieb]: can anyone recommend a good IDE for C programming that has *proper* vim plugin support? I've tried Eclipse, Netbeans etc and just can't get anything to work properly on Linux. I'm open to paying, but not on some monthly/yearly plan (just a one-off cost)
[stevieb]: I'd go with CLion as it's very similar to what I use already (intelliJ for Perl, Pycharm for Python), but it's a recurring fee every year

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (7)
As of 2017-01-18 19:12 GMT
Find Nodes?
    Voting Booth?
    Do you watch meteor showers?

    Results (163 votes). Check out past polls.