Questions tagged [ws-client]
63 questions
7
votes
2 answers
HttpURLConnection getResponseCode() deos not return if there is no Internet connection
I am using a HttpURLConnection to check whether the server URL is available or not by using the following code:
try {
boolean connectionFailed = false;
URL knownURL = new URL("http://www.google.com");
httpConnection = (HttpURLConnection)…

mindus
- 171
- 2
- 10
5
votes
3 answers
WS in Play become incredible complex for 2.6.X
For Play 2.3.X the WS module is very easy to be used:
WS.url(s"http://$webEndpoint/hand/$handnumber").get()
For the such simple and strightforward usage.
While in Play 2.6.x according to the link :…

wherby
- 704
- 1
- 5
- 16
5
votes
3 answers
How to create a WSResponse object from string for Play WSClient
Documentation suggests testing API client based on WSClient using a mock web service, that is, create a play.server.Server which will respond to real HTTP requests.
I would prefer to create WSResponse objects directly from files, complete with…

Konstantin Pelepelin
- 1,303
- 1
- 14
- 29
4
votes
2 answers
Can't install a Grails plugin
I'm trying to install the ws-client plugin for grails. When I run grails install-plugin ws-client, however, it gets to
Resolving plugin ws-client. Please wait...
and then it just appears to complete with no further information. I've tried deleting…

Mike Caputo
- 1,156
- 17
- 33
4
votes
1 answer
WSClient Play Framework SSL setup
I am trying to use the WSClient in my Play app with a custom ssl config, but it's not working.
My controller looks like this:
@Singleton
class HomeController @Inject()(cc: ControllerComponents, ws: WSClient, configuration: Configuration) extends…

mattl
- 2,082
- 3
- 17
- 24
4
votes
2 answers
Processing JSON error responses with Play WSClient
I'm using Play's WSClient to interact with a third-party service
request = ws.url(baseUrl)
.post(data)
.map{ response =>
response.json.validate[MyResponseClass]
The response may be a MyResponseClass or it may be an ErrorResponse like {…

tgk
- 3,857
- 2
- 27
- 42
4
votes
3 answers
ClassNotFoundException: org.springframework.context.support.AbstractApplicationContext
I am trying to follow this Apache CXF – JAX-WS – Simple Tutorial but building the downloaded sample (out of the box!) creates a client that upon invocation refuses to run, issuing this error:
Failed to load Main-Class manifest attribute from
…

Introspective
- 554
- 2
- 5
- 13
3
votes
0 answers
Passing an java.awt.Image in ParameterMap to JasperReport on JasperReports Server
I'm looking for a solution to a problem.
I have a report on my JasperReports Server.
I want to pass an image to this report via the parameterMap.
What I've found so far is that I have to pass an java.awt.Image to the parameterMap.
so:
java.awt.Image…

Johann Kneringer
- 101
- 2
- 7
3
votes
1 answer
How to avoid: "blockingToByteString is a blocking and unsafe operation"
In my Play Project I want to get the Message Digest of a File that I get from a REST Service.
Service call:
ws.url("deployment/data/idResource").withMethod("GET").stream
From the Response (WSResponse) I extract the body…

pme
- 14,156
- 3
- 52
- 95
3
votes
1 answer
Play 2.5.x (Scala) -- How does one put a value obtained via wsClient into a (lazy) val
The use case is actually fairly typical. A lot of web services use authorization tokens that you retrieve at the start of a session and you need to send those back on subsequent requests.
I know I can do it like this:
lazy val myData = {
…

Techmag
- 1,383
- 13
- 24
2
votes
1 answer
play framewoerk & scala Future(s) chain. make it more pretty
I use WSClient to make rest requests. Each request return some Future.
as result I need to make request 1 and get some data. Then I need to make request 2 with data from result of request 1. Then I need to make request 3 with data from result of…

Alexandr
- 349
- 1
- 4
- 13
2
votes
1 answer
TPE1122: “WS Security Header in the message is invalid.” with BulkRequestTransmitterService
We are receiving TPE1122 error message while sending a BulkRequestTransmitterService to the IRS through A2A.
I have reviewed several posts, but none of them seems to address the issue. Looks like everyone having an unique problem or maybe i just…

ravi
- 197
- 2
- 3
- 18
2
votes
1 answer
Use WSClient in scala app (play framework)
I'm not sure if there's something really basic that I'm missing, but I can't figure out how to use WSClient. I've seen all of the examples saying you need to pass the WSClient to a class as a dependency, which I've done, but when I run the program…

annedroiid
- 6,267
- 11
- 31
- 54
2
votes
1 answer
Creating empty tag if null is passed android
I have used WSClient++ to generate my source code. When I am passing null value to object, I expect when request XML is generated it should include the empty tag to the request XML. But it seems that its not generating any tag when null value is…

Android
- 3,828
- 9
- 46
- 79
2
votes
0 answers
Android router disconnects webservice call not throw an exception or disconnect the process
I am using webservice call in my application. Using broadcast receiver checking the internet connection (android.net.ConnectivityManager.CONNECTIVITY_ACTION) and request the webservice call.
The android.net.ConnectivityManager.CONNECTIVITY_ACTION…

mindus
- 171
- 2
- 10