FileDocCategorySizeDatePackage
ResponseServiceImpl.javaAPI DocExample831Thu Aug 10 13:29:36 BST 2006com.oreilly.ajax.server

ResponseServiceImpl

public class ResponseServiceImpl extends com.google.gwt.user.server.rpc.RemoteServiceServlet implements com.oreilly.ajax.client.ResponseService

Fields Summary
Constructors Summary
Methods Summary
public java.lang.StringdisplayResponse(java.lang.String req)

        if(req.length() < 1) {
            throw new IllegalArgumentException(
                    "Blank submissions from the client are invalid.");
        }
        Zipcode zipcode = ZipcodeManager.getZipcode(req);
        String state = zipcode.getState();
        String city = zipcode.getCity();
        if((state==null || state.length()<1) || (city==null || city.length()<1))
          return null;
        String jsonString = "{\"state\":\""+state+"\", \"city\":\""+city+"\"}"; 
        return jsonString;