Combined SOAP and REST Web Service

See:
          Description

Packages
soaprest The soaprest project is a framework for developing web service endpoints that accept both SOAP and REST invocations.
test This is a simple test web service for the soaprest framework.

 

Combined SOAP and REST Web Service

The soaprest package is a framework for developing web service endpoints that accept both SOAP and REST invocations. One of the design problems in web services is that one must decide whether to use SOAP or REST. Existing frameworks limit a particular endpoint to be either SOAP or REST. A soaprest endpoint is specified as a SOAP web service using WSDL, but will also accept REST invocations, and will respond according to how a request was invoked. This gives one the advantages of both SOAP and REST in a single web service. The same web service endpoint may be deployed either as a stand-alone service or as a servlet in a container.

This is an experimental project, and it does not support all of the features of Java Web Services. It also maps from SOAP to REST, not the other way around, so only a few of the REST parameter styles are used. There are other limitations as well.

  1. Pseudo reference parameters (OUT and INOUT parameters) are not supported.
  2. The document/literal/wrapped style is the only one that has been tested. It is possible that the RPC/literal/wrapped style could also work, but it was never tested.
  3. Exceptions thrown by the server generate java.lang.IllegalArgumentException on a SOAP client. It is not clear why this happens. The XML appears to be correctly specified, including namespaces.

The documentation for the REST API is generated from the annotations and is available on a web browser by using the web service URL without any operation or with index.html.

The technical documentation is in the soaprest and test packages.

Copyright (c) 2012 Ken Baclawski. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY KEN BACLAWSKI ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEN BACLAWSKI OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.