web-services

What does Representational State mean in REST?

别等时光非礼了梦想. 提交于 2019-12-31 08:07:13
问题 I have been reading all over the net to get the exact meaning of two words: REPRESENTATIONAL STATE I have a doubt. I am misunderstanding these terms. i want to clarify understanding with some one how has good idea about this. My understanding is that, there is a resource located in the server. SO Rest means that, transferring some representational state of this resource to a client. if server has a resource x, then if we can make representational state y of resource x, and transferring it

ASP.NET MVC Forms authentication against external web service

风格不统一 提交于 2019-12-31 07:57:06
问题 I am trying to write an ASP.NET MVC application which is a frontend to our CRM which has a SOAP web service. I would like the user to log in to my web application using their CRM username and password, and then authenticate against CRM, make web service calls on the pages etc. I started to look at using Forms Authentication and implementing a custom membership provider - I can implement all the methods I need to like ValidateUser() , but the problem I have is that after logging in to the CRM

C# web service running batch file or dos command?

↘锁芯ラ 提交于 2019-12-31 07:12:02
问题 From my previous question, Executing batch file in C# web service I have checked the permission of all related stuff and found that: batch file: permission = full control for all user IIS user = myUser ..win32\cmd.exe: permission for system, admin, myUser = read&execute, read permission for "TrustedInstaller"(what is it?) = full control Visual Studio is running under administrator mode. I did some research on the Internet and it seems like I need to do something with 'Local Policies' on my

Issue with RESTful webservice +JSON+SQL stored procedure project

ぐ巨炮叔叔 提交于 2019-12-31 05:38:08
问题 I know for a fact that there is something I miss. My whole project is somewhat copy&paste of various "how to..."s, my knowledge of C# is basic at best and I need to have it working since our standard web service software is RESTful only when sending. My main problem is that all solutions I've stumbled upon are actually code snippets, which don't work for me - my C# knowledge is basic so I don't understand how it all works, much less troubleshoot it. I'm pretty sure I'm not even capturing the

How to write NamedQuery haversine formula in NamedQuery?

扶醉桌前 提交于 2019-12-31 04:57:06
问题 I want to run below query of haversine formula as NamedQuery but I don't know how to correct it. set @orig_lat = 37.334542; set @orig_lon = -121.890821; set @dist = 10; select *, 3956 * 2 * ASIN(SQRT(POWER(SIN((@orig_lat - abs(mlatitude)) * pi() / 180 / 2), 2) + COS(@orig_lat * pi() / 180) * COS(abs(mlatitude) * pi() / 180) * POWER(SIN((@orig_lon - mlogitude) * pi() / 180 / 2), 2))) as distance from user_gps_location having distance < @dist ORDER BY distance I run this query into mysql and it

Web services - XmlInclude in a derived class instead of a base class?

落花浮王杯 提交于 2019-12-31 04:41:27
问题 I am using an abstract class as a parameter in a web service call. Currently, I am including an XmlInclude of a derived class in the base class, like so: [XmlInclude(typeof(DerivedClass))] public abstract class BaseClass { } However, I'd rather not include all of the derived types in the base class. In http://www.pluralsight.com/community/blogs/craig/archive/2004/07/08/1580.aspx, the author mentions an alternative - writing the attribute above the web method instead, like so: [WebMethod]

Problems sending and receiving JSON between ASP.net web service and ASP.Net web client

[亡魂溺海] 提交于 2019-12-31 04:37:05
问题 You would think with all the posts here that this would be easy to figure out. :| Well here is what should be a simple example. NOTE The web service is VB and the client is c#. The wb service sends and receives fine when called from JQuery. From .NET There is a problem, If the service asks for a parameter as show below then the client's getresponse method gets error 500 Internal server error The Web Service <WebMethod()> _ <ScriptMethod(ResponseFormat:=ResponseFormat.Json, XmlSerializeString:

Where is the correct place to enable CORS?

僤鯓⒐⒋嵵緔 提交于 2019-12-31 04:20:08
问题 I'm using Spyne (the example "hello world" code) to make a webservice that produces some json data and then I'm trying to consume this data in javascript code in client's browser. When I go to the address http://localhost:8000/say_hello?name=Dave&times=3 I get the following output: ["Hello, Dave", "Hello, Dave", "Hello, Dave"] That's why I think there is nothing to do with the server (it works as expected). I use the following code to get the data from this webservice: <html> <head> <meta

Call webservice asynchronously and wait for all threads to be finished

我的未来我决定 提交于 2019-12-31 04:19:05
问题 I need to call the web service several times to get data, and then put those data into my database, so I've got the following code: foreach (string v in options) { IList<MySampleNode> nodes = _pi.GetData(v); _dbService.SaveToDb(nodes); } the GetData implementation looks as follows: public IList<MySampleNode> GetData(string v) { IList<MySampleNode> nodes = null; try { var client = new WsClient(); IEnumerable<IWsObject> wsNodes = client.getNodes(new getClassLevel { code = v }); nodes =

Call webservice asynchronously and wait for all threads to be finished

半世苍凉 提交于 2019-12-31 04:19:05
问题 I need to call the web service several times to get data, and then put those data into my database, so I've got the following code: foreach (string v in options) { IList<MySampleNode> nodes = _pi.GetData(v); _dbService.SaveToDb(nodes); } the GetData implementation looks as follows: public IList<MySampleNode> GetData(string v) { IList<MySampleNode> nodes = null; try { var client = new WsClient(); IEnumerable<IWsObject> wsNodes = client.getNodes(new getClassLevel { code = v }); nodes =