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" ) 
  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"

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

accept rate: 0%

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



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:


question asked: 29 Sep '16, 10:26

question was seen: 246 times

last updated: 29 Sep '16, 14:13