soapserver
Directory actions
More options
Directory actions
More options
soapserver
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
parent directory.. | ||||
This is a simple example of a system for embedding a SOAP server (Apache Axis) in a standalone application. To provide SOAP services it is necessary to use an HTTP server with servlet support. I've chosen Jetty as this is pure Java. To embed Axis and Jetty into an application you need to use an instance of AppHttpSOAPServer. The Axis SOAP server is initialized using the Axis WAR file located in the "webapps" directory. This initialisation is specified in the "jetty.xml" file. To add application SOAP services you need to define a "deploy.wsdd" file (see the Axis documentation) and use the AppHttpSOAPServer.addSOAPServices method. There is an example application consisting of "EchoServer", "EchoClient" and "deploy.wsdd" in this directory. These can be run using the "runEchoServer.sh" and "runEchoClient.sh" scripts. Execute "runEchoServer.sh &" first! Just kill this to make the application exit. CLASSES ======= AppHttpSOAPServer.java The HTTP/SOAP server. Embed an instance of this in your application. The other classes tend to just support embedding, i.e. they avoid a lot of console I/O and the creation of temporary files. AppAxisServerFactory.java Helper class for obtaining AxisServers. This implementation avoids creating any external files. Normally a directory for SOAP attachments is created, this avoids it. AppEngineConfigurationFactory.java This is a implementation of EngineConfigurationFactory for embedded applications. It does not write out any configuration files or log anything. AppFileProvider.java A simple ConfigurationProvider that uses the Admin class to read XML files for clients and servers, but does write them, so is suitable for embedded applications. AppLogSink.java A LogSink for embedded applications. This throws all messages away. CLASSPATH Naturally you need all the classes/jars required for Jetty and Axis (this can be obtained from: xml.apache.org, I used Axis 1.1, and jetty.mortbay.org, I used Jetty 4).