public class WSTester
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
clustalRNAAlignment |
private static java.lang.String |
FAILED
Status strings
|
static java.lang.String |
fastaAlignment |
static java.lang.String |
fastaInput1record |
static java.lang.String |
fastaInput2records
Test sequences to be used as input for WS
|
static java.lang.String |
fastaRNAAlignment |
private java.lang.String |
hostname |
private static java.lang.String |
OK |
private static java.lang.String |
UNSUPPORTED |
private java.io.PrintWriter |
writer |
Constructor and Description |
---|
WSTester(java.lang.String hostname,
java.io.PrintWriter writer)
Construct an instance of JABAWS tester
|
Modifier and Type | Method and Description |
---|---|
private <T> boolean |
checkService(JABAService wservice,
Services service)
Call most of web services functions and check the output
|
boolean |
checkService(Services service)
Test JABA web service
|
private JABAService |
connect(java.lang.String host,
Services service)
Connects to a web service by the host and the service name web service type
|
private static java.util.List<FastaSequence> |
loadAlignment()
Converting input to a form accepted by WS
|
private static java.util.List<FastaSequence> |
loadRNAAlignment()
Converting input to a form accepted by WS
|
private static java.util.List<FastaSequence> |
loadSeqs(int nLines)
Converting input to a form accepted by WS
|
static <T> void |
main(java.lang.String[] args)
Test JWS2 web services
|
private <T> boolean |
presetAlign(MsaWS<T> msaws,
java.util.List<Preset<T>> presets)
Calls alignment with preset
|
(package private) static void |
printUsage()
Prints usage
|
private void |
reportException(java.lang.Exception e) |
private void |
reportResults(Services serv,
boolean succeed) |
private <T> boolean |
testDefaultAlignment(MsaWS<T> msaws,
Services service)
Align using default settings
|
private <T> boolean |
testDefaultAnalyse(java.util.List<FastaSequence> fastalist,
SequenceAnnotation<T> wsproxy,
Preset<T> preset,
java.util.List<Option<T>> customOptions) |
private <T> void |
testMetadata(Metadata<T> msaws) |
private <T> boolean |
testMsaWS(MsaWS<T> msaws,
Services service) |
private <T> boolean |
testSequenceAnnotationWS(SequenceAnnotation<T> wservice,
Services service) |
public static final java.lang.String fastaInput2records
public static final java.lang.String fastaInput1record
public static final java.lang.String fastaAlignment
public static final java.lang.String fastaRNAAlignment
public static final java.lang.String clustalRNAAlignment
private static final java.lang.String FAILED
private static final java.lang.String OK
private static final java.lang.String UNSUPPORTED
private final java.io.PrintWriter writer
private final java.lang.String hostname
public WSTester(java.lang.String hostname, java.io.PrintWriter writer)
hostname
- - fully qualified host and context name of JABAWS e.g.
http://nanna.cluster.lifesci.dundee.ac.uk:8080/jabawriter
- a PrintWriter instance to writer test log to.private static java.util.List<FastaSequence> loadSeqs(int nLines)
private static java.util.List<FastaSequence> loadAlignment()
private static java.util.List<FastaSequence> loadRNAAlignment()
static void printUsage()
private <T> boolean presetAlign(MsaWS<T> msaws, java.util.List<Preset<T>> presets) throws UnsupportedRuntimeException
T
- msaws
- presets
- list of the PresetUnsupportedRuntimeException
private <T> boolean testMsaWS(MsaWS<T> msaws, Services service) throws java.lang.Exception
java.lang.Exception
private <T> boolean checkService(JABAService wservice, Services service)
T
- web service typemsaws
- UnsupportedRuntimeException
- is thrown if the connection to a web service was made, but
the web service is not functional. e.g. when native
executable does not exists for a server platformprivate <T> boolean testSequenceAnnotationWS(SequenceAnnotation<T> wservice, Services service) throws java.lang.Exception
java.lang.Exception
private <T> boolean testDefaultAnalyse(java.util.List<FastaSequence> fastalist, SequenceAnnotation<T> wsproxy, Preset<T> preset, java.util.List<Option<T>> customOptions) throws java.lang.Exception
java.lang.Exception
private void reportException(java.lang.Exception e)
private <T> void testMetadata(Metadata<T> msaws) throws UnsupportedRuntimeException
UnsupportedRuntimeException
private <T> boolean testDefaultAlignment(MsaWS<T> msaws, Services service) throws java.lang.Exception
T
- msaws
- UnsupportedRuntimeException
java.lang.Exception
public static <T> void main(java.lang.String[] args) throws java.io.IOException
T
- web service typeargs
- -h=java.io.IOException
private JABAService connect(java.lang.String host, Services service) throws javax.xml.ws.WebServiceException, java.net.ConnectException
host
- the fully qualified name of JABAWS server including JABAWS
context name e.g
http://nanna.cluster.lifesci.dundee.ac.uk:8080/jabaservice
- the name of the JABAWS service to connect tojavax.xml.ws.WebServiceException
java.net.ConnectException
- if fails to connect to the service on the hostpublic boolean checkService(Services service) throws java.net.ConnectException, javax.xml.ws.WebServiceException
service
- the service to testjavax.xml.ws.WebServiceException
java.net.ConnectException
private void reportResults(Services serv, boolean succeed)