Java Library to Bootstrap SOAP / WSDL Development.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

anythingworks (formerly soapworks)

Java Library to Bootstrap Web service client/server development.

It supports both RESTful web services (JAX-RS) and SOAP / WSDL web services (JAX-WS).

For the Client part there are different modules for REST and SOAP so that a web service client does not have unwanted dependencies. In other places (server side) some classes specific for one technology are prefixed with either "Rest" or "Soap".

Other technologies, like JSON-RPC, could be added. Hence the name "anything works".

Getting started

Step 1:

Run the Boot class. Keep it running.

(If you have other stuff running, you can change the defaults of "localhost" and "port 80" in GrizzlyWebServer.)

Step 2:

Run requests. For example point your browser at http://localhost/rest/v1/system/ping

The REST wadl is at http://localhost/rest/v1/application.wadl

And one SOAP wsdl is at http://localhost/soap/v1/system/ping?wsdl

There are also tests you can run from client to server. See the PingServiceTest class.

Step 3:


Core Concepts

This library supports you in developing the whole product line from Server web service application to Client library.

We believe that the end user of a client library does not care what technology is used underneath. He needs a nice programming interface, with documented methods. Without having to worry about low level (HTTP) functionality.

Also, as history has shown again and again, technologies evolve, new ones arise and older ones fall out of fashion. The past has seen more SOAP adoption, now it's REST, and there will be others (HTTP/2, non-HTTP, binary, ...).

If the client code is tightly coupled to the technology then changes will reflect in the user's code. We believe that shouldn't be. Therefore this library hides the web service technology as much as possible.

Technology stack

  • Java 7
  • Guava: for the Optional class, and some other things
  • JAX-RS: for REST
  • JAX-WS: for SOAP
  • Spring: for Dependency Injection
  • Grizzly: as embedded web server
  • Jackson: for JSON marshalling
  • Swagger: for generating api documentation and swagger.json at build time, nothing at runtime
  • command4j: for command interception
  • slf4j: for Logging (Logback)
  • testng: for testing

The modules


This is the dependency to develop a web service client.






This is the dependency to develop a web service server. There are 2 implementations available:

  1. implgrizzly using the org.glassfish.grizzly grizzly-http-server dependency (recommended)
  2. impljdk which uses the built-in http server from the JDK

If you wish to use another http server, then implement your own module.



Both client and server depend on this and include it already. Shared code is in here.


This project is a full working example containing a runnable server, and a client that connects to it. It is not needed in your production environment.

To try it out, start the Boot class. Then you can hit example URLs in your browser, one is http://localhost/rest/v1/development/get and you can run Test classes, for example com.optimaize.anythingworks.exampleproject.clientapp.PingServiceTest

The project shows you how to do a few common tasks:

  • POJO mappings with immutable classes. It uses Jackson. See ComplexObject.class
  • Polymorphic types, see GeometricalFigure.class
  • Sharing code by client and server, using the ontology module.
  • Exception barrier and translation.
  • Optional REST envelope. Add ?envelope=true to the url.


Integrated server

The project has code for starting an integrated web server (Grizzly) and for automatically registering the REST and/or SOAP services in it.

Command interception

You can do automatic retries, or request/response logging, and other cross cutting concern. The project uses Commands from the library to define web service actions. Whether the commands use REST or SOAP is irrelevant to the programmer.


anythingworks (soapworks) has been in development at for use in the web services for a long time, and is now published on GitHub. It contains a full working client/server example.

The name

Initially this software was for SOAP development only. The name soapworks is a fun combination of "soap" the technology and "works" because it is a technology that works, and the fact that soapworks means soap factory (a place where soaps for washing/bathing/cleaning are produced).

Then REST support was added as a first class citizen. Instead of adding rest to the project name, a more generic name was chosen. Other future technologies may work as well.