SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member
    Join Date
    Mar 2007
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Any idea where to find?

    Hi all,
    I would like to create a web page with plain client-side only JavaScript code that accesses web service from different domain.
    I've been googling these days and found some learning materials. But those are mainly focused on using web service within same domain which is no use for me. I need to access external web services on external servers, and I want to do it all from client-side JavaScript. I would appreciate if anyone can recommend me some useful web resources.

    thanx

  2. #2
    SitePoint Enthusiast timjpriebe's Avatar
    Join Date
    Aug 2005
    Posts
    78
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's primarily dependent on whether the web service on the other domain has an API that allows access specifically by JavaScript.

    Or, if that's Greek to you...

    The web service you're wanting to access with JavaScript has to be explicitly set up for JavaScript access.

    If I'm wrong, someone let me know.

  3. #3
    SitePoint Member
    Join Date
    Mar 2007
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I haven't come across any article saying web service is written to be accessed by specific language. As far as I know, The reason why WSDL use XML is to make language independant. For security reason, browsers don't allowed to access ws from different domain. The only way to accomplish this, is to use digitally signed js or proxy technique.And I still can't find any learning material for that.

  4. #4
    SitePoint Wizard silver trophy kyberfabrikken's Avatar
    Join Date
    Jun 2004
    Location
    Copenhagen, Denmark
    Posts
    6,157
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Most (~all) browsers restrict javascript from opening requests to other domains than the one it was served from. You can use a serverside script as a proxy, to overcome this limitation.

  5. #5
    SitePoint Member
    Join Date
    Mar 2007
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by kyberfabrikken View Post
    Most (~all) browsers restrict javascript from opening requests to other domains than the one it was served from. You can use a serverside script as a proxy, to overcome this limitation.
    According to article I've read, it is possible for (all) browsers. But i need to use signed js technique or proxy technique. But it doesn't mention how to construct.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •