OCRWebService
Click here for a complete list of operations.
OCRWebServiceRecognize
Test
The test form is only available for requests from the local machine.SOAP 1.1
The following is a sample SOAP 1.1 request and response. The placeholders shown need to be replaced with actual values.
POST /services/OCRWebService.asmx HTTP/1.1 Host: www.ocrwebservice.com Content-Type: text/xml; charset=utf-8 Content-Length: length SOAPAction: "http://stockservice.contoso.com/wse/samples/2005/10/OCRWebServiceRecognize" <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <OCRWebServiceRecognize xmlns="http://stockservice.contoso.com/wse/samples/2005/10"> <user_name>string</user_name> <license_code>string</license_code> <OCRWSInputImage> <fileName>string</fileName> <fileData>base64Binary</fileData> </OCRWSInputImage> <OCRWSSetting> <ocrLanguages>BRAZILIAN or BYELORUSSIAN or BULGARIAN or CATALAN or CROATIAN or CZECH or DANISH or DUTCH or ENGLISH or ESTONIAN or FINNISH or FRENCH or GERMAN or GREEK or HUNGARIAN or INDONESIAN or ITALIAN or LATIN or LATVIAN or LITHUANIAN or MOLDAVIAN or POLISH or PORTUGUESE or ROMANIAN or RUSSIAN or SERBIAN or SLOVAKIAN or SLOVENIAN or SPANISH or SWEDISH or TURKISH or UKRAINIAN or JAPANESE or CHINESESIMPLIFIED or CHINESETRADITIONAL or KOREAN or AFRIKAANS or ALBANIAN or BASQUE or ESPERANTO or GALICIAN or ICELANDIC or MACEDONIAN or MALAY or NORWEGIAN or TAGALOG</ocrLanguages> <ocrLanguages>BRAZILIAN or BYELORUSSIAN or BULGARIAN or CATALAN or CROATIAN or CZECH or DANISH or DUTCH or ENGLISH or ESTONIAN or FINNISH or FRENCH or GERMAN or GREEK or HUNGARIAN or INDONESIAN or ITALIAN or LATIN or LATVIAN or LITHUANIAN or MOLDAVIAN or POLISH or PORTUGUESE or ROMANIAN or RUSSIAN or SERBIAN or SLOVAKIAN or SLOVENIAN or SPANISH or SWEDISH or TURKISH or UKRAINIAN or JAPANESE or CHINESESIMPLIFIED or CHINESETRADITIONAL or KOREAN or AFRIKAANS or ALBANIAN or BASQUE or ESPERANTO or GALICIAN or ICELANDIC or MACEDONIAN or MALAY or NORWEGIAN or TAGALOG</ocrLanguages> <outputDocumentFormat>DOC or PDF or EXCEL or HTML or TXT or RTF or PDFIMGTEXT or DOCX or XLSX</outputDocumentFormat> <convertToBW>boolean</convertToBW> <getOCRText>boolean</getOCRText> <createOutputDocument>boolean</createOutputDocument> <multiPageDoc>boolean</multiPageDoc> <pageNumbers>string</pageNumbers> <ocrZones> <OCRWSZone> <Top>int</Top> <Left>int</Left> <Height>int</Height> <Width>int</Width> <ZoneType>int</ZoneType> </OCRWSZone> <OCRWSZone> <Top>int</Top> <Left>int</Left> <Height>int</Height> <Width>int</Width> <ZoneType>int</ZoneType> </OCRWSZone> </ocrZones> <ocrWords>boolean</ocrWords> <Reserved>string</Reserved> </OCRWSSetting> </OCRWebServiceRecognize> </soap:Body> </soap:Envelope>
HTTP/1.1 200 OK Content-Type: text/xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <OCRWebServiceRecognizeResponse xmlns="http://stockservice.contoso.com/wse/samples/2005/10"> <OCRWSResponse> <ocrText> <ArrayOfString> <string>string</string> <string>string</string> </ArrayOfString> <ArrayOfString> <string>string</string> <string>string</string> </ArrayOfString> </ocrText> <fileName>string</fileName> <fileData>base64Binary</fileData> <errorMessage>string</errorMessage> <ocrWSWords> <ArrayOfOCRWSWord> <OCRWSWord xsi:nil="true" /> <OCRWSWord xsi:nil="true" /> </ArrayOfOCRWSWord> <ArrayOfOCRWSWord> <OCRWSWord xsi:nil="true" /> <OCRWSWord xsi:nil="true" /> </ArrayOfOCRWSWord> </ocrWSWords> <availablePages>int</availablePages> <processedPages>int</processedPages> <outputInformation>string</outputInformation> </OCRWSResponse> </OCRWebServiceRecognizeResponse> </soap:Body> </soap:Envelope>
SOAP 1.2
The following is a sample SOAP 1.2 request and response. The placeholders shown need to be replaced with actual values.
POST /services/OCRWebService.asmx HTTP/1.1 Host: www.ocrwebservice.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://www.w3.org/2003/05/soap-envelope"> <soap12:Body> <OCRWebServiceRecognize xmlns="http://stockservice.contoso.com/wse/samples/2005/10"> <user_name>string</user_name> <license_code>string</license_code> <OCRWSInputImage> <fileName>string</fileName> <fileData>base64Binary</fileData> </OCRWSInputImage> <OCRWSSetting> <ocrLanguages>BRAZILIAN or BYELORUSSIAN or BULGARIAN or CATALAN or CROATIAN or CZECH or DANISH or DUTCH or ENGLISH or ESTONIAN or FINNISH or FRENCH or GERMAN or GREEK or HUNGARIAN or INDONESIAN or ITALIAN or LATIN or LATVIAN or LITHUANIAN or MOLDAVIAN or POLISH or PORTUGUESE or ROMANIAN or RUSSIAN or SERBIAN or SLOVAKIAN or SLOVENIAN or SPANISH or SWEDISH or TURKISH or UKRAINIAN or JAPANESE or CHINESESIMPLIFIED or CHINESETRADITIONAL or KOREAN or AFRIKAANS or ALBANIAN or BASQUE or ESPERANTO or GALICIAN or ICELANDIC or MACEDONIAN or MALAY or NORWEGIAN or TAGALOG</ocrLanguages> <ocrLanguages>BRAZILIAN or BYELORUSSIAN or BULGARIAN or CATALAN or CROATIAN or CZECH or DANISH or DUTCH or ENGLISH or ESTONIAN or FINNISH or FRENCH or GERMAN or GREEK or HUNGARIAN or INDONESIAN or ITALIAN or LATIN or LATVIAN or LITHUANIAN or MOLDAVIAN or POLISH or PORTUGUESE or ROMANIAN or RUSSIAN or SERBIAN or SLOVAKIAN or SLOVENIAN or SPANISH or SWEDISH or TURKISH or UKRAINIAN or JAPANESE or CHINESESIMPLIFIED or CHINESETRADITIONAL or KOREAN or AFRIKAANS or ALBANIAN or BASQUE or ESPERANTO or GALICIAN or ICELANDIC or MACEDONIAN or MALAY or NORWEGIAN or TAGALOG</ocrLanguages> <outputDocumentFormat>DOC or PDF or EXCEL or HTML or TXT or RTF or PDFIMGTEXT or DOCX or XLSX</outputDocumentFormat> <convertToBW>boolean</convertToBW> <getOCRText>boolean</getOCRText> <createOutputDocument>boolean</createOutputDocument> <multiPageDoc>boolean</multiPageDoc> <pageNumbers>string</pageNumbers> <ocrZones> <OCRWSZone> <Top>int</Top> <Left>int</Left> <Height>int</Height> <Width>int</Width> <ZoneType>int</ZoneType> </OCRWSZone> <OCRWSZone> <Top>int</Top> <Left>int</Left> <Height>int</Height> <Width>int</Width> <ZoneType>int</ZoneType> </OCRWSZone> </ocrZones> <ocrWords>boolean</ocrWords> <Reserved>string</Reserved> </OCRWSSetting> </OCRWebServiceRecognize> </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://www.w3.org/2003/05/soap-envelope"> <soap12:Body> <OCRWebServiceRecognizeResponse xmlns="http://stockservice.contoso.com/wse/samples/2005/10"> <OCRWSResponse> <ocrText> <ArrayOfString> <string>string</string> <string>string</string> </ArrayOfString> <ArrayOfString> <string>string</string> <string>string</string> </ArrayOfString> </ocrText> <fileName>string</fileName> <fileData>base64Binary</fileData> <errorMessage>string</errorMessage> <ocrWSWords> <ArrayOfOCRWSWord> <OCRWSWord xsi:nil="true" /> <OCRWSWord xsi:nil="true" /> </ArrayOfOCRWSWord> <ArrayOfOCRWSWord> <OCRWSWord xsi:nil="true" /> <OCRWSWord xsi:nil="true" /> </ArrayOfOCRWSWord> </ocrWSWords> <availablePages>int</availablePages> <processedPages>int</processedPages> <outputInformation>string</outputInformation> </OCRWSResponse> </OCRWebServiceRecognizeResponse> </soap12:Body> </soap12:Envelope>