• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

Sending HTTP Request in GWT

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello guys,
I'm new to GWT. I am trying to integrate Box.net in my GWT application but I am not able to send http request to Box.net. Please can any one tell me how do you send an http request and get a http response in GWT.

Regards
 
Bartender
Posts: 11445
18
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
 
Jinal P Shah
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply. I tried that but it gives me an error Access-Control-Allow-Origin. So how do I resolve it?

Regards
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The link I posted has information on the Same Origin Policy restrictions and possible workarounds. Did you refer to that?
 
Jinal P Shah
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, I saw the link and I did accordingly. I did sent the HttpRequest but now the problem is it does not get a response and I have no idea why is it so.
I can show you the code if you want and here is the link for my test
https://techchoice-2.appspot.com/
The Box-net Button is the one I am trying to implement.
See if you could help me for this.

Regards
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

is it does not get a response and I have no idea why is it so.


What is the response status code which you get back?
 
Jinal P Shah
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I get the response code of 200 but I get an empty response. I have no idea why is it so?
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
200 indicates a successful call.
How are you checking the response?
What kind of response are you expecting from the server?
 
Jinal P Shah
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

200 indicates a successful call.


yaah 200 does indicate a successful execution but I still get an empty response.

How are you checking the response?
What kind of response are you expecting from the server?


I am using FireBug to check the response and I am expecting an XML response.

I am calling a rest service of Box.net and I am expecting an XML response from the api. But I am not getting it.

 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please post the code where you build the request, make the call and process the response.
 
Jinal P Shah
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is the code
 
Attractive, successful people love this tiny ad:
create, convert, edit or print DOC and DOCX in Java
https://products.aspose.com/words/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!