dims 2002/06/04 10:50:37 Modified: java/samples/encoding TestElem.java java/src/org/apache/axis/client Service.java java/test build_functional_tests.xml java/test/functional TestElementSample.java Log: - Make TestElementSample pick up the port from JVM properties - Patch Service.java to pick up URL's (eliminate FileInputStream) Revision Changes Path 1.3 +1 -1 xml-axis/java/samples/encoding/TestElem.java Index: TestElem.java =================================================================== RCS file: /home/cvs/xml-axis/java/samples/encoding/TestElem.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- TestElem.java 21 Apr 2002 19:13:15 -0000 1.2 +++ TestElem.java 4 Jun 2002 17:50:37 -0000 1.3 @@ -20,7 +20,7 @@ public static String doit(String[] args,String xml) throws Exception { ByteArrayInputStream bais = new ByteArrayInputStream(xml.getBytes()); - String sURL = "http://localhost:8080/axis/services/ElementService" ; + String sURL = "http://" + args[0] + ":" + args[1] + "/axis/services/ElementService" ; QName sqn = new QName(sURL, "ElementServiceService" ); QName pqn = new QName(sURL, "ElementService" ); 1.54 +8 -15 xml-axis/java/src/org/apache/axis/client/Service.java Index: Service.java =================================================================== RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/client/Service.java,v retrieving revision 1.53 retrieving revision 1.54 diff -u -r1.53 -r1.54 --- Service.java 21 May 2002 15:43:02 -0000 1.53 +++ Service.java 4 Jun 2002 17:50:37 -0000 1.54 @@ -197,22 +197,15 @@ } catch (MalformedURLException mue) { } - try { - // Start by reading in the WSDL using WSDL4J - Definition def = null ; - if ( cachingWSDL && - (def = (Definition) cachedWSDL.get(this.wsdlLocation.toString())) != null ) { - initService( def, serviceName ); - } - else { - FileInputStream fis = new FileInputStream(wsdlLocation); - Document doc = XMLUtils.newDocument(fis); - initService(doc, serviceName); - } + // Start by reading in the WSDL using WSDL4J + Definition def = null ; + if ( cachingWSDL && + (def = (Definition) cachedWSDL.get(this.wsdlLocation.toString())) != null ) { + initService( def, serviceName ); } - catch( FileNotFoundException exp ) { - throw new ServiceException( - JavaUtils.getMessage("wsdlError00", "" + wsdlLocation, "\n" + exp) ); + else { + Document doc = XMLUtils.newDocument(this.wsdlLocation.toString()); + initService(doc, serviceName); } } 1.44 +2 -0 xml-axis/java/test/build_functional_tests.xml Index: build_functional_tests.xml =================================================================== RCS file: /home/cvs/xml-axis/java/test/build_functional_tests.xml,v retrieving revision 1.43 retrieving revision 1.44 diff -u -r1.43 -r1.44 --- build_functional_tests.xml 4 Jun 2002 15:44:19 -0000 1.43 +++ build_functional_tests.xml 4 Jun 2002 17:50:37 -0000 1.44 @@ -98,6 +98,8 @@ <jvmarg value="-Dhttp.nonProxyHosts=${http.nonProxyHosts}"/> <jvmarg value="-Dhttp.proxyUser=${http.proxyUser}"/> <jvmarg value="-Dhttp.proxyPassword=${http.proxyPassword}"/> + <!-- Pass the port for SimpleAxisServer --> + <jvmarg value="-Dtest.functional.SimpleAxisPort=${test.functional.SimpleAxisPort}"/> <classpath refid="test-classpath" /> <formatter type="xml" usefile="${test.functional.usefile}"/> <batchtest todir="${test.functional.reportdir}"> 1.4 +4 -1 xml-axis/java/test/functional/TestElementSample.java Index: TestElementSample.java =================================================================== RCS file: /home/cvs/xml-axis/java/test/functional/TestElementSample.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- TestElementSample.java 21 Apr 2002 19:09:28 -0000 1.3 +++ TestElementSample.java 4 Jun 2002 17:50:37 -0000 1.4 @@ -73,7 +73,10 @@ } public void doTestElement () throws Exception { - String[] args = {}; + String thisHost = "127.0.0.1"; + String thisPort = System.getProperty("test.functional.SimpleAxisPort","8080"); + + String[] args = {thisHost,thisPort}; String xml = "<x:hello xmlns:x=\"urn:foo\">a string</x:hello>"; System.out.println("Sending : " + xml ); String res = new TestElem().doit(args, xml);