• 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 ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • Tim Cooke
  • Knute Snortum
  • Junilu Lacar
  • Devaka Cooray
Saloon Keepers:
  • Ganesh Patekar
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
  • Ron McLeod
  • Frits Walraven
  • Pete Letkeman

Making Glassfish respond to OPTIONS HTTP-method call  RSS feed

Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I'm trying to develop an HTML-page with Javascript/JQuery code that interacts with a SOAP web service running on Glassfish.

I'm trying to do the web service call as a POST HTTP-method request using AJAX. The problem is that the web service is running on a different server than where the page is served from, which, because of the cross-domain policy, results in my browser (Firefox) first doing an OPTIONS HTTP request to determine if the web service will allow the POST request. The web service running on Glassfish won't respond to this OPTIONS request.

I've seen that this can be configured in other application servers, by setting Access-Control-Allow-Origin to a pattern that recognizes all origins that should be accepted (for instance '*' to accept any request).
How do I make Glassfish respond to the OPTIONS request?
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!