Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I have created a simple HTML interface for the user to enter the text for spell check but am not sure how to proceed on connecting to this web site and sending the text over and retrieving the XML response back. What kind of module to I need to include in my Perl script? use xml::simple? Please help. Some simple script to help me started would be appreciated.SOAP 1.2 The following is a sample SOAP 1.2 request and response. The placehold +ers shown need to be replaced with actual values. POST /spellchecker/check.asmx HTTP/1.1 Host: ws.cdyne.com Content-Type: application/soap+xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://ww +w.w3.org/2003/05/soap-envelope"> <soap12:Body> <CheckTextBody xmlns="http://ws.cdyne.com/"> <BodyText>string</BodyText> <LicenseKey>string</LicenseKey> </CheckTextBody> </soap12:Body> </soap12:Envelope> HTTP/1.1 200 OK Content-Type: application/soap+xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://ww +w.w3.org/2003/05/soap-envelope"> <soap12:Body> <CheckTextBodyResponse xmlns="http://ws.cdyne.com/"> <DocumentSummary> <MisspelledWord> <Suggestions>string</Suggestions> <Suggestions>string</Suggestions> <word>string</word> <SuggestionCount>int</SuggestionCount> </MisspelledWord> <MisspelledWord> <Suggestions>string</Suggestions> <Suggestions>string</Suggestions> <word>string</word> <SuggestionCount>int</SuggestionCount> </MisspelledWord> <ver>string</ver> <body>string</body> <MisspelledWordCount>int</MisspelledWordCount> </DocumentSummary> </CheckTextBodyResponse> </soap12:Body> </soap12:Envelope>
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> <html> <head> <title>OS2 - Lab3 Project</title> </head> <body> <center><b><font size="+3">Online Spellchecker via SOAP and XML</b></c +enter> <br> <br> <p> <form method="post" action="cgi-bin/check.cgi"> <b>Enter text:</b><textarea cols="45" rows="5" name="text"></textarea> <br> <pre> <input type="submit" name="submit" value="Submit"></ +pre> <br> <b>Correction:</b><textarea cols="45" rows="5" name="response"></texta +rea> <p> <p> <br> </form> </body> </html>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Help with using XML SpellChecker Service
by erroneousBollock (Curate) on Nov 19, 2007 at 06:22 UTC | |
by Anonymous Monk on Nov 20, 2007 at 01:07 UTC |