public class AppHttpSOAPServer
extends org.mortbay.http.HttpServer
This should be used in applications that want to offer web services for clients to use. The web services offered are SOAP RPC requests for the activation of registered methods in classes that are part of the application.
A special property of this server over the standard Jetty one is that it requires only resources that are available locally and are located using the classloader (so the resource files can be packaged in jar files).
If the given port number is in use, then a search for a free port will be undertaken by incrementing the given port number.
The configuration of this server is builtin to provide Axis SOAP services.
Start up sequence:
AppHttpSOAPServer server = new AppHttpSOAPServer( port_number ); server.start(); server.addSOAPServices( <URL of "deploy.wsdd" file> );
Constructor and Description |
---|
AppHttpSOAPServer(int portNum)
Constructor loads the default configuration and starts a HTTP/SOAP
server on a given port.
|
Modifier and Type | Method and Description |
---|---|
org.mortbay.jetty.servlet.WebApplicationContext |
addAxisSOAPServices(String direct)
Add the Axis SOAP services (this is loaded when parsing the "jetty.xml"
file).
|
void |
addSOAPService(URL deployURL)
Add new services to the SOAP server.
|
int |
getPort()
Return the port number being used.
|
static void |
main(String[] arg) |
protected org.mortbay.http.HttpContext |
newHttpContext()
Create a new ServletHttpContext.
|
protected void |
setDefaultPort(int portNum)
Set the default port number to use, will try the suggested port number
and if free will set the port number to that.
|
addComponent, addContext, addContext, addContext, addContext, addEventListener, addHostAlias, addListener, addListener, addListener, addRealm, destroy, doStart, doStop, findHandler, getConnections, getConnectionsDurationAve, getConnectionsDurationMax, getConnectionsOpen, getConnectionsOpenMax, getConnectionsRequestsAve, getConnectionsRequestsMax, getContext, getContext, getContext, getContexts, getErrors, getHostMap, getHttpServerList, getHttpServers, getListeners, getRealm, getRequestLog, getRequests, getRequestsActive, getRequestsActiveMax, getRequestsDurationAve, getRequestsDurationMax, getRequestsPerGC, getResolveRemoteHost, getStatsOn, getStatsOnMs, getStopGracefully, getTrace, join, removeComponent, removeContext, removeEventListener, removeListener, removeRealm, save, service, setAnonymous, setContexts, setListeners, setRequestLog, setRequestsPerGC, setResolveRemoteHost, setStatsOn, setStopGracefully, setTrace, statsReset, stop
getComponents, isStarted, isStarting, isStopping, start, stop
public AppHttpSOAPServer(int portNum) throws IOException
portNum
- the requested port on which to establish the HTTP
services, this may not be the port actually used.IOException
protected org.mortbay.http.HttpContext newHttpContext()
ServletHttpContext
instance (rather than a
non-servlet type).newHttpContext
in class org.mortbay.http.HttpServer
ServletHttpContext
public org.mortbay.jetty.servlet.WebApplicationContext addAxisSOAPServices(String direct) throws IOException
direct
- name of the Axis war file.WebApplicationContext
IOException
public void addSOAPService(URL deployURL)
deployURL
- URL of a wsdd file containing deployment
descriptions for the SOAP services to be
offered by the application.protected void setDefaultPort(int portNum)
portNum
- the port number.public int getPort()
public static void main(String[] arg)
Copyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.