axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chinth...@apache.org
Subject svn commit: r367905 - /webservices/axis2/trunk/java/modules/samples/src/sample/google/spellcheck/FormModel.java
Date Wed, 11 Jan 2006 03:52:53 GMT
Author: chinthaka
Date: Tue Jan 10 19:52:47 2006
New Revision: 367905

URL: http://svn.apache.org/viewcvs?rev=367905&view=rev
Log:
Fixing the sample problem. Sync invocation was not working for google spell checker, coz the
chunking was on and the length was not given.

Modified:
    webservices/axis2/trunk/java/modules/samples/src/sample/google/spellcheck/FormModel.java

Modified: webservices/axis2/trunk/java/modules/samples/src/sample/google/spellcheck/FormModel.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/samples/src/sample/google/spellcheck/FormModel.java?rev=367905&r1=367904&r2=367905&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/src/sample/google/spellcheck/FormModel.java
(original)
+++ webservices/axis2/trunk/java/modules/samples/src/sample/google/spellcheck/FormModel.java
Tue Jan 10 19:52:47 2006
@@ -2,12 +2,12 @@
 
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.Constants;
-import org.apache.axis2.context.MessageContextConstants;
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.client.Options;
 import org.apache.axis2.client.ServiceClient;
 import org.apache.axis2.client.async.AsyncResult;
 import org.apache.axis2.client.async.Callback;
+import org.apache.axis2.context.MessageContextConstants;
 import org.apache.axis2.om.OMAbstractFactory;
 import org.apache.axis2.om.OMElement;
 import org.apache.axis2.om.OMNamespace;
@@ -106,6 +106,8 @@
         Options options = new Options();
 
         options.setTo(new EndpointReference(url.toString()));
+        options.setProperty(MessageContextConstants.CHUNKED, Constants.VALUE_FALSE);
+
         try {
 
             ServiceClient sender = new ServiceClient();
@@ -116,7 +118,10 @@
             observer.updateError(axisFault.getMessage());
         }
 
-
+        if (responseElement == null) {
+            this.observer.update("No suggestions found for " + word);
+            return;
+        }
         this.getResponseFromElement(responseElement);
     }
 



Mime
View raw message