How to use OCRwebservice in android
<p>I'm a new android developer and want to use OCRWebService. </p>

<p>According to.. [How to use OCR web service in android application. How can we send request and get response?][1]</p>

<p>But it has an error like that...</p>

<blockquote>
  <p>03-16 12:26:02.159: INFO/System.out(2278): Response: anyType{ocrText=anyType{}; errorMessage=Invalid user name; ocrWSWords=anyType{}; } </p>
</blockquote>

<p>I don't know why my username invalid. I have already try it in C#, php sample code of OCRWebService and it work! So, I'm sure that my username is correct.</p>

<p>Could you see my code and help me please..</p>

<p>I use ksoap2-android-assembly-2.4-jar-with-dependencies.jar</p>

<pre><code>private String NAMESPACE = "http://stockservice.contoso.com/wse/samples/2005/10/";
private String METHOD_NAME ="OCRWebServiceRecognize";
private String SOAP_ACTION = NAMESPACE+METHOD_NAME;
private String URL = "http://www.ocrwebservice.com/services/OCRWebService.asmx";

SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME); 

request.addProperty("user_name", "userName");
request.addProperty("license_code","licenseCode");

PropertyInfo pi = new PropertyInfo();

pi = new PropertyInfo();
pi.setName("OCRWSInputImage");
pi.setValue(new SoapObject(NAMESPACE, "OCRWSInputImage")
.addProperty("fileName", fileName)
.addProperty("fileData", datapdf)
);

request.addProperty(pi);

pi.setName("OCRWSSetting");
pi.setValue(new SoapObject(NAMESPACE, "OCRWSSettings")
.addProperty("ocrLanguages", "ENGLISH")
.addProperty("outputDocumentFormat", "TXT")
.addProperty("convertToBW", false)
.addProperty("getOCRText", true)
.addProperty("createOutputDocument", false)
.addProperty("multiPageDoc", false)
.addProperty("ocrWords", false));

request.addProperty(pi);


SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11); 
envelope.setOutputSoapObject(request); 

AndroidHttpTransport androidHttpTransport = new AndroidHttpTransport(URL);
androidHttpTransport.call(SOAP_ACTION, envelope);

SoapObject result = (SoapObject) envelope.getResponse();
System.out.println("Response: "+result);
</code></pre>
