web-services

Disadvantage of increasing ServicePointManager.DefaultConnectionLimit

走远了吗. 提交于 2020-02-27 07:40:45
问题 I am calling a webservice in multi threaded environment. Lot of my calls fail due to operation time out or bad request but none of the calls fail if I do it in linear fashion which means there is problem with invoking webservice with multiple threads. After lot of analysis, I found out that there is limit of concurrent connection which is causing these exception so I fixed it by adding below code. ServicePointManager.DefaultConnectionLimit = 2 * _ThreadCount; What I dont know is the possible

Spring RESTful Webservice - Returning JSON without model object

心不动则不痛 提交于 2020-02-24 20:19:27
问题 there. I have a doubt with returning JSONObjects on a Spring RESTful WebService. Here it goes: I have a method in my controller which I want to have it returning a JSONObject. However, when I set it's return type to JSONObject and effectively return a JSONObject, I get that following error: HTTP Status 500 - Request processing failed; nested exception is java.lang.IllegalArgumentException: No converter found for return value of type: class org.json.JSONObject So, I actually understand what

Single API endpoint pros and cons

限于喜欢 提交于 2020-02-24 12:30:05
问题 I am creating API and trying to figure out is planned approach any good. That API is not public and it will be used by SPA and mobile app that I build. So I am thinking of GraphQL-like design but without posting json and with regular HTTP methods. Something like this for GET methods: Example 1 - get users with specific fields(_join indicates sql table join), ordering and limit: api.com?table=users&displayFields=id,name,email,address,tel,country_join&orderBy=asc&orderColumn=name&offset=0&limit

Calling Windows Service from a Web Service

£可爱£侵袭症+ 提交于 2020-02-24 11:11:30
问题 I am using .Net 2.0 framework and would like to call a function in Windows service from a web service. Is this possible? And If yes, how much control I will have over the function i.e passing parameters, getting the result back etc. Any ideas would be greatly appreciated :) 回答1: Remoting is your best option if you need to pass parameter values. If you don't need to share objects or anything too complex, ServiceController is probably easier. 回答2: You can do it through .NET remoting. If you go

Calling Windows Service from a Web Service

我怕爱的太早我们不能终老 提交于 2020-02-24 11:11:22
问题 I am using .Net 2.0 framework and would like to call a function in Windows service from a web service. Is this possible? And If yes, how much control I will have over the function i.e passing parameters, getting the result back etc. Any ideas would be greatly appreciated :) 回答1: Remoting is your best option if you need to pass parameter values. If you don't need to share objects or anything too complex, ServiceController is probably easier. 回答2: You can do it through .NET remoting. If you go

Calling Windows Service from a Web Service

删除回忆录丶 提交于 2020-02-24 11:11:03
问题 I am using .Net 2.0 framework and would like to call a function in Windows service from a web service. Is this possible? And If yes, how much control I will have over the function i.e passing parameters, getting the result back etc. Any ideas would be greatly appreciated :) 回答1: Remoting is your best option if you need to pass parameter values. If you don't need to share objects or anything too complex, ServiceController is probably easier. 回答2: You can do it through .NET remoting. If you go

An error occurred when verifying security for the message - SAML Token

扶醉桌前 提交于 2020-02-24 10:19:29
问题 Few years back we have developed a client to consume a usi-ws v2, this webservice uses a STS service v2. It was working fine. But, now soap-ws v2 is updated to usi-ws v3 which in turns uses STS service v3. Key differences are 1) usi-ws v3 uses <sp:Basic256Sha256Rsa15/> as AlgorithmSuite policy which matches STS service v3's AlgorithmSuite policy. 2) usi-ws v3 uses STS service v3 instead of STS service v2 I can integrate the change by two different approaches First Approach I use apache-cxf

When a list has only one element, CXF return the object instead a js array

只愿长相守 提交于 2020-02-24 04:23:02
问题 I'm using CXF to create restful services. One of the services return a list of string. When I have more than one item in the list, the CXF returns an array of strings, but when I have only one element, it returns the String instead an array with a json: With one Item: {"ImageResponse":{"images":"hello"}} With two Items: {"ImageResponse":{"images":["hello","hi"]}} Is there a way to always return a list, even when the list has only one item? My Response class: @XmlRootElement public class

When a list has only one element, CXF return the object instead a js array

我怕爱的太早我们不能终老 提交于 2020-02-24 04:21:32
问题 I'm using CXF to create restful services. One of the services return a list of string. When I have more than one item in the list, the CXF returns an array of strings, but when I have only one element, it returns the String instead an array with a json: With one Item: {"ImageResponse":{"images":"hello"}} With two Items: {"ImageResponse":{"images":["hello","hi"]}} Is there a way to always return a list, even when the list has only one item? My Response class: @XmlRootElement public class

“Unable to parse URL” exception after SOAP request

落爺英雄遲暮 提交于 2020-02-23 11:27:48
问题 I'm trying to use a soap service with php, but it seems that the request format that php creates couldn't be interpreted by the service. Simple example I have so far: ini_set("soap.wsdl_cache_enabled", "0"); $client = new SoapClient('http://publicbetawebservices.hotel.de/V2_8/FreeHotelSearchWebService.svc?WSDL',array("trace"=>1)); try { $response = $client->GetWebservicesVersion(); } catch(Exception $e){ print_r($e); } Output: SoapFault Object ( [message:protected] => Unable to parse URL