0

Possible Duplicate:
Ways to circumvent the same-origin policy

I have an application (running on domain A) which needs to send a soap request (or web service) to another domain (domain B).

I need a solution that does not ask permeation from B (its not mine and I can't control it).

Community
  • 1
  • 1
boaz shor
  • 299
  • 1
  • 3
  • 16

2 Answers2

0

You can create a web service on your own domain that calls the service from domain B server side. Essentially your service would just be a proxy.

Fisch
  • 3,775
  • 1
  • 27
  • 38
0

It depends entirely on what domain B offers. If you don't control domain B and we don't know what domain B is, then we can't help you with specifics. However, generally, domain B would have to provide data fitting one of these requirements:

  • A JSON-P service
  • The ability to be read by YQL

JSON-P is easy — either website B provides it or it doesn't. Chances are it doesn't, since you're asking here.

YQL is a bit more convoluted. You need to authenticate with the YQL service itself, but then you make a database-like query to them, their servers scrape domain B, and then return the results to you in XML or JSON format. This will be a bit of work on your part (and may not be possible, depending on how domain B is structured) — this article does a good job of explaining the principles.

Barney
  • 16,181
  • 5
  • 62
  • 76
  • JSON-P does not support POST requests. YQL requires me to add code on Domain B. I don't have an option to add scripts on that domain and it is behind the clients firewall. – boaz shor Dec 13 '12 at 12:37
  • I read 'request' and assumed you'd be `GET`ting your information from B. You'll have to be more specific with your question if we're to work out if this is anything more than a generic CORS question. – Barney Dec 13 '12 at 14:30
  • I have an application (running on domain A) which needs to send a soap Post request to a web service to another domain (domain B). the ws receives only POST request with xml input. I need a solution that does not ask permeation from B (its not mine and I can't control it). – boaz shor Dec 19 '12 at 07:35
  • Maybe I still don't understand what you're asking, but either domain B accepts and responds to POSTs from domain A or it doesn't. Without more esoteric information on the web service itself, I don't know how else we can help you. – Barney Dec 19 '12 at 10:55