Hi everyone,

here is my question : I defined a webservice using SQL Anywhere embed webservices utility.

There it is :

create service srv_select_client type 'JSON' authorization off secure off methods 'GET' user gp as call psrv_client(:a_client);

and here is the procedure called :

ALTER PROCEDURE "gp"."psrv_client"( in "a_client" "T_CODE_CLIENT" ) 
result( "o_raison_sociale" "T_RAISON_SOCIALE","o_telephone" "T_TELEPHONE","o_email" "T_E_MAIL" ) 
begin
  CALL dbo.sa_set_http_header( 'Access-Control-Allow-Origin', 'http://nw377814.ip-5-51-68.eu/' );
  select "RAISON_SOCIALE","TELEPHONE","E_MAIL" from "CLIENTS" where "CODE_CLIENT" = "a_client"
end

I need to call this service from another domain (that's a simple try) on my dedicated server. Everything seems to be okay (the header should allow me to make my ajax call from the server).

But it looks like it doesn't allow cross domain requests. I need to treat it as a JSONP request to get the request to work (I get the json I need) but SQL Anywhere doesn't work with JSONP and it's callback function behavior, so data are unreachable.

Does someone knows how to allow cross domain request ?

Thanks all for your answers !

asked 29 Sep '16, 10:26

gmourer's gravatar image

gmourer
26112
accept rate: 0%

How to solve the problem of access control allow origin? I'm also bothered by this problem

(10 Jan '20, 00:25) mfkpie8
Replies hidden
1

Check the comment from above.

(10 Jan '20, 00:36) Vlad
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×64
×40
×31

question asked: 29 Sep '16, 10:26

question was seen: 2,589 times

last updated: 10 Jan '20, 00:36