client

Are CXF client proxies thread safe?

巧了我就是萌 提交于 2019-12-19 06:14:12
问题 I'm using CXF to generate SOAP client classes. In the CXF documentation, they write Are JAX-WS client proxies thread safe? Official JAX-WS answer: No. According to the JAX-WS spec, the client proxies are NOT thread safe. To write portable code, you should treat them as non-thread safe and synchronize access or use a pool of instances or similar. CXF answer: CXF proxies are thread safe for MANY use cases. The exceptions are: (I'm omitting their description of these use cases) For most "simple"

UDP and sockets, recvfrom() returning -1 and resource temporarily unavailable

与世无争的帅哥 提交于 2019-12-19 05:58:38
问题 I have a client and a server communicating with datagrams (UDP) in C. The client sends 5 msgs and upon receiving msgs, server sends msgs back. Receiving and sending messages are great until client has finished receiving the msgs. After server sending all msgs back, it terminates using close(). so recvfrom() from client should return 0, right? Assuming recvfrom() should return 0 upon close() from server side, it returns -1 instead, with error Resource temporarily unavailable. Is this resource

GraphQL Java client library

梦想的初衷 提交于 2019-12-19 05:09:14
问题 I am looking for a java client library for GraphQL. This is to use for server-to-server communication, both in java. No android, not javascript... just java. Apollo is the nearest answer, and it seems like it is for Android only, not for plain-java applications. Lots of examples about build server in java, nothing about client. Any idea? Thanks! 回答1: There's a few clients available, all taking different approaches. Apollo Android - Originally intended for Android, but equally usable in any

Sending files from server to client in Java

北慕城南 提交于 2019-12-19 04:13:09
问题 I'm trying to find a way to send files of different file types from a server to a client. I have this code on the server to put the file into a byte array: File file = new File(resourceLocation); byte[] b = new byte[(int) file.length()]; FileInputStream fileInputStream; try { fileInputStream = new FileInputStream(file); try { fileInputStream.read(b); } catch (IOException ex) { System.out.println("Error, Can't read from file"); } for (int i = 0; i < b.length; i++) { fileData += (char)b[i]; } }

Java client for the X.509 secured web-service

核能气质少年 提交于 2019-12-19 04:13:00
问题 I have remote web-service which is secured with X.509 certificate. I generated web-service client stuff (using jax-ws) but need to configure if for the certificate's usage. How should I proceed? I guess I should register certificate in my local trusted keystore and them set something like this: System.setProperty("javax.net.ssl.keyStore", keyStore); System.setProperty("javax.net.ssl.keyStoreType", "JKS"); System.setProperty("javax.net.ssl.keyStorePassword", keyStorePassword); System

Spring RestTemplate Client - connection refused exception

社会主义新天地 提交于 2019-12-18 19:40:52
问题 I am new to webservices and trying to write a RESTFul webservice's client using RestTemplate. I am using org.springframework.http.converter.xml.MarshallingHttpMessageConverter as message converter and org.springframework.oxm.xstream.XStreamMarshaller as marshaller. Is there any way to debug this further or find out the root cause of this issue? My consumer class looks like this - @SuppressWarnings("unchecked") public List<Deal> getClientInformation() throws RestClientException { return

Netty Client to Server message

会有一股神秘感。 提交于 2019-12-18 12:29:03
问题 This is actually my first post on here and I have been trying to figure this out for some time but I am finally calling in the flag and going to try to get some help on this topic. So I have a Client and a Server that was modeled after the echo client/server and the secure chat client/server. I am not interested in the SSL part of the chat and using the echo just to ensure that I am getting responses to and from the client/server. I will add all the pertinent code at the bottom of this post.

Get a list of connected client IDs from MQTT client

大城市里の小女人 提交于 2019-12-18 12:28:53
问题 As a mqtt client connected to mosquitto is it possible to retrieve a list of client IDs who are also connected to the broker? 回答1: method I: handle in client logic as @user1048839 says, use client's LWT & online publish msg, maintain client status on a custom topic. subscript this topic & maintain client list self. if pub retain msg, once sub will get the client list. method II: change mosquitto broker code official code not support online_list, so I patched mosquitto 1.5.4, add 2 custom sys

Client Server programming in python?

◇◆丶佛笑我妖孽 提交于 2019-12-18 10:46:20
问题 Here is source code for multithreaed server and client in python. In the code client and server closes connection after the job is finished. I want to keep the connections alive and send more data over the same connections to avoid overhead of closing and opening sockets every time . Following code is from : http://www.devshed.com/c/a/Python/Basic-Threading-in-Python/1/ import pickle import socket import threading # We'll pickle a list of numbers: someList = [ 1, 2, 7, 9, 0 ] pickledList =

Zero size files uploaded with FTP FileUpload

天涯浪子 提交于 2019-12-18 09:23:07
问题 I've been reading gobs of articles on FTP upload in ASP.NET recently and they all seem to make sense, but every time I've tried implementing them I either get an empty file uploaded, or no file at all. Here are some of the articles I've been reading: Managing FTP Transfers from an ASP.NET Web Page By John Peterson FileUpload Control Doesn’t Give Full Path….HELP!!!! How to: Upload Files with the FileUpload Web Server Control They're all great articles, but like I said, having issues :( I know