Q:

Can't access web service exposed by application deployed in vert.x from gwt application

I have a REST web service exposed by application deployed in vert.x and I'm trying to access it from a GWT application. Some response is obtained, but with an empty body.
It gives the expected response when I access the service using http4e. 
Is there any required configuration other than normal web service access code in GWT? Below given is the code for web service access:
final RequestBuilder requestBuilder = new RequestBuilder(
                RequestBuilder.POST, "https://localhost:80/login");
requestBuilder.setHeader("Content-Type", "text/plain");
requestBuilder.sendRequest("{\"userId\":\"" + username
                    + "\",\"password\":\""
                    + password + "\"}",
                    new RequestCallback() {

                        @Override
                        public void onResponseReceived(Request request,
                                    Response response) {
                                System.out.println("response:"
                                        + response.getText());
                            }

                            @Override
                            public void onError(Request request,
                                    Throwable exception) {
                                System.out.println("ex:"
                                        + exception.getMessage());
                            }
                        });

EDIT: I think there is some issue in the client side request. When the sendRequest function is called, onResponseReceived in the RequestCallback implementation gets invoked, with empty response. The POST request status is reported as Aborted when I analyzed using Firebug.

A:

Despite the fact that you turn to localhost, this is CORS (Cross-Origin Resource Sharing). According to the specification different ports mean different origins. Modern browsers forbid cross-domain XMLHTTPRequest by default. You should add Access-Control-Allow-Origin header to server's respones. Read the Syntax section of the CORS specification for further information.   

