webservices

前端之家收集整理的这篇文章主要介绍了webservices前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
CREATE WEB SERVICE Validate_User
  TYPE 'raw' 
  AUTHORIZATION ON
  USER "public"
  AS select 'OK' from Dummy;

I'm not familiar with ASP.Net MembershipProvider,but an alternative would be to create an SA web service with AUTHORIZATION ON and then attempt do a web service call to the SA web service providing the user ID/PWD to verify that the credentials were correct.

E.g.

CREATE WEB SERVICE Validate_User
  TYPE 'raw' 
  AUTHORIZATION ON
  USER "public"
  AS select 'OK' from Dummy;

Then start the sql Anywhere server using "-xs http" switch

Then send a request to http://username:password@yourhost.com/Validate_User (or equivalent using Ado.Net). If the credentials are correct,you will get an "OK" response back. If not,you will get an error back.

Of course,you should use HTTPS so that the credentials are transferred securely and therefore you should add "SECURE ON" to the web service definition. (Exercise left to the reader - see "-xs https" server switch in the docs :-).


调用存储过程来展现josn

猜你在找的WebService相关文章