web-services

Examples of practical usage of JSON to and from an ASMX web service via jQuery

半腔热情 提交于 2020-01-25 09:05:13
问题 Can anyone recommend an article on sending and receiving JSON to an asp.net web service (any flavor) that uses more practical examples than "hello world". Ideally, something that covers topics like: Receive a single complex object from a web service (to display in a form) Receive a collection of complex objects from a web service (to display in a table) Send a single complex object to a web service (for updating the database) Send a collection of complex objects to a web service (for updating

What is difference between REST api and REST server

折月煮酒 提交于 2020-01-25 08:23:13
问题 I am a little bit confused about this. Can I call my Java server REST server or should I call it REST api? What is the right terminology of this? When can you call something REST api and when REST server? Thanks 回答1: An API is an Application Programming Interface, which is a way to provide information for other applications (communication among applications). A server is any machine running some process that will execute some service for you. In other words, however you call it, the important

Can you download images from a specific domain for each page ending in a string?

时间秒杀一切 提交于 2020-01-25 07:25:48
问题 I recently found an old website that I used to use (we'll call it example.com) which stores images on a page with the URL of your ID and a 5-character randomly-generated code. For example if my ID is HG5K , one of these images will be located at example.com/[random code here]_HG5K.png . The code generator uses a random combination of capital letters and numbers. Some examples of codes: 83JME_HG5K HD2U3_HG5K 33GIZ_HG5K What I'm asking is: if there is a way to search example.com for any pages

Thread was being aborted error when making a service call from async method

筅森魡賤 提交于 2020-01-25 07:22:06
问题 I have a method that is called asynchonously as part of a loop as below List<Task> tasks = new List<Task>(); foreach (var cust in e.customers) { tasks.Add(Task.Run(() => exMan.perfomAction(cust, userId))); } await Task.WhenAll(tasks); This method calls serveral other methods. One of these methods makes a service call. I get the error.. Thread was being aborted. The application doesn't always error on the same line of code. It might be when the service reference is being initialized, when one

Populate 2nd drop-down list based on 1st drop-down using API JSON

纵然是瞬间 提交于 2020-01-25 06:59:07
问题 I want to display data at 2nd drop-down list base on data chosen from 1st drop-down list. I used AJAX to get display data at 2nd drop downlist. Below is the JSON result if facID = F09 Below is the AJAX code at where the drop-down list is located <script> function getroom(val) { $.ajax({ type: "POST", url: "../room_scheduler/room_scheduler.php", data:'factory_id='+val, success: function(data){ $("#room-list").html(data); } }); } </script> and below is the room_scheduler.php <?php require_once

Blackboard SOAP web service php

人走茶凉 提交于 2020-01-25 04:47:24
问题 I am using this library to do the development about blackboard web service. I have successfully registered the proxy tool and make it available in the administrator panel. The connection is built and function is able to be used. But When I call the saveColumns in Gradebook in Blackboard web service library, $coursemember_detail = $blackboard->Gradebook("saveColumns",array('courseId'=>'_50_1','columnName'=>'testing')); It returns array(1) { ["@attributes"]=> array(1) { ["nil"]=> string(4)

fill dropdownlist using webservice in mvc

回眸只為那壹抹淺笑 提交于 2020-01-25 02:56:30
问题 i want to fill the dropdown using webservice and want to pass the selected value to the controller using ajax how can i do that please help here is what i have tried so far. here are the contents which is in my webservice is in json format. suppose this is my webservice https://www.abc.com/webservices/radius.php?json { "results" : [{ "zip" : "12345", "city" : "delhi", "distance" : "0.0" }, { "zip" : "123456", "city" : "noida", "distance" : "3.1" }, { "zip" : "123457", "city" : "faridabad",

How to get a webserice to serialize/deserialize the same type in .net

只愿长相守 提交于 2020-01-25 02:47:50
问题 I want to use typed parameters in the web methods. But when visual studio 2005 creates the web reference on for the client it automatically creates it's own types. I am using a .net web service and a .net client. For example: < WebMethod > _ Public Function Foo() as ServerNamespace.Bar ... End Function at the client the method becomes WebServiceInstance.Foo() as ClientNamespace.Webservice.Bar returning a different type. I started writing my own serialization helper class to convert the type,

Android wait for network available

随声附和 提交于 2020-01-25 00:56:14
问题 I am writing an Android service which is executed every 15 minutes. It requires an internet connection because it sends a request to a server and if the response of the server is like "ok" the service executes some code. All works fine if the phone is not in standby (the screen is on), but if the phone is in standby mode the connection is unavailable and the service does not work correctly. I want the service to wait for an available connection and then send the request to a server. For

webservice oneway and new SPSite(myUrl)

旧城冷巷雨未停 提交于 2020-01-24 22:04:26
问题 I have a problem with a oneway web method that open a moss site (probably because in a oneway webmethod the context is null) Is possible to rewrite this code to remove the null reference exception? (without the oneway attribute i don't have the exception) [SoapDocumentMethod(OneWay = true)] [WebMethod(Description = "TestOneWay")] public voidTestOneWay(string webUrl) { using (SPSite site = new SPSite(webUrl)) { .... } } the exception is: [2304] Error:Object reference not set to an instance of