|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
org.apache.ws.util.test.axis.AbstractAxisTestCase
Provides some conviencence functionality for easier testing of web services. Methods provided by this JUnit test case superclass will allow an embedded Axis server to be started and stopped.
Field Summary | |
boolean |
RUN_AXIS_SERVER
This constant is used for enabling/disabling the use of the embedded axis server. |
Constructor Summary | |
AbstractAxisTestCase()
|
|
AbstractAxisTestCase(boolean runServer)
Enables/Disables the running of the Axis server. |
|
AbstractAxisTestCase(java.lang.String name)
|
Method Summary | |
protected java.net.URL |
getAxisBaseUrl()
Returns the base URL used to contact the Axis server. |
protected java.lang.String |
getAxisConfigBasePath()
Returns the full directory path containing the WSDD configuration file(s). |
protected java.lang.String |
getAxisConfigFileName()
Returns the filename of the actual Axis WSDD configuration file, excluding all directory paths. |
protected java.lang.String |
getAxisContextName()
Returns the context name of the Axis servlet for use within an endpoint URL. |
protected NotSoSimpleAxisServer |
getAxisServer()
|
protected int |
getAxisServerSocketPort()
Returns the number of the port that the embedded Axis server will accept requests on. |
protected java.net.URL |
getAxisWebServiceUrl(java.lang.String serviceName)
Returns a URL used to request a WSDL document for a web service with the given name. |
protected java.net.URL |
getAxisWebServiceWsdlUrl(java.lang.String serviceName)
Returns a URL used to request a WSDL document for a web service with the given name. |
protected org.apache.axis.configuration.FileProvider |
getFileProvider()
|
protected void |
setAxisServer(NotSoSimpleAxisServer server)
This setter is to allow subclasses to tell us if we should use an already existing Axis server. |
protected void |
startAxisServer()
Reads in the Axis configuration file, creates a server socket to accept requests and then starts the embedded Axis server. |
protected void |
stopAxisServer()
Stops the embedded Axis server if it is running. |
Methods inherited from class junit.framework.TestCase |
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString |
Methods inherited from class junit.framework.Assert |
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public boolean RUN_AXIS_SERVER
Constructor Detail |
public AbstractAxisTestCase()
TestCase.TestCase()
public AbstractAxisTestCase(boolean runServer)
runServer
- public AbstractAxisTestCase(java.lang.String name)
TestCase.TestCase(String)
Method Detail |
protected java.net.URL getAxisBaseUrl()
http://127.0.0.1:####/axis/services/
where ####
is the Axis port number
and axis
is
the Axis context name
.
protected java.lang.String getAxisConfigBasePath()
configuration file name
.
Subclasses may override this method if the default is not acceptable. The
default is the current directory as defined by the system property
user.dir
.
protected java.lang.String getAxisConfigFileName()
server-config.wsdd
.
protected java.lang.String getAxisContextName()
protected void setAxisServer(NotSoSimpleAxisServer server)
server
- the embedded Axis server to be used by the testsprotected NotSoSimpleAxisServer getAxisServer()
protected int getAxisServerSocketPort()
8080
.
protected java.net.URL getAxisWebServiceUrl(java.lang.String serviceName)
getAxisBaseUrl()
to determine the base URL.
serviceName
- the name of the web service
getAxisBaseUrl()
protected java.net.URL getAxisWebServiceWsdlUrl(java.lang.String serviceName)
getAxisBaseUrl()
to determine the base URL.
serviceName
- the name of the web service
getAxisBaseUrl()
protected void startAxisServer() throws java.lang.Exception
java.lang.Exception
- if failed to get the configuration file, failed to start
the server socket or failed to start the serverprotected org.apache.axis.configuration.FileProvider getFileProvider() throws org.apache.axis.ConfigurationException
org.apache.axis.ConfigurationException
protected void stopAxisServer()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |