whitlock 2003/01/14 08:43:19 Modified: java/test/addressbook/wsifservice AddressBook.wsdl java/test wsif.test.properties java/test/util TestUtilities.java BridgeThread.java java/test/addressbook AddressBookTest.java Added: java/test/addressbook/wsifservice deploy.wsdd Log: Running tests against an axis server Revision Changes Path 1.2 +7 -2 xml-axis-wsif/java/test/addressbook/wsifservice/AddressBook.wsdl Index: AddressBook.wsdl =================================================================== RCS file: /home/cvs/xml-axis-wsif/java/test/addressbook/wsifservice/AddressBook.wsdl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- AddressBook.wsdl 12 Dec 2002 11:51:03 -0000 1.1 +++ AddressBook.wsdl 14 Jan 2003 16:43:19 -0000 1.2 @@ -196,6 +196,9 @@ <port name="SOAPPort" binding="tns:SOAPHttpBinding"> <soap:address location="http://localhost:8080/soap/servlet/rpcrouter"/> </port> + <port name="AXISPort" binding="tns:SOAPHttpBinding"> + <soap:address location="http://localhost:8080/axis/services/AddressBook"/> + </port> <port name="JavaPort" binding="tns:JavaBinding"> <java:address className="addressbook.wsiftypes.AddressBook"/> </port> @@ -204,7 +207,9 @@ destinationStyle="queue" jndiConnectionFactoryName="WSIFSampleQCF" initialContextFactory="com.sun.jndi.fscontext.RefFSContextFactory" - jndiProviderURL="file:///JNDI-Directory"/> + jndiProviderURL="file:///JNDI-Directory"> + <jms:propertyValue name="SOAPAction" type="xsd:string" value=" "/> + </jms:address> </port> <port name="NativeJmsPort" binding="tns:NativeJmsBinding"> <jms:address jndiDestinationName="NativeJmsRequestQueue" @@ -212,7 +217,7 @@ jndiConnectionFactoryName="WSIFSampleQCF" initialContextFactory="com.sun.jndi.fscontext.RefFSContextFactory" jndiProviderURL="file:///JNDI-Directory"> - <jms:propertyValue name="JMSReplyTo" type="xsd:string" value="NativeJmsResponseQueue"/> + <jms:propertyValue name="JMSReplyTo" type="xsd:string" value="NativeJmsResponseQueue"/> </jms:address> </port> </service> 1.1 xml-axis-wsif/java/test/addressbook/wsifservice/deploy.wsdd Index: deploy.wsdd =================================================================== <deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"> <service name="AddressBook" provider="java:RPC"> <parameter name="className" value="addressbook.wsiftypes.AddressBook"/> <parameter name="allowedMethods" value="*"/> <parameter name="scope" value="Application"/> <beanMapping qname="ns:address" xmlns:ns="http://wsiftypes.addressbook/" languageSpecificType="java:addressbook.wsiftypes.Address"/> <beanMapping qname="ns:phone" xmlns:ns="http://wsiftypes.addressbook/" languageSpecificType="java:addressbook.wsiftypes.Phone"/> </service> </deployment> 1.11 +11 -0 xml-axis-wsif/java/test/wsif.test.properties Index: wsif.test.properties =================================================================== RCS file: /home/cvs/xml-axis-wsif/java/test/wsif.test.properties,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- wsif.test.properties 7 Dec 2002 12:34:06 -0000 1.10 +++ wsif.test.properties 14 Jan 2003 16:43:19 -0000 1.11 @@ -33,8 +33,19 @@ # jndidestinationnamepattern is used to construct the jndiDestinationName # by replacing the % with Stockquote or AddressBook, etc. # The httpurl is the URL that the bridge will route requests on to. +# +# When using Axis, set ... +# wsif.jms2httpbridge.httpurl=http://localhost:8080/axis/services +# and wsif will append the service name to the url (e.g. AddressBook) +# When using Apache Soap set ... +# wsif.jms2httpbridge.httpurl=http://localhost:8080/soap/servlet/rpcrouter +# wsif.jms2httpbridge.initialcontextfactory=com.sun.jndi.fscontext.RefFSContextFactory wsif.jms2httpbridge.jndidestinationnamepattern=SoapJms%Queue wsif.jms2httpbridge.jndiproviderurl=file:///JNDI-Directory wsif.jms2httpbridge.jndiconnectionfactoryname=WSIFSampleQCF wsif.jms2httpbridge.httpurl=http://localhost:8080/soap/servlet/rpcrouter +# +# wsif.soapserver is either soap or axis depending on whether Apache Soap or +# Apache Axis is being used as a server to run the unit tests against. +wsif.soapserver=soap 1.18 +17 -0 xml-axis-wsif/java/test/util/TestUtilities.java Index: TestUtilities.java =================================================================== RCS file: /home/cvs/xml-axis-wsif/java/test/util/TestUtilities.java,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- TestUtilities.java 9 Dec 2002 16:49:51 -0000 1.17 +++ TestUtilities.java 14 Jan 2003 16:43:19 -0000 1.18 @@ -92,6 +92,10 @@ private static final String WSIF_TEST_PROPERTIES = "wsif.test.properties"; private static final String WSIF_PATH = "wsif.path"; private static final String WSIF_TEST_COMPONENTS = "wsif.test.components"; + private static final String WSIF_SOAP_SERVER = "wsif.soapserver"; + + private static final String SOAP = "soap"; + private static final String AXIS = "axis"; private static BridgeThread jmsAb = null; private static BridgeThread jmsSq = null; @@ -184,6 +188,19 @@ return false; } return true; + } + + /** + * Queries the soap server being used. Can be either Apache Soap or Apache Axis. + * Default is soap. + */ + public static String getSoapServer() { + String prop = getWsifProperty(WSIF_SOAP_SERVER); + if (prop == null) + return SOAP; + if (SOAP.equals(prop) || AXIS.equals(prop)) + return prop; + return SOAP; } public static boolean isJmsVerbose() { 1.3 +9 -2 xml-axis-wsif/java/test/util/BridgeThread.java Index: BridgeThread.java =================================================================== RCS file: /home/cvs/xml-axis-wsif/java/test/util/BridgeThread.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- BridgeThread.java 7 Dec 2002 12:33:56 -0000 1.2 +++ BridgeThread.java 14 Jan 2003 16:43:19 -0000 1.3 @@ -85,6 +85,14 @@ + name + pattern.substring(pattern.indexOf('%') + 1); + String url = + TestUtilities.getWsifProperty("wsif.jms2httpbridge.httpurl"); + if (TestUtilities.getSoapServer().equals("axis")) { + if (!url.endsWith("/")) + url = url.concat("/"); + url = url.concat(name); + } + JMS2HTTPBridge j2h = new JMS2HTTPBridge( TestUtilities.getWsifProperty( @@ -94,8 +102,7 @@ TestUtilities.getWsifProperty( "wsif.jms2httpbridge.jndiconnectionfactoryname"), queue, - TestUtilities.getWsifProperty( - "wsif.jms2httpbridge.httpurl"), + url, JMS2HTTPBridgeDestination.COLDSTART, TestUtilities.isJmsVerbose()); j2h.listen(); 1.20 +5 -4 xml-axis-wsif/java/test/addressbook/AddressBookTest.java Index: AddressBookTest.java =================================================================== RCS file: /home/cvs/xml-axis-wsif/java/test/addressbook/AddressBookTest.java,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- AddressBookTest.java 12 Dec 2002 11:51:04 -0000 1.19 +++ AddressBookTest.java 14 Jan 2003 16:43:19 -0000 1.20 @@ -87,6 +87,7 @@ String wsdlLocation = TestUtilities.getWsdlPath("java\\test\\addressbook\\wsifservice") + "AddressBook.wsdl"; + static String server = TestUtilities.getSoapServer().toUpperCase(); static String name1 = "Purdue Boilermaker"; static Address addr1 = @@ -132,10 +133,10 @@ } public void testAxis() { - doit("SOAPPort", "axis"); + doit(server+"Port", "axis"); } public void testSoap() { - doit("SOAPPort", "soap"); + doit(server+"Port", "soap"); } public void testJava() { doit("JavaPort", "java"); @@ -150,10 +151,10 @@ doit("NativeJmsPort", "" ); } public void testDynamicSOAP() { - doitDyn("SOAPPort", "soap"); + doitDyn(server+"Port", "soap"); } public void testDynamicAxis() { - doitDyn("SOAPPort", "axis"); + doitDyn(server+"Port", "axis"); } public void testDynamicJava() { doitDyn("JavaPort", "java");