client

Calling Client-Side WCF Service With Type List<Of T>

此生再无相见时 提交于 2019-12-11 16:05:54
问题 I am designing a multi-file upload service that also shows upload progress for each file. If I was to design my WCF method as a SOAP contract, I would do something like this: var request = IService.UploadMethod(List<Upload> request); But, how do I pass the parameter ""request"" of type " List<Upload> " when I am calling the method from the client (../upload.svc/ uploadpictures/""request"")? Help appreciated, thanks. 回答1: You're using SOAP as you say yourself - which means, you cannot just

Authentication in a client application for REST services

☆樱花仙子☆ 提交于 2019-12-11 15:55:46
问题 Firstly, I'm going to explain my objective: I developed some REST services using Jersey, that were automatically generated from my MySQL DataBase. In that DataBase I have a Login table, that have the information of who can access the REST services. With this Login table I've allready implemented Basic-Authentication for my Jersey REST services, and that's working. When I go to the REST services mainpage, I have to put the correct login and password, and then I can access all information of

c# check files on server using web client

淺唱寂寞╮ 提交于 2019-12-11 15:54:44
问题 C# 2008 I have using the WebClient DownloadFile method. I can download the files I want. However, the client has insisted on creating different folders which will contain the version number. So the name of the folders would be something like this: 1.0.1, 1.0.2, 1.0.3, etc. So the files will be contained in the latest version in this case folder 1.0.3. However, how can my web client detect which is the latest one? The client will check this when it starts up. Unless I actually download all the

Android application with Java - udp string doesn't send

冷暖自知 提交于 2019-12-11 15:44:01
问题 I have started working with JAVA on android studio and I'm trying to create a simple application that will send to my server a udp string. Everything seems to be working in the application (when I press the button I can see it been pressed , and when I use android studio and debug - the function is working, I don't get any exceptions). I have checked and my server is listening to the port (other applications are sending to this port - and it's working). But I don't think the application is

Wcf decrease client connection timeout

六眼飞鱼酱① 提交于 2019-12-11 15:11:54
问题 I have a wcf service that works fine. The problem is the client. I have a little gui where the user is supposed to place the ip address of where the wcf service is located. Both the client and service are on the same network so if I am not able to connect it is because I provided an incorrect ip address or because the firewall is blocking. Anyways how can I shorten that time so that if the user types the incorrect ip he does not have to wait like 20 seconds? Here is how my app.config file

can I implement this rest api call from a .bat file?

房东的猫 提交于 2019-12-11 14:09:10
问题 Can I implement this REST API call from a .bat file? This the request object: public class ADEtlAction { public string Type { get; set; } public string[] Domains { get; set; } } This is the what the REST call would look like: POST api/v1/etl/actions { Type:"User" Domains:["ad-domain-1", "ad-domain-2"] } 回答1: If you don't to use external binaries you can try with winhttpjs.bat: call winhhtpjs.bat "http://server/api/v1/etl/actions" -method POST -header hdrs.txt -saveTo response.file -body-file

Jersey Client resulting in 415 Unsupported media type

柔情痞子 提交于 2019-12-11 14:04:00
问题 The obvious reason for this would be not providing proper content type. But I am providing. Still i am getting Unsupported Media Type. Not sure why. Any help greatly appreciated. Client c = Client.create(); WebResource resource = c.resource(HOST+"/test"); Gson gson = new Gson(); Test test = new Test(); test.setTestName("TEST AUTOMATION"); resource.header("Content-Type", "Application/json"); String testStr = gson.toJson(test); System.out.println("Request Str: "+testStr); ClientResponse

WCF client proxy mishandling returned SOAP envelope

懵懂的女人 提交于 2019-12-11 13:48:37
问题 I have a RPC encoded PHP webservice that returns a simple soap envelope with a boolean datatype. When doing the trace on the client side, the soap envelope looks like this right before it goes into the WCF proxy: <SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://sample.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP

Cant get proper client IP address on server side WCF

﹥>﹥吖頭↗ 提交于 2019-12-11 12:52:02
问题 For obtaining client IP in WCF i use the following method: public static byte[] GetUserIP(OperationContext context) { var messageProperties = context.IncomingMessageProperties; RemoteEndpointMessageProperty endpointProperty = messageProperties[RemoteEndpointMessageProperty.Name] as RemoteEndpointMessageProperty; return GetIPFromString(endpointProperty.Address); } My machine has some local IPv4 and this method was working until yesterday.. May be our network admins changed something; i dont

Could not find endpoint element with name ' and contract 'I' in the ServiceModel client configuration section.

这一生的挚爱 提交于 2019-12-11 12:14:18
问题 I am working on a Base WCF Service- Client WCF service - Consumer Base Wcf servcie model as following: In this model, I have created a Base WCF service and created 1 WCF service i.e; ClientWCFService and 1 ASMX service i.e; ClientASMXservice using the BaseWCFServiceProxy.cs the Proxy class of Base WCF Service using SVCUtil.exe. The ClientWCFService and ClientASMXservice are working fine in StandAlone environment. Now, I created a Consumer Console Application using the same proxy class