Skip to content

Example of making non-blocking SOAP requests in Scala and Play framework

Notifications You must be signed in to change notification settings

vmencik/soap-async

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

Non-blocking SOAP client using Scala, Play and CXF

You can read more about this problem in a blog post at czechscala.com via web.archive.org (in English) or at dev.etnetera.cz (in Czech).

ws-server

An implementation of a trivial SOAP web service using JAX-WS and the built-in HTTP server in JRE.

The folder contains an SBT project.

> sbt run

This will start the web service endpoint at http://localhost:8080/ws-server/AddNumbers.

play-client

A Play application that consumes the SOAP web service.

It uses the CXF to implement a non-blocking SOAP client. Without CXF in classpath, the code will still work, but JAXWS will revert to the default implementation (JAXWS-RI - at least in Oracle Java) that uses blocking HTTP client.

The client expects the web service to be running at: http://localhost:8080/ws-server/AddNumbers.

See play-client/app/controllers/AsyncSoapController.scala for the details.

Start Play server in dev mode:

> sbt run

The Play's default HTTP port is 9000 so to access the controller just point your browser to http://localhost:9000/add?a=10&b=50 (for sum of 10 + 50).

About

Example of making non-blocking SOAP requests in Scala and Play framework

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published