Author: richard.opalka(a)jboss.com
Date: 2010-03-19 08:22:32 -0400 (Fri, 19 Mar 2010)
New Revision: 11822
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/config/ConfigFactoryTestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/config/WSDLRequestHandlerTestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/jbossxb/complex/ComplexTypeMarshallerTestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/jbossxb/complex/ComplexTypeUnmarshallerTestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/jbossxb/docstyle/DocumentStyleMarshallerTestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/jbossxb/docstyle/DocumentStyleUnmarshallerTestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/wsdl11/MicrosoftGeneratedWSDLTestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/wsdl11/MultiSchemaTestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/wsdl11/SimpleFileImportTestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/wsdl11/WSDL11TestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/wsdl11/WSDLExtensElemTestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/wsdl11/WSDLTypesTestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/jbws1068/JBWS1068TestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/jbws1190/TestEndpointImpl.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/JBWS1316ConfigurationTestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/jbws1427/JBWS1427TestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/handler/HeaderProxyTestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/RpcDIIConfiguredCallTestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/RpcProxyTestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/jsr109pojo/RpcDIIConfiguredCallTestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/jsr109pojo/RpcProxyTestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/wsdlpublish/TestEndpointImpl.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/xop/XOPTypeDefTestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1857/JBWS1857TestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1999/JBWS1999ConfigurationTestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2248/JBWS2248TestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2285/JBWS2285TestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2319/JBWS2319TestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2319/SOAPHandler.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2526/JBWS2526TestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2927/JBWS2927TestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2949/SOAPHandler1.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2949/SOAPHandler2.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/webserviceref/ServiceRefOverridesTestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/webserviceref/StubPropertyTestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/wspolicy/PolicyMetaDataBuilderTestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/JavaToWSDL11TestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/WSToolsBase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/assertions/WSDL20AssertionsTestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/clientside/ClientSideArtifactsTestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/doclit/ToolsDocLitTestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/holders/StandardHoldersTestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/jaxws/WSContractProviderTestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/jbpapp921/JBPAPP921TestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/jbws1645/JBWS1645TestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/jbws2411/JBWS2411TestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/jbws_204/AnonTypesTestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/jbws_204/NillableTypesTestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/validation/JaxrpcMappingValidator.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/validation/WSDL11ValidationTestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/xmlschema/WSDLTypesTestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/xmlschema/XMLSchemaTestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/xsdjava/SchemaAnnotationsTestCase.java
Log:
[JBWS-2968] removing most of compilation warnings
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/config/ConfigFactoryTestCase.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/config/ConfigFactoryTestCase.java 2010-03-19
11:10:51 UTC (rev 11821)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/config/ConfigFactoryTestCase.java 2010-03-19
12:22:32 UTC (rev 11822)
@@ -31,7 +31,6 @@
import org.jboss.ws.extensions.wsrm.config.RMDeliveryAssuranceConfig;
import org.jboss.ws.extensions.wsrm.config.RMMessageRetransmissionConfig;
import org.jboss.ws.extensions.wsrm.config.RMPortConfig;
-import org.jboss.ws.metadata.config.EndpointProperty;
import org.jboss.ws.metadata.config.JBossWSConfigFactory;
import org.jboss.ws.metadata.config.jaxrpc.CommonConfigJAXRPC;
import org.jboss.ws.metadata.config.jaxrpc.ConfigRootJAXRPC;
@@ -57,7 +56,7 @@
assertTrue(confFile.exists());
JBossWSConfigFactory factory = JBossWSConfigFactory.newInstance();
- ConfigRootJAXRPC config = (ConfigRootJAXRPC)factory.parse(confFile.toURL());
+ ConfigRootJAXRPC config =
(ConfigRootJAXRPC)factory.parse(confFile.toURI().toURL());
assertNotNull("Null config", config);
@@ -84,7 +83,7 @@
assertTrue(confFile.exists());
JBossWSConfigFactory factory = JBossWSConfigFactory.newInstance();
- ConfigRootJAXWS config = (ConfigRootJAXWS)factory.parse(confFile.toURL());
+ ConfigRootJAXWS config = (ConfigRootJAXWS)factory.parse(confFile.toURI().toURL());
assertNotNull("Null config", config);
EndpointConfigJAXWS epConfig =
(EndpointConfigJAXWS)config.getConfigByName("Standard MTOM Endpoint");
@@ -100,7 +99,7 @@
File confFile =
getResourceFile("common/config/jaxrpc-endpoint-config.xml");
assertTrue(confFile.exists());
JBossWSConfigFactory factory = JBossWSConfigFactory.newInstance();
- ConfigRootJAXRPC config = (ConfigRootJAXRPC)factory.parse(confFile.toURL());
+ ConfigRootJAXRPC config =
(ConfigRootJAXRPC)factory.parse(confFile.toURI().toURL());
assertNotNull("Null config", config);
CommonConfigJAXRPC epConfig =
(CommonConfigJAXRPC)config.getConfigByName("Standard MTOM Endpoint");
@@ -117,11 +116,11 @@
assertTrue(confFile.exists());
JBossWSConfigFactory factory = JBossWSConfigFactory.newInstance();
- ConfigRootJAXWS config = (ConfigRootJAXWS)factory.parse(confFile.toURL());
+ ConfigRootJAXWS config = (ConfigRootJAXWS)factory.parse(confFile.toURI().toURL());
assertNotNull("Null config", config);
EndpointConfigJAXWS epConfig =
(EndpointConfigJAXWS)config.getConfigByName("Standard WSSecurity Endpoint");
- String value = epConfig.getProperty(EndpointProperty.MTOM_THRESHOLD);
+ String value =
epConfig.getProperty("http://org.jboss.ws/mtom#threshold");
assertNotNull("Property does not exist", value);
assertEquals("Wrong property valule", value, "5000");
}
@@ -132,7 +131,7 @@
assertTrue(confFile.exists());
JBossWSConfigFactory factory = JBossWSConfigFactory.newInstance();
- ConfigRootJAXWS config = (ConfigRootJAXWS)factory.parse(confFile.toURL());
+ ConfigRootJAXWS config = (ConfigRootJAXWS)factory.parse(confFile.toURI().toURL());
EndpointConfigJAXWS epConfig =
(EndpointConfigJAXWS)config.getConfigByName("Standard WSRM Endpoint");
RMConfig wsrmConfig = epConfig.getRMMetaData();
assertNotNull(wsrmConfig);
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/config/WSDLRequestHandlerTestCase.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/config/WSDLRequestHandlerTestCase.java 2010-03-19
11:10:51 UTC (rev 11821)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/config/WSDLRequestHandlerTestCase.java 2010-03-19
12:22:32 UTC (rev 11822)
@@ -160,7 +160,7 @@
@Override
protected InputStream openStreamToWSDL() throws IOException
{
- return testWsdl.toURL().openStream();
+ return testWsdl.toURI().toURL().openStream();
}
}
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/jbossxb/complex/ComplexTypeMarshallerTestCase.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/jbossxb/complex/ComplexTypeMarshallerTestCase.java 2010-03-19
11:10:51 UTC (rev 11821)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/jbossxb/complex/ComplexTypeMarshallerTestCase.java 2010-03-19
12:22:32 UTC (rev 11822)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.common.jbossxb.complex;
-import java.io.File;
import java.io.StringWriter;
import java.math.BigInteger;
import java.net.URL;
@@ -50,10 +49,7 @@
/** Get the URL to the defining schema */
protected XSModel getSchemaModel(QName xmlType, Class javaType) throws Exception
{
- File xsdFile =
getResourceFile("common/jbossxb/ComplexTypesService_RPC.xsd");
- assertTrue(xsdFile.exists());
-
- return parseSchema(xsdFile.toURL());
+ return
parseSchema(getResourceURL("common/jbossxb/ComplexTypesService_RPC.xsd"));
}
public void testBaseType() throws Exception
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/jbossxb/complex/ComplexTypeUnmarshallerTestCase.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/jbossxb/complex/ComplexTypeUnmarshallerTestCase.java 2010-03-19
11:10:51 UTC (rev 11821)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/jbossxb/complex/ComplexTypeUnmarshallerTestCase.java 2010-03-19
12:22:32 UTC (rev 11822)
@@ -22,7 +22,6 @@
package org.jboss.test.ws.common.jbossxb.complex;
import java.io.ByteArrayInputStream;
-import java.io.File;
import java.math.BigInteger;
import java.net.URL;
@@ -50,10 +49,7 @@
/** Get the URL to the defining schema */
protected XSModel getSchemaModel(QName xmlType, Class javaType) throws Exception
{
- File xsdFile =
getResourceFile("common/jbossxb/ComplexTypesService_RPC.xsd");
- assertTrue(xsdFile.exists());
-
- return new JavaToXSD().parseSchema(xsdFile.toURL());
+ return new
JavaToXSD().parseSchema(getResourceURL("common/jbossxb/ComplexTypesService_RPC.xsd"));
}
public void testBaseType() throws Exception
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/jbossxb/docstyle/DocumentStyleMarshallerTestCase.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/jbossxb/docstyle/DocumentStyleMarshallerTestCase.java 2010-03-19
11:10:51 UTC (rev 11821)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/jbossxb/docstyle/DocumentStyleMarshallerTestCase.java 2010-03-19
12:22:32 UTC (rev 11822)
@@ -52,7 +52,7 @@
File xsdFile = getResourceFile("common/jbossxb/DocumentStyle.xsd");
assertTrue(xsdFile.exists());
- return parseSchema(xsdFile.toURL());
+ return parseSchema(xsdFile.toURI().toURL());
}
/** Release the schema URL, used for removing temp files */
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/jbossxb/docstyle/DocumentStyleUnmarshallerTestCase.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/jbossxb/docstyle/DocumentStyleUnmarshallerTestCase.java 2010-03-19
11:10:51 UTC (rev 11821)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/jbossxb/docstyle/DocumentStyleUnmarshallerTestCase.java 2010-03-19
12:22:32 UTC (rev 11822)
@@ -47,10 +47,7 @@
protected XSModel getSchemaModel() throws Exception
{
- File xsdFile = getResourceFile("common/jbossxb/DocumentStyle.xsd");
- assertTrue(xsdFile.exists());
-
- return parseSchema(xsdFile.toURL());
+ return parseSchema(getResourceURL("common/jbossxb/DocumentStyle.xsd"));
}
public void testEchoStringRequest() throws Exception
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/wsdl11/MicrosoftGeneratedWSDLTestCase.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/wsdl11/MicrosoftGeneratedWSDLTestCase.java 2010-03-19
11:10:51 UTC (rev 11821)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/wsdl11/MicrosoftGeneratedWSDLTestCase.java 2010-03-19
12:22:32 UTC (rev 11822)
@@ -21,7 +21,7 @@
*/
package org.jboss.test.ws.common.wsdl11;
-import java.io.File;
+import java.net.URL;
import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
import org.jboss.ws.metadata.wsdl.WSDLTypes;
@@ -40,12 +40,9 @@
{
public void testBaseRpcLit() throws Exception
{
- File wsdlFile =
getResourceFile("common/wsdl11/microsoft-interop/rpclit/BaseTypesRpcLit.wsdl");
- assertTrue(wsdlFile.exists());
-
-
+ URL wsdlFile =
getResourceURL("common/wsdl11/microsoft-interop/rpclit/BaseTypesRpcLit.wsdl");
WSDLDefinitionsFactory factory = WSDLDefinitionsFactory.newInstance();
- WSDLDefinitions wsdlDefinitions = factory.parse(wsdlFile.toURL());
+ WSDLDefinitions wsdlDefinitions = factory.parse(wsdlFile);
// check if the schema has been extracted
WSDLTypes wsdlTypes = wsdlDefinitions.getWsdlTypes();
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/wsdl11/MultiSchemaTestCase.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/wsdl11/MultiSchemaTestCase.java 2010-03-19
11:10:51 UTC (rev 11821)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/wsdl11/MultiSchemaTestCase.java 2010-03-19
12:22:32 UTC (rev 11822)
@@ -21,7 +21,7 @@
*/
package org.jboss.test.ws.common.wsdl11;
-import java.io.File;
+import java.net.URL;
import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
import org.jboss.ws.metadata.wsdl.WSDLTypes;
@@ -39,11 +39,9 @@
{
public void testMultipleSchemas() throws Exception
{
- File wsdlFile =
getResourceFile("jaxrpc/marshall-rpclit/WEB-INF/wsdl/MarshallService.wsdl");
- assertTrue(wsdlFile.exists());
-
+ URL wsdlFile =
getResourceURL("jaxrpc/marshall-rpclit/WEB-INF/wsdl/MarshallService.wsdl");
WSDLDefinitionsFactory factory = WSDLDefinitionsFactory.newInstance();
- WSDLDefinitions wsdlDefinitions = factory.parse(wsdlFile.toURL());
+ WSDLDefinitions wsdlDefinitions = factory.parse(wsdlFile);
// check if all schemas have been extracted
WSDLTypes wsdlTypes = wsdlDefinitions.getWsdlTypes();
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/wsdl11/SimpleFileImportTestCase.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/wsdl11/SimpleFileImportTestCase.java 2010-03-19
11:10:51 UTC (rev 11821)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/wsdl11/SimpleFileImportTestCase.java 2010-03-19
12:22:32 UTC (rev 11822)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.common.wsdl11;
-import java.io.File;
import java.net.URL;
import javax.wsdl.Definition;
@@ -45,14 +44,11 @@
public void testFileURL() throws Exception
{
- File wsdlFile = new File(WSDL_LOCATION);
- assertTrue("File does not exist: " + wsdlFile.getCanonicalPath(),
wsdlFile.exists());
-
// Setting the URLStreamHandlerFactory simulates the behaviour in JBoss
// [JBWS-2948] commented to prevent setting wrong stream handler with VFS3
//internalInitURLHandlers();
- URL wsdlURL = wsdlFile.toURL();
+ URL wsdlURL = getResourceURL(WSDL_LOCATION);
Definition wsdlDefinition = WSDL11DefinitionFactory.newInstance().parse(wsdlURL);
assertNotNull(wsdlDefinition);
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/wsdl11/WSDL11TestCase.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/wsdl11/WSDL11TestCase.java 2010-03-19
11:10:51 UTC (rev 11821)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/wsdl11/WSDL11TestCase.java 2010-03-19
12:22:32 UTC (rev 11822)
@@ -23,6 +23,7 @@
import java.io.File;
import java.io.Writer;
+import java.net.URL;
import java.util.List;
import javax.xml.namespace.QName;
@@ -61,11 +62,10 @@
public void testDocLitSimple() throws Exception
{
- File wsdlFile = getResourceFile("common/wsdl11/DocLitSimple.wsdl");
- assertTrue(wsdlFile.exists());
+ URL wsdlFile = getResourceURL("common/wsdl11/DocLitSimple.wsdl");
WSDLDefinitionsFactory factory = WSDLDefinitionsFactory.newInstance();
- WSDLDefinitions wsdlDefinitions = factory.parse(wsdlFile.toURL());
+ WSDLDefinitions wsdlDefinitions = factory.parse(wsdlFile);
WSDLInterface wsdlInterface = wsdlDefinitions.getInterface(new
QName(wsdlDefinitions.getTargetNamespace(), "JaxRpcTestService"));
// check if the schema has been extracted
@@ -107,21 +107,18 @@
public void testRpcLitSimple() throws Exception
{
- verifyRPC(getResourceFile("common/wsdl11/RpcLitSimple.wsdl").getPath());
+ verifyRPC(getResourceURL("common/wsdl11/RpcLitSimple.wsdl"));
}
public void testRpcLitImport() throws Exception
{
- verifyRPC(getResourceFile("common/wsdl11/RpcLitImport.wsdl").getPath());
+ verifyRPC(getResourceURL("common/wsdl11/RpcLitImport.wsdl"));
}
- private void verifyRPC(String fileName) throws Exception
+ private void verifyRPC(URL wsdlFile) throws Exception
{
- File wsdlFile = new File(fileName);
- assertTrue(wsdlFile.exists());
-
WSDLDefinitionsFactory factory = WSDLDefinitionsFactory.newInstance();
- WSDLDefinitions wsdlDefinitions = factory.parse(wsdlFile.toURL());
+ WSDLDefinitions wsdlDefinitions = factory.parse(wsdlFile);
WSDLInterface wsdlInterface = wsdlDefinitions.getInterface(new
QName(wsdlDefinitions.getTargetNamespace(), "JaxRpcTestService"));
// check if the schema has been extracted
@@ -158,11 +155,10 @@
public void testEventSourceBinding() throws Exception
{
- File wsdlFile =
getResourceFile("common/wsdl11/inherit/wind_inherit.wsdl");
- assertTrue(wsdlFile.exists());
+ URL wsdlFile =
getResourceURL("common/wsdl11/inherit/wind_inherit.wsdl");
WSDLDefinitionsFactory factory = WSDLDefinitionsFactory.newInstance();
- WSDLDefinitions wsdlDefinitions = factory.parse(wsdlFile.toURL());
+ WSDLDefinitions wsdlDefinitions = factory.parse(wsdlFile);
WSDLService service = wsdlDefinitions.getService(new
QName("http://schemas.xmlsoap.org/ws/2004/08/eventing",
"EventingService"));
assertNotNull(service);
@@ -184,11 +180,10 @@
public void testSwaMessages() throws Exception
{
- File wsdlFile = getResourceFile("common/wsdl11/SwaTestService.wsdl");
- assertTrue(wsdlFile.exists());
+ URL wsdlFile = getResourceURL("common/wsdl11/SwaTestService.wsdl");
WSDLDefinitionsFactory factory = WSDLDefinitionsFactory.newInstance();
- WSDLDefinitions wsdlDefinitions = factory.parse(wsdlFile.toURL());
+ WSDLDefinitions wsdlDefinitions = factory.parse(wsdlFile);
assertNotNull(wsdlDefinitions); // should throw an Exception when SWA parts are not
skipped
}
@@ -198,18 +193,16 @@
public void testPolicyAttachment() throws Exception
{
- File wsdlFile = getResourceFile("common/wsdl11/PolicyAttachment.wsdl");
- assertTrue(wsdlFile.exists());
+ URL wsdlFile = getResourceURL("common/wsdl11/PolicyAttachment.wsdl");
testPolicyAttachment(wsdlFile);
- wsdlFile =
getResourceFile("common/wsdl11/PolicyAttachmentFragment.wsdl");
- assertTrue(wsdlFile.exists());
+ wsdlFile =
getResourceURL("common/wsdl11/PolicyAttachmentFragment.wsdl");
testPolicyAttachment(wsdlFile);
}
- private void testPolicyAttachment(File wsdlFile) throws Exception
+ private void testPolicyAttachment(URL wsdlFile) throws Exception
{
WSDLDefinitionsFactory factory = WSDLDefinitionsFactory.newInstance();
- WSDLDefinitions wsdlDefinitions = factory.parse(wsdlFile.toURL());
+ WSDLDefinitions wsdlDefinitions = factory.parse(wsdlFile);
assertNotNull(wsdlDefinitions);
List<WSDLExtensibilityElement> list =
wsdlDefinitions.getExtensibilityElements(Constants.WSDL_ELEMENT_POLICY);
assertNotNull(list);
@@ -227,16 +220,16 @@
public void testServicePolicyRef() throws Exception
{
- File wsdlFile = getResourceFile("common/wsdl11/PolicyAttachment.wsdl");
+ URL wsdlFile = getResourceURL("common/wsdl11/PolicyAttachment.wsdl");
testServicePolicyRef(wsdlFile);
- wsdlFile =
getResourceFile("common/wsdl11/PolicyAttachmentFragment.wsdl");
+ wsdlFile =
getResourceURL("common/wsdl11/PolicyAttachmentFragment.wsdl");
testServicePolicyRef(wsdlFile);
}
- public void testServicePolicyRef(File wsdlFile) throws Exception
+ public void testServicePolicyRef(URL wsdlFile) throws Exception
{
WSDLDefinitionsFactory factory = WSDLDefinitionsFactory.newInstance();
- WSDLDefinitions wsdlDefinitions = factory.parse(wsdlFile.toURL());
+ WSDLDefinitions wsdlDefinitions = factory.parse(wsdlFile);
WSDLService wsdlService = wsdlDefinitions.getServices()[0];
List<WSDLExtensibilityElement> list = wsdlService.getExtensibilityElements(
Constants.WSDL_ELEMENT_POLICYREFERENCE);
@@ -247,16 +240,16 @@
public void testEndpointPolicyRef() throws Exception
{
- File wsdlFile = getResourceFile("common/wsdl11/PolicyAttachment.wsdl");
+ URL wsdlFile = getResourceURL("common/wsdl11/PolicyAttachment.wsdl");
testEndpointPolicyRef(wsdlFile);
- wsdlFile =
getResourceFile("common/wsdl11/PolicyAttachmentFragment.wsdl");
+ wsdlFile =
getResourceURL("common/wsdl11/PolicyAttachmentFragment.wsdl");
testEndpointPolicyRef(wsdlFile);
}
- public void testEndpointPolicyRef(File wsdlFile) throws Exception
+ public void testEndpointPolicyRef(URL wsdlFile) throws Exception
{
WSDLDefinitionsFactory factory = WSDLDefinitionsFactory.newInstance();
- WSDLDefinitions wsdlDefinitions = factory.parse(wsdlFile.toURL());
+ WSDLDefinitions wsdlDefinitions = factory.parse(wsdlFile);
WSDLService wsdlService = wsdlDefinitions.getServices()[0];
WSDLEndpoint wsdlEndpoint = wsdlService.getEndpoints()[0];
@@ -305,7 +298,7 @@
fw.close();
//parse the obtained file and validate the resulting wsdl metadata model against
the first one
- WSDLDefinitions newWsdlDefinitions = factory.parse(new
File(wsdlDir+"/GeneratedWsdlWithPolicies.wsdl").toURL());
+ WSDLDefinitions newWsdlDefinitions = factory.parse(new
File(wsdlDir+"/GeneratedWsdlWithPolicies.wsdl").toURI().toURL());
assertNotNull(newWsdlDefinitions);
WSDLValidator validator = new WSDLValidator();
assertTrue(validator.validate(wsdlDefinitions,newWsdlDefinitions));
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/wsdl11/WSDLExtensElemTestCase.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/wsdl11/WSDLExtensElemTestCase.java 2010-03-19
11:10:51 UTC (rev 11821)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/wsdl11/WSDLExtensElemTestCase.java 2010-03-19
12:22:32 UTC (rev 11822)
@@ -21,7 +21,7 @@
*/
package org.jboss.test.ws.common.wsdl11;
-import java.io.File;
+import java.net.URL;
import java.util.List;
import javax.xml.namespace.QName;
@@ -47,11 +47,10 @@
{
public void testPolicyEndpointExtensibilityElements() throws Exception
{
- File wsdlFile = getResourceFile("common/wsdl11/PolicyAttachment.wsdl");
- assertTrue(wsdlFile.exists());
+ URL wsdlFile = getResourceURL("common/wsdl11/PolicyAttachment.wsdl");
WSDLDefinitionsFactory factory = WSDLDefinitionsFactory.newInstance();
- WSDLDefinitions wsdlDefinitions = factory.parse(wsdlFile.toURL());
+ WSDLDefinitions wsdlDefinitions = factory.parse(wsdlFile);
WSDLService wsdlService = wsdlDefinitions.getServices()[0];
WSDLEndpoint wsdlEndpoint = wsdlService.getEndpoints()[0];
@@ -78,11 +77,10 @@
public void testPolicyAndUnkwnownEndpointExtensibilityElements() throws Exception
{
- File wsdlFile =
getResourceFile("common/wsdl11/PolicyAttachmentAndUnknownExtElem.wsdl");
- assertTrue(wsdlFile.exists());
+ URL wsdlFile =
getResourceURL("common/wsdl11/PolicyAttachmentAndUnknownExtElem.wsdl");
WSDLDefinitionsFactory factory = WSDLDefinitionsFactory.newInstance();
- WSDLDefinitions wsdlDefinitions = factory.parse(wsdlFile.toURL());
+ WSDLDefinitions wsdlDefinitions = factory.parse(wsdlFile);
WSDLService wsdlService = wsdlDefinitions.getServices()[0];
WSDLEndpoint wsdlEndpoint = wsdlService.getEndpoints()[0];
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/wsdl11/WSDLTypesTestCase.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/wsdl11/WSDLTypesTestCase.java 2010-03-19
11:10:51 UTC (rev 11821)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/wsdl11/WSDLTypesTestCase.java 2010-03-19
12:22:32 UTC (rev 11822)
@@ -21,7 +21,7 @@
*/
package org.jboss.test.ws.common.wsdl11;
-import java.io.File;
+import java.net.URL;
import org.apache.xerces.xs.XSTypeDefinition;
import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
@@ -40,11 +40,10 @@
{
public void testIncludedSchema() throws Exception
{
- File wsdlLocation =
getResourceFile("tools/wsdl11/TestServiceXsdInclude.wsdl");
- assertTrue(wsdlLocation.exists());
+ URL wsdlLocation =
getResourceURL("tools/wsdl11/TestServiceXsdInclude.wsdl");
WSDLDefinitionsFactory factory = WSDLDefinitionsFactory.newInstance();
- WSDLDefinitions wsdlDefinitions = factory.parse(wsdlLocation.toURL());
+ WSDLDefinitions wsdlDefinitions = factory.parse(wsdlLocation);
JBossXSModel xsModel = WSDLUtils.getSchemaModel(wsdlDefinitions.getWsdlTypes());
XSTypeDefinition typeDefinition =
xsModel.getTypeDefinition("SimpleUserType",
"http://org.jboss.ws/jaxrpc/types");
@@ -53,11 +52,10 @@
public void testImportedSchema() throws Exception
{
- File wsdlLocation =
getResourceFile("tools/wsdl11/TestServiceXsdImport.wsdl");
- assertTrue(wsdlLocation.exists());
+ URL wsdlLocation =
getResourceURL("tools/wsdl11/TestServiceXsdImport.wsdl");
WSDLDefinitionsFactory factory = WSDLDefinitionsFactory.newInstance();
- WSDLDefinitions wsdlDefinitions = factory.parse(wsdlLocation.toURL());
+ WSDLDefinitions wsdlDefinitions = factory.parse(wsdlLocation);
JBossXSModel xsModel = WSDLUtils.getSchemaModel(wsdlDefinitions.getWsdlTypes());
XSTypeDefinition typeDefinition =
xsModel.getTypeDefinition("SimpleUserType",
"http://org.jboss.ws/jaxrpc/types");
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/jbws1068/JBWS1068TestCase.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/jbws1068/JBWS1068TestCase.java 2010-03-19
11:10:51 UTC (rev 11821)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/jbws1068/JBWS1068TestCase.java 2010-03-19
12:22:32 UTC (rev 11822)
@@ -43,6 +43,7 @@
assertTrue(wsdlFile.exists());
WSDLDefinitionsFactory factory = WSDLDefinitionsFactory.newInstance();
- WSDLDefinitions wsdlDefinitions = factory.parse(wsdlFile.toURL());
+ WSDLDefinitions wsdlDefinitions = factory.parse(wsdlFile.toURI().toURL());
+ assertNotNull(wsdlDefinitions);
}
}
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/jbws1190/TestEndpointImpl.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/jbws1190/TestEndpointImpl.java 2010-03-19
11:10:51 UTC (rev 11821)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/jbws1190/TestEndpointImpl.java 2010-03-19
12:22:32 UTC (rev 11822)
@@ -68,7 +68,7 @@
WSDLDefinitions wsdl;
try
{
- wsdl = factory.parse(wsdls[0].toURL());
+ wsdl = factory.parse(wsdls[0].toURI().toURL());
}
catch (MalformedURLException e)
{
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/JBWS1316ConfigurationTestCase.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/JBWS1316ConfigurationTestCase.java 2010-03-19
11:10:51 UTC (rev 11821)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/JBWS1316ConfigurationTestCase.java 2010-03-19
12:22:32 UTC (rev 11822)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxrpc.jbws1316;
-import java.io.File;
import java.io.IOException;
import org.jboss.ws.metadata.wsse.TimestampVerification;
@@ -40,10 +39,8 @@
private WSSecurityConfiguration load(final String fileName) throws IOException
{
- File configFile = getResourceFile("jaxrpc/jbws1316/config/" + fileName);
WSSecurityOMFactory factory = WSSecurityOMFactory.newInstance();
-
- return factory.parse(configFile.toURL());
+ return factory.parse(getResourceURL("jaxrpc/jbws1316/config/" +
fileName));
}
/**
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/jbws1427/JBWS1427TestCase.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/jbws1427/JBWS1427TestCase.java 2010-03-19
11:10:51 UTC (rev 11821)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/jbws1427/JBWS1427TestCase.java 2010-03-19
12:22:32 UTC (rev 11822)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxrpc.jbws1427;
-import java.io.File;
import java.net.URL;
import javax.xml.namespace.QName;
@@ -73,10 +72,8 @@
public final void testWsdlParser() throws Exception
{
WSDLDefinitionsFactory factory = WSDLDefinitionsFactory.newInstance();
- File wsdlFile =
getResourceFile("jaxrpc/jbws1427/META-INF/wsdl/ProcessClaim.wsdl");
- assertTrue("File exists: " + wsdlFile, wsdlFile.exists());
-
- factory.parse(wsdlFile.toURL());
+ URL wsdlFile =
getResourceURL("jaxrpc/jbws1427/META-INF/wsdl/ProcessClaim.wsdl");
+ factory.parse(wsdlFile);
}
public final void testEndpointAccess() throws Exception
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/handler/HeaderProxyTestCase.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/handler/HeaderProxyTestCase.java 2010-03-19
11:10:51 UTC (rev 11821)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/handler/HeaderProxyTestCase.java 2010-03-19
12:22:32 UTC (rev 11822)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxrpc.samples.handler;
-import java.io.File;
import java.net.URL;
import javax.xml.namespace.QName;
@@ -61,13 +60,11 @@
if (endpoint == null)
{
- File javaWsdlMappingFile =
getResourceFile("jaxrpc/samples/handler/WEB-INF/jaxrpc-mapping.xml");
- assertTrue(javaWsdlMappingFile.exists());
-
+ URL javaWsdlMappingFile =
getResourceURL("jaxrpc/samples/handler/WEB-INF/jaxrpc-mapping.xml");
QName serviceName = new QName(NAMESPACE_URI, "TestService");
ServiceFactoryImpl factory = new ServiceFactoryImpl();
URL wsdlLocation = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
- ServiceImpl service = (ServiceImpl)factory.createService(wsdlLocation,
serviceName, javaWsdlMappingFile.toURL());
+ ServiceImpl service = (ServiceImpl)factory.createService(wsdlLocation,
serviceName, javaWsdlMappingFile);
endpoint = (HeaderTestService)service.getPort(HeaderTestService.class);
}
}
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/RpcDIIConfiguredCallTestCase.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/RpcDIIConfiguredCallTestCase.java 2010-03-19
11:10:51 UTC (rev 11821)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/RpcDIIConfiguredCallTestCase.java 2010-03-19
12:22:32 UTC (rev 11822)
@@ -66,7 +66,7 @@
ServiceFactoryImpl factory = new ServiceFactoryImpl();
URL wsdlLocation = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
QName serviceName = new QName(TARGET_NAMESPACE, "TestService");
- ServiceImpl service = (ServiceImpl)factory.createService(wsdlLocation,
serviceName, javaWsdlMappingFile.toURL());
+ ServiceImpl service = (ServiceImpl)factory.createService(wsdlLocation,
serviceName, javaWsdlMappingFile.toURI().toURL());
call = service.createCall();
}
}
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/RpcProxyTestCase.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/RpcProxyTestCase.java 2010-03-19
11:10:51 UTC (rev 11821)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/RpcProxyTestCase.java 2010-03-19
12:22:32 UTC (rev 11822)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxrpc.samples.jsr109ejb;
-import java.io.File;
import java.net.URL;
import javax.xml.namespace.QName;
@@ -57,13 +56,11 @@
if (port == null)
{
- File javaWsdlMappingFile =
getResourceFile("jaxrpc/samples/jsr109ejb/rpclit/META-INF/jaxrpc-mapping.xml");
- assertTrue(javaWsdlMappingFile.exists());
-
+ URL javaWsdlMappingFile =
getResourceURL("jaxrpc/samples/jsr109ejb/rpclit/META-INF/jaxrpc-mapping.xml");
QName serviceName = new QName(TARGET_NAMESPACE, "TestService");
ServiceFactoryImpl factory = new ServiceFactoryImpl();
URL wsdlLocation = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
- ServiceImpl service = (ServiceImpl)factory.createService(wsdlLocation,
serviceName, javaWsdlMappingFile.toURL());
+ ServiceImpl service = (ServiceImpl)factory.createService(wsdlLocation,
serviceName, javaWsdlMappingFile);
port = (JaxRpcTestService)service.getPort(JaxRpcTestService.class);
}
}
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/jsr109pojo/RpcDIIConfiguredCallTestCase.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/jsr109pojo/RpcDIIConfiguredCallTestCase.java 2010-03-19
11:10:51 UTC (rev 11821)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/jsr109pojo/RpcDIIConfiguredCallTestCase.java 2010-03-19
12:22:32 UTC (rev 11822)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxrpc.samples.jsr109pojo;
-import java.io.File;
import java.net.URL;
import java.util.List;
import java.util.Map;
@@ -60,13 +59,13 @@
if (call == null)
{
- File javaWsdlMappingFile =
getResourceFile("jaxrpc/samples/jsr109pojo/rpclit/WEB-INF/jaxrpc-mapping.xml");
- assertTrue(javaWsdlMappingFile.exists());
+ URL javaWsdlMappingFile =
getResourceURL("jaxrpc/samples/jsr109pojo/rpclit/WEB-INF/jaxrpc-mapping.xml");
+ assertNotNull(javaWsdlMappingFile);
ServiceFactoryImpl factory = new ServiceFactoryImpl();
URL wsdlLocation = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
QName serviceName = new QName(TARGET_NAMESPACE, "TestService");
- ServiceImpl service = (ServiceImpl)factory.createService(wsdlLocation,
serviceName, javaWsdlMappingFile.toURL());
+ ServiceImpl service = (ServiceImpl)factory.createService(wsdlLocation,
serviceName, javaWsdlMappingFile);
call = service.createCall();
}
}
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/jsr109pojo/RpcProxyTestCase.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/jsr109pojo/RpcProxyTestCase.java 2010-03-19
11:10:51 UTC (rev 11821)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/jsr109pojo/RpcProxyTestCase.java 2010-03-19
12:22:32 UTC (rev 11822)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxrpc.samples.jsr109pojo;
-import java.io.File;
import java.net.URL;
import javax.xml.namespace.QName;
@@ -57,13 +56,11 @@
if (endpoint == null)
{
- File javaWsdlMappingFile =
getResourceFile("jaxrpc/samples/jsr109pojo/rpclit/WEB-INF/jaxrpc-mapping.xml");
- assertTrue(javaWsdlMappingFile.exists());
-
+ URL javaWsdlMappingFile =
getResourceURL("jaxrpc/samples/jsr109pojo/rpclit/WEB-INF/jaxrpc-mapping.xml");
QName serviceName = new QName(TARGET_NAMESPACE, "TestService");
ServiceFactoryImpl factory = new ServiceFactoryImpl();
URL wsdlLocation = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
- ServiceImpl service = (ServiceImpl)factory.createService(wsdlLocation,
serviceName, javaWsdlMappingFile.toURL());
+ ServiceImpl service = (ServiceImpl)factory.createService(wsdlLocation,
serviceName, javaWsdlMappingFile);
endpoint = (JaxRpcTestService)service.getPort(JaxRpcTestService.class);
}
}
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/wsdlpublish/TestEndpointImpl.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/wsdlpublish/TestEndpointImpl.java 2010-03-19
11:10:51 UTC (rev 11821)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/wsdlpublish/TestEndpointImpl.java 2010-03-19
12:22:32 UTC (rev 11822)
@@ -44,7 +44,7 @@
QName portType = null;
try
{
- URL wsdlURL = new File(wsdlPath).toURL();
+ URL wsdlURL = new File(wsdlPath).toURI().toURL();
WSDLDefinitions wsdl = WSDLDefinitionsFactory.newInstance().parse(wsdlURL);
portType = wsdl.getInterfaces()[0].getName();
}
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/xop/XOPTypeDefTestCase.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/xop/XOPTypeDefTestCase.java 2010-03-19
11:10:51 UTC (rev 11821)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/xop/XOPTypeDefTestCase.java 2010-03-19
12:22:32 UTC (rev 11822)
@@ -21,8 +21,6 @@
*/
package org.jboss.test.ws.jaxrpc.xop;
-import java.io.File;
-
import org.apache.xerces.xs.XSComplexTypeDefinition;
import org.apache.xerces.xs.XSModel;
import org.apache.xerces.xs.XSTypeDefinition;
@@ -45,10 +43,7 @@
public void testCircularReferences() throws Exception
{
SchemaUtils utils = SchemaUtils.getInstance();
- File f = getResourceFile("jaxrpc/xop/circular.xsd");
- assertTrue("Unable to load schema file " + f.getAbsolutePath(),
f.exists());
-
- XSModel xsModel = utils.parseSchema(f.toURL());
+ XSModel xsModel =
utils.parseSchema(getResourceURL("jaxrpc/xop/circular.xsd"));
assertNotNull(xsModel);
WSSchemaUtils wsUtil = WSSchemaUtils.getInstance(new NamespaceRegistry(),
"http://complex.jsr181.jaxws.ws.test.jboss.org/jaws");
JBossXSModel schemaModel = wsUtil.getJBossXSModel(xsModel);
@@ -70,10 +65,7 @@
public void testXOPElementScan() throws Exception
{
SchemaUtils utils = SchemaUtils.getInstance();
- File f = getResourceFile("jaxrpc/xop/schema.xsd");
- assertTrue("Unable to load schema file " + f.getAbsolutePath(),
f.exists());
-
- XSModel xsModel = utils.parseSchema(f.toURL());
+ XSModel xsModel =
utils.parseSchema(getResourceURL("jaxrpc/xop/schema.xsd"));
assertNotNull(xsModel);
WSSchemaUtils wsUtil = WSSchemaUtils.getInstance(new NamespaceRegistry(),
"http://jboss.org/test/ws/xop/doclit");
JBossXSModel schemaModel = wsUtil.getJBossXSModel(xsModel);
@@ -109,10 +101,7 @@
{
SchemaUtils utils = SchemaUtils.getInstance();
- File f = getResourceFile("jaxrpc/xop/schema.xsd");
- assertTrue("Unable to load schema file " + f.getAbsolutePath(),
f.exists());
-
- XSModel xsModel = utils.parseSchema(f.toURL());
+ XSModel xsModel =
utils.parseSchema(getResourceURL("jaxrpc/xop/schema.xsd"));
assertNotNull(xsModel);
WSSchemaUtils wsUtil = WSSchemaUtils.getInstance(new NamespaceRegistry(),
"http://jboss.org/test/ws/xop/doclit");
JBossXSModel schemaModel = wsUtil.getJBossXSModel(xsModel);
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1857/JBWS1857TestCase.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1857/JBWS1857TestCase.java 2010-03-19
11:10:51 UTC (rev 11821)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1857/JBWS1857TestCase.java 2010-03-19
12:22:32 UTC (rev 11822)
@@ -21,7 +21,7 @@
*/
package org.jboss.test.ws.jaxws.jbws1857;
-import java.io.File;
+import java.net.URL;
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
@@ -47,9 +47,9 @@
public void testPortCreation() throws Exception
{
- File wsdlFile =
getResourceFile("jaxws/jbws1857/StammdatenService.wsdl");
+ URL wsdlFile = getResourceURL("jaxws/jbws1857/StammdatenService.wsdl");
QName serviceName = new QName("http://example.com",
"StammdatenService");
- Service service = Service.create(wsdlFile.toURL(), serviceName);
+ Service service = Service.create(wsdlFile, serviceName);
service.getPort(Stammdaten.class);
Integer ctxCount = JAXBContextFactory.getContextCount();
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1999/JBWS1999ConfigurationTestCase.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1999/JBWS1999ConfigurationTestCase.java 2010-03-19
11:10:51 UTC (rev 11821)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1999/JBWS1999ConfigurationTestCase.java 2010-03-19
12:22:32 UTC (rev 11822)
@@ -45,10 +45,9 @@
private WSSecurityConfiguration load(final String fileName) throws IOException
{
- File configFile = getResourceFile("jaxws/jbws1999/config/" + fileName);
WSSecurityOMFactory factory = WSSecurityOMFactory.newInstance();
- return factory.parse(configFile.toURL());
+ return factory.parse(getResourceURL("jaxws/jbws1999/config/" +
fileName));
}
/**
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2248/JBWS2248TestCase.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2248/JBWS2248TestCase.java 2010-03-19
11:10:51 UTC (rev 11821)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2248/JBWS2248TestCase.java 2010-03-19
12:22:32 UTC (rev 11822)
@@ -47,10 +47,10 @@
public void testService() throws Exception
{
- File wsdlFile =
getResourceFile("jaxws/jbws2248/WEB-INF/wsdl/TestService.wsdl");
+ URL wsdlFile =
getResourceURL("jaxws/jbws2248/WEB-INF/wsdl/TestService.wsdl");
QName serviceName = new
QName("http://jbws2248.jaxws.ws.test.jboss.org/",
"EndpointService");
- Service service = Service.create(wsdlFile.toURL(), serviceName);
+ Service service = Service.create(wsdlFile, serviceName);
EndpointInterface port =
(EndpointInterface)service.getPort(EndpointInterface.class);
assertEquals(port.hello("Hello!"), "Hello!");
}
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2285/JBWS2285TestCase.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2285/JBWS2285TestCase.java 2010-03-19
11:10:51 UTC (rev 11821)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2285/JBWS2285TestCase.java 2010-03-19
12:22:32 UTC (rev 11822)
@@ -21,8 +21,6 @@
*/
package org.jboss.test.ws.jaxws.jbws2285;
-import java.io.ByteArrayInputStream;
-import java.io.File;
import java.io.IOException;
import java.net.URL;
import java.util.Iterator;
@@ -113,11 +111,10 @@
private SOAPMessage getRequestMessage() throws SOAPException, IOException
{
- URL reqMessage =
getResourceFile("jaxws/jbws2285/request-message.xml").toURL();
+ URL reqMessage = getResourceURL("jaxws/jbws2285/request-message.xml");
MessageFactory msgFactory = MessageFactory.newInstance();
- SOAPMessage reqMsg = msgFactory.createMessage(null, reqMessage.openStream());
- return reqMsg;
+ return msgFactory.createMessage(null, reqMessage.openStream());
}
}
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2319/JBWS2319TestCase.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2319/JBWS2319TestCase.java 2010-03-19
11:10:51 UTC (rev 11821)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2319/JBWS2319TestCase.java 2010-03-19
12:22:32 UTC (rev 11822)
@@ -111,11 +111,10 @@
private SOAPMessage getRequestMessage() throws SOAPException, IOException
{
- URL reqMessage =
getResourceFile("jaxws/jbws2319/request-message.xml").toURL();
+ URL reqMessage = getResourceURL("jaxws/jbws2319/request-message.xml");
MessageFactory msgFactory = MessageFactory.newInstance();
- SOAPMessage reqMsg = msgFactory.createMessage(null, reqMessage.openStream());
- return reqMsg;
+ return msgFactory.createMessage(null, reqMessage.openStream());
}
}
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2319/SOAPHandler.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2319/SOAPHandler.java 2010-03-19
11:10:51 UTC (rev 11821)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2319/SOAPHandler.java 2010-03-19
12:22:32 UTC (rev 11822)
@@ -22,7 +22,6 @@
package org.jboss.test.ws.jaxws.jbws2319;
import javax.xml.soap.SOAPBody;
-import javax.xml.soap.SOAPElementFactory;
import javax.xml.soap.SOAPException;
import javax.xml.soap.SOAPMessage;
import javax.xml.ws.handler.LogicalMessageContext;
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2526/JBWS2526TestCase.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2526/JBWS2526TestCase.java 2010-03-19
11:10:51 UTC (rev 11821)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2526/JBWS2526TestCase.java 2010-03-19
12:22:32 UTC (rev 11822)
@@ -60,7 +60,7 @@
private void test(String requestFile) throws Exception
{
- URL requestURL = getResourceFile(requestFile).toURL();
+ URL requestURL = getResourceURL(requestFile);
MessageFactory messageFactory = MessageFactory.newInstance();
SOAPMessage requestMessage = messageFactory.createMessage(null,
requestURL.openStream());
URL endpointURL = new URL("http://" + getServerHost() +
":8080/jaxws-jbws2526/");
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2927/JBWS2927TestCase.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2927/JBWS2927TestCase.java 2010-03-19
11:10:51 UTC (rev 11821)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2927/JBWS2927TestCase.java 2010-03-19
12:22:32 UTC (rev 11822)
@@ -112,11 +112,10 @@
private SOAPMessage getRequestMessage() throws Exception
{
- URL reqMessage =
getResourceFile("jaxws/jbws2927/request-message.xml").toURL();
+ URL reqMessage = getResourceURL("jaxws/jbws2927/request-message.xml");
MessageFactory msgFactory = MessageFactory.newInstance();
- SOAPMessage reqMsg = msgFactory.createMessage(null, reqMessage.openStream());
- return reqMsg;
+ return msgFactory.createMessage(null, reqMessage.openStream());
}
}
\ No newline at end of file
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2949/SOAPHandler1.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2949/SOAPHandler1.java 2010-03-19
11:10:51 UTC (rev 11821)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2949/SOAPHandler1.java 2010-03-19
12:22:32 UTC (rev 11822)
@@ -22,16 +22,13 @@
package org.jboss.test.ws.jaxws.jbws2949;
import javax.xml.soap.SOAPBody;
-import javax.xml.soap.SOAPElementFactory;
import javax.xml.soap.SOAPException;
import javax.xml.soap.SOAPMessage;
import javax.xml.ws.handler.LogicalMessageContext;
import javax.xml.ws.handler.MessageContext;
import javax.xml.ws.handler.soap.SOAPMessageContext;
-import org.jboss.logging.Logger;
import org.jboss.ws.WSException;
-import org.jboss.wsf.common.DOMWriter;
import org.jboss.wsf.common.handler.GenericSOAPHandler;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2949/SOAPHandler2.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2949/SOAPHandler2.java 2010-03-19
11:10:51 UTC (rev 11821)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2949/SOAPHandler2.java 2010-03-19
12:22:32 UTC (rev 11822)
@@ -22,16 +22,13 @@
package org.jboss.test.ws.jaxws.jbws2949;
import javax.xml.soap.SOAPBody;
-import javax.xml.soap.SOAPElementFactory;
import javax.xml.soap.SOAPException;
import javax.xml.soap.SOAPMessage;
import javax.xml.ws.handler.LogicalMessageContext;
import javax.xml.ws.handler.MessageContext;
import javax.xml.ws.handler.soap.SOAPMessageContext;
-import org.jboss.logging.Logger;
import org.jboss.ws.WSException;
-import org.jboss.wsf.common.DOMWriter;
import org.jboss.wsf.common.handler.GenericSOAPHandler;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/webserviceref/ServiceRefOverridesTestCase.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/webserviceref/ServiceRefOverridesTestCase.java 2010-03-19
11:10:51 UTC (rev 11821)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/webserviceref/ServiceRefOverridesTestCase.java 2010-03-19
12:22:32 UTC (rev 11822)
@@ -99,7 +99,7 @@
Method getMainClassMethod =
ClientLauncher.class.getMethod("getTheMainClass", empty);
//At least JBoss AS 5.0.0.CR2
//Use reflection to prevent double loading of the client class
- Class<?> clientClass = (Class<?>)getMainClassMethod.invoke(null,
empty);
+ Class<?> clientClass = (Class<?>)getMainClassMethod.invoke(null, new
Object[] {});
Field field = clientClass.getField("testResult");
return ((Map<String, String>)field.get(clientClass)).get(reqStr);
}
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/webserviceref/StubPropertyTestCase.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/webserviceref/StubPropertyTestCase.java 2010-03-19
11:10:51 UTC (rev 11821)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/webserviceref/StubPropertyTestCase.java 2010-03-19
12:22:32 UTC (rev 11822)
@@ -126,7 +126,7 @@
Method getMainClassMethod =
ClientLauncher.class.getMethod("getTheMainClass", empty);
//At least JBoss AS 5.0.0.CR2
//Use reflection to prevent double loading of the client class
- Class<?> clientClass = (Class<?>)getMainClassMethod.invoke(null,
empty);
+ Class<?> clientClass = (Class<?>)getMainClassMethod.invoke(null, new
Object[] {});
Field field = clientClass.getField("retStr");
String result = (String)field.get(clientClass);
assertEquals(expected, result);
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/wspolicy/PolicyMetaDataBuilderTestCase.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/wspolicy/PolicyMetaDataBuilderTestCase.java 2010-03-19
11:10:51 UTC (rev 11821)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/wspolicy/PolicyMetaDataBuilderTestCase.java 2010-03-19
12:22:32 UTC (rev 11822)
@@ -152,7 +152,7 @@
File wsdlFile = new File(filename);
assertTrue(wsdlFile.exists());
WSDLDefinitionsFactory factory = WSDLDefinitionsFactory.newInstance();
- WSDLDefinitions wsdlDefinitions = factory.parse(wsdlFile.toURL());
+ WSDLDefinitions wsdlDefinitions = factory.parse(wsdlFile.toURI().toURL());
assertNotNull(wsdlDefinitions);
return wsdlDefinitions;
}
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/JavaToWSDL11TestCase.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/JavaToWSDL11TestCase.java 2010-03-19
11:10:51 UTC (rev 11821)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/JavaToWSDL11TestCase.java 2010-03-19
12:22:32 UTC (rev 11822)
@@ -136,10 +136,10 @@
//Validate the generated WSDL
File wsdlfix = new File(fixturefile);
- Element exp = DOMUtils.parse(wsdlfix.toURL().openStream());
+ Element exp = DOMUtils.parse(wsdlfix.toURI().toURL().openStream());
File wsdlFile = new File(wsdlPath);
assertNotNull("Generated WSDL File exists?", wsdlFile);
- Element was = DOMUtils.parse(wsdlFile.toURL().openStream());
+ Element was = DOMUtils.parse(wsdlFile.toURI().toURL().openStream());
assertEquals(exp, was);
/*
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/WSToolsBase.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/WSToolsBase.java 2010-03-19
11:10:51 UTC (rev 11821)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/WSToolsBase.java 2010-03-19
12:22:32 UTC (rev 11822)
@@ -66,7 +66,7 @@
private TypeMapping typeMapping = null;
- public Class loadClass(String cname) throws ClassNotFoundException
+ public Class<?> loadClass(String cname) throws ClassNotFoundException
{
return JavaUtils.loadJavaType(cname);
}
@@ -77,9 +77,8 @@
}
/** Get the Schema as a String */
- public String generateSchema(QName xmlType, Class javaType) throws Exception
+ public String generateSchema(QName xmlType, Class<?> javaType) throws Exception
{
- String nsuri = xmlType.getNamespaceURI();
JavaToXSD javaToXSD = new JavaToXSD();
JBossXSModel xsmodel = javaToXSD.generateForSingleType(xmlType, javaType);
return xsmodel.serialize();
@@ -88,7 +87,6 @@
/** Get the Schema as a String */
public String generateSchema(QName xmlType, Class javaType, Map packageNamespace)
throws Exception
{
- String nsuri = xmlType.getNamespaceURI();
JavaToXSD javaToXSD = new JavaToXSD();
javaToXSD.setPackageNamespaceMap(packageNamespace);
JBossXSModel xsmodel = javaToXSD.generateForSingleType(xmlType, javaType);
@@ -138,7 +136,7 @@
protected WSDLDefinitions getWSDLDefinitions(File wsdlFile) throws
MalformedURLException
{
WSDLDefinitionsFactory wsdlFactory = WSDLDefinitionsFactory.newInstance();
- WSDLDefinitions wsdlDefinitions = wsdlFactory.parse(wsdlFile.toURL());
+ WSDLDefinitions wsdlDefinitions = wsdlFactory.parse(wsdlFile.toURI().toURL());
return wsdlDefinitions;
}
@@ -203,10 +201,10 @@
protected void validateXML(String fixtureFile, String genFile) throws Exception
{
File wsdlfix = new File(fixtureFile);
- Element exp = DOMUtils.parse(wsdlfix.toURL().openStream());
+ Element exp = DOMUtils.parse(wsdlfix.toURI().toURL().openStream());
File wsdlFile = new File(genFile);
assertNotNull("Generated WSDL File exists?", wsdlFile);
- Element was = DOMUtils.parse(wsdlFile.toURL().openStream());
+ Element was = DOMUtils.parse(wsdlFile.toURI().toURL().openStream());
assertEquals(exp, was);
}
@@ -225,17 +223,17 @@
{
boolean bool = true;
File wsdlfix = new File(expPath);
- Element exp = DOMUtils.parse(wsdlfix.toURL().openStream());
+ Element exp = DOMUtils.parse(wsdlfix.toURI().toURL().openStream());
File wsdlFile = new File(genpath);
assertTrue("Generated WSDL File exists", wsdlFile.exists());
- Element was = DOMUtils.parse(wsdlFile.toURL().openStream());
+ Element was = DOMUtils.parse(wsdlFile.toURI().toURL().openStream());
//assertEquals(exp,was);
//Now that we have figured out that the wsdl files are well formed,
//lets do the semantic wsdl validation
WSDLDefinitionsFactory factory = WSDLDefinitionsFactory.newInstance();
- WSDLDefinitions wsdlExp = factory.parse(wsdlfix.toURL());
+ WSDLDefinitions wsdlExp = factory.parse(wsdlfix.toURI().toURL());
- WSDLDefinitions wsdlActual = factory.parse(wsdlFile.toURL());
+ WSDLDefinitions wsdlActual = factory.parse(wsdlFile.toURI().toURL());
WSDLValidator validator = new WSDL11Validator();
try
{
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/assertions/WSDL20AssertionsTestCase.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/assertions/WSDL20AssertionsTestCase.java 2010-03-19
11:10:51 UTC (rev 11821)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/assertions/WSDL20AssertionsTestCase.java 2010-03-19
12:22:32 UTC (rev 11822)
@@ -69,7 +69,7 @@
WSDLToJavaIntf wsdljava = new WSDLToJava();
try
{
- WSDLDefinitions wsdl = wsdljava.convertWSDL2Java(wsdlFile.toURL());
+ WSDLDefinitions wsdl = wsdljava.convertWSDL2Java(wsdlFile.toURI().toURL());
fail("Test Should not have passed");
}
catch (RuntimeException ie)
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/clientside/ClientSideArtifactsTestCase.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/clientside/ClientSideArtifactsTestCase.java 2010-03-19
11:10:51 UTC (rev 11821)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/clientside/ClientSideArtifactsTestCase.java 2010-03-19
12:22:32 UTC (rev 11822)
@@ -67,9 +67,9 @@
public void testSimpleCase() throws Exception
{
WSDLToJava wsdlJava = new WSDLToJava();
- File wsdlFile =
getResourceFile("tools/jbws-161/wscompile/simple/wsdl/HelloWsService.wsdl");
+ URL wsdlFile =
getResourceURL("tools/jbws-161/wscompile/simple/wsdl/HelloWsService.wsdl");
wsdlJava.setTypeMapping(new LiteralTypeMapping());
- WSDLDefinitions wsdl = wsdlJava.convertWSDL2Java(wsdlFile.toURL());
+ WSDLDefinitions wsdl = wsdlJava.convertWSDL2Java(wsdlFile);
wsdlJava.generateSEI(wsdl,
createResourceFile("tools/jbws-160/jbossws/simple/sei"));
//Create the Service File
@@ -120,19 +120,19 @@
}
//Compare mapping files
- File expFile =
getResourceFile("tools/jbws-160/wscompile/simple/mapping/jaxrpc-mapping.xml");
- File genFile =
createResourceFile("tools/jbws-160/jbossws/simple/mapping/jaxrpc-mapping.xml");
+ URL expFile =
getResourceURL("tools/jbws-160/wscompile/simple/mapping/jaxrpc-mapping.xml");
+ URL genFile =
getResourceURL("tools/jbws-160/jbossws/simple/mapping/jaxrpc-mapping.xml");
- compareXMLFiles(expFile.toURL(), genFile.toURL());
+ compareXMLFiles(expFile, genFile);
}
/** Test a custom SEI that uses custom types */
public void testCustomCase() throws Exception
{
WSDLToJava wsdlJava = new WSDLToJava();
- File wsdlFile =
getResourceFile("tools/jbws-161/wscompile/custom/wsdl/HelloCustomService.wsdl");
+ URL wsdlFile =
getResourceURL("tools/jbws-161/wscompile/custom/wsdl/HelloCustomService.wsdl");
wsdlJava.setTypeMapping(new LiteralTypeMapping());
- WSDLDefinitions wsdl = wsdlJava.convertWSDL2Java(wsdlFile.toURL());
+ WSDLDefinitions wsdl = wsdlJava.convertWSDL2Java(wsdlFile);
wsdlJava.setTypeMapping(new LiteralTypeMapping());
wsdlJava.generateSEI(wsdl,
createResourceFile("tools/jbws-160/jbossws/custom/sei"));
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/doclit/ToolsDocLitTestCase.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/doclit/ToolsDocLitTestCase.java 2010-03-19
11:10:51 UTC (rev 11821)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/doclit/ToolsDocLitTestCase.java 2010-03-19
12:22:32 UTC (rev 11822)
@@ -45,7 +45,7 @@
{
public void testTrivialCase() throws Exception
{
- Class seiClass = TrivialService.class;
+ Class<?> seiClass = TrivialService.class;
String wsdlDir = createResourceFile("tools/").getAbsolutePath();
String sname = "SampleService";
String wsdlPath = wsdlDir+ "/" + sname + ".wsdl";
@@ -64,10 +64,10 @@
String fixturefile =
getResourceFile("tools/doc-lit/trivial/wsdl/SampleService.wsdl").getAbsolutePath();
//Validate the generated WSDL
File wsdlfix = new File(fixturefile);
- Element exp = DOMUtils.parse(wsdlfix.toURL().openStream());
+ Element exp = DOMUtils.parse(wsdlfix.toURI().toURL().openStream());
File wsdlFile = new File(wsdlPath);
assertNotNull("Generated WSDL File exists?", wsdlFile);
- Element was = DOMUtils.parse(wsdlFile.toURL().openStream());
+ Element was = DOMUtils.parse(wsdlFile.toURI().toURL().openStream());
//assertEquals(exp, was);
this.semanticallyValidateWSDL(fixturefile, wsdlFile.getPath());
}
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/holders/StandardHoldersTestCase.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/holders/StandardHoldersTestCase.java 2010-03-19
11:10:51 UTC (rev 11821)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/holders/StandardHoldersTestCase.java 2010-03-19
12:22:32 UTC (rev 11822)
@@ -23,6 +23,7 @@
import java.io.File;
import java.io.Writer;
+import java.net.URL;
import org.jboss.test.ws.common.jbossxb.holders.HoldersServiceInterface;
import org.jboss.test.ws.tools.WSToolsBase;
@@ -97,18 +98,18 @@
{
String fixturefile =
getResourceFile("tools/holders/wsdl/HolderService.wsdl").getAbsolutePath();
File wsdlfix = new File(fixturefile);
- Element exp = DOMUtils.parse(wsdlfix.toURL().openStream());
+ Element exp = DOMUtils.parse(wsdlfix.toURI().toURL().openStream());
File wsdlFile = getResourceFile(wsdlPath);
assertNotNull("Generated WSDL File exists?", wsdlFile);
- Element was = DOMUtils.parse(wsdlFile.toURL().openStream());
+ Element was = DOMUtils.parse(wsdlFile.toURI().toURL().openStream());
assertEquals(exp,was);
//Now that we have figured out that the wsdl files are well formed,
//lets do the semantic wsdl validation
WSDLDefinitionsFactory factory = WSDLDefinitionsFactory.newInstance();
- WSDLDefinitions wsdlExp = factory.parse(wsdlfix.toURL());
+ WSDLDefinitions wsdlExp = factory.parse(wsdlfix.toURI().toURL());
- WSDLDefinitions wsdlActual = factory.parse(wsdlFile.toURL());
+ WSDLDefinitions wsdlActual = factory.parse(wsdlFile.toURI().toURL());
WSDLValidator validator = new WSDL11Validator();
try
{
@@ -137,11 +138,10 @@
private WSDLDefinitions getWSDLDefinitions(String wsdlFileName) throws Exception
{
- File wsdlFile = getResourceFile("tools/holders/wsdl/" + wsdlFileName);
- assertTrue("WSDL File exists?",wsdlFile.exists());
+ URL wsdlFile = getResourceURL("tools/holders/wsdl/" + wsdlFileName);
WSDLDefinitionsFactory wsdlFactory = WSDLDefinitionsFactory.newInstance();
- WSDLDefinitions wsdlDefinitions = wsdlFactory.parse(wsdlFile.toURL());
+ WSDLDefinitions wsdlDefinitions = wsdlFactory.parse(wsdlFile);
return wsdlDefinitions;
}
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/jaxws/WSContractProviderTestCase.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/jaxws/WSContractProviderTestCase.java 2010-03-19
11:10:51 UTC (rev 11821)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/jaxws/WSContractProviderTestCase.java 2010-03-19
12:22:32 UTC (rev 11822)
@@ -67,7 +67,7 @@
private void checkWrapperClasses(File outputDir) throws MalformedURLException,
ClassNotFoundException, NoSuchMethodException
{
// Use a different loader each time to make sure the files exist
- URLClassLoader classLoader = new URLClassLoader(new URL[]{outputDir.toURL()},
Thread.currentThread().getContextClassLoader());
+ URLClassLoader classLoader = new URLClassLoader(new
URL[]{outputDir.toURI().toURL()}, Thread.currentThread().getContextClassLoader());
// Check request wrapper
Class wrapper =
JavaUtils.loadJavaType("org.jboss.test.ws.tools.jaxws.jaxws.SubmitPO",
classLoader);
@@ -123,7 +123,7 @@
File wsdlFile = createResourceFile(outputDir, "DocWrappedService.wsdl");
WSDLDefinitionsFactory wsdlFactory = WSDLDefinitionsFactory.newInstance();
- wsdlFactory.parse(wsdlFile.toURL());
+ wsdlFactory.parse(wsdlFile.toURI().toURL());
}
public void testResourceDir() throws Exception
@@ -147,6 +147,6 @@
wsdlFile = createResourceFile(wsdlDir, wsdlName);
WSDLDefinitionsFactory wsdlFactory = WSDLDefinitionsFactory.newInstance();
- wsdlFactory.parse(wsdlFile.toURL());
+ wsdlFactory.parse(wsdlFile.toURI().toURL());
}
}
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/jbpapp921/JBPAPP921TestCase.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/jbpapp921/JBPAPP921TestCase.java 2010-03-19
11:10:51 UTC (rev 11821)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/jbpapp921/JBPAPP921TestCase.java 2010-03-19
12:22:32 UTC (rev 11822)
@@ -47,8 +47,8 @@
File jaxrpcMapping = getResourceFile(resourceDir +
"/jaxrpc-mapping.xml");
mappingValidator.validate(jaxrpcMapping.getAbsolutePath(), toolsDir +
"/jaxrpc-mapping.xml");
- Element exp = DOMUtils.parse(getResourceFile(resourceDir +
"/webservices.xml").toURL().openStream());
- Element act = DOMUtils.parse(new File(toolsDir +
"/webservices.xml").toURL().openStream());
+ Element exp = DOMUtils.parse(getResourceURL(resourceDir +
"/webservices.xml").openStream());
+ Element act = DOMUtils.parse(getResourceURL(toolsDir +
"/webservices.xml").openStream());
assertEquals(exp, act);
}
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/jbws1645/JBWS1645TestCase.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/jbws1645/JBWS1645TestCase.java 2010-03-19
11:10:51 UTC (rev 11821)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/jbws1645/JBWS1645TestCase.java 2010-03-19
12:22:32 UTC (rev 11822)
@@ -195,8 +195,8 @@
private void validateGeneratedWSDL(File wsdlFile, File expectedWsdlFile) throws
Exception
{
WSDLDefinitionsFactory factory = WSDLDefinitionsFactory.newInstance();
- WSDLDefinitions wsdl = factory.parse(wsdlFile.toURL());
- WSDLDefinitions expWsdl = factory.parse(expectedWsdlFile.toURL());
+ WSDLDefinitions wsdl = factory.parse(wsdlFile.toURI().toURL());
+ WSDLDefinitions expWsdl = factory.parse(expectedWsdlFile.toURI().toURL());
assertNotNull(wsdl);
assertNotNull(expWsdl);
WSDLValidator validator = new WSDLValidator();
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/jbws2411/JBWS2411TestCase.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/jbws2411/JBWS2411TestCase.java 2010-03-19
11:10:51 UTC (rev 11821)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/jbws2411/JBWS2411TestCase.java 2010-03-19
12:22:32 UTC (rev 11822)
@@ -21,15 +21,9 @@
*/
package org.jboss.test.ws.tools.jbws2411;
-import java.io.File;
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URI;
-import java.net.URISyntaxException;
import java.net.URL;
import javax.wsdl.Definition;
-import javax.wsdl.WSDLException;
import org.jboss.wsf.test.JBossWSTest;
@@ -46,7 +40,7 @@
public void testIssue() throws Exception
{
- URL wsdlFile =
getResourceFile("tools/jbws2411/wsdl/PRPA_AR201102UV01.wsdl").toURL();
+ URL wsdlFile =
getResourceURL("tools/jbws2411/wsdl/PRPA_AR201102UV01.wsdl");
WSDL11DefinitionFactory factory = WSDL11DefinitionFactory.newInstance();
Definition impWsdl = factory.parse(wsdlFile);
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/jbws_204/AnonTypesTestCase.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/jbws_204/AnonTypesTestCase.java 2010-03-19
11:10:51 UTC (rev 11821)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/jbws_204/AnonTypesTestCase.java 2010-03-19
12:22:32 UTC (rev 11822)
@@ -48,8 +48,8 @@
QName q = new QName(targetNS,"Items", Constants.PREFIX_TNS);
jxsd.getSchemaCreator().addPackageNamespaceMapping(Items.class.getPackage().getName(),
targetNS);
String xs = jxsd.generateForSingleType(q,Items.class).serialize();
- File xsdFile =
getResourceFile("tools/jbws-204/wscompile/anontypes_new.xsd");
- checkXMLFiles(xsdFile.toURL(),xs);
+ URL xsdFile =
getResourceURL("tools/jbws-204/wscompile/anontypes_new.xsd");
+ checkXMLFiles(xsdFile,xs);
}
private void checkXMLFiles(URL exp,String actual) throws Exception
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/jbws_204/NillableTypesTestCase.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/jbws_204/NillableTypesTestCase.java 2010-03-19
11:10:51 UTC (rev 11821)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/jbws_204/NillableTypesTestCase.java 2010-03-19
12:22:32 UTC (rev 11822)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.tools.jbws_204;
-import java.io.File;
import java.io.StringWriter;
import java.net.URL;
@@ -58,8 +57,8 @@
xsmodel.addXSTypeDefinition(xst);
StringWriter sw = new StringWriter();
sutils.serialize(xsmodel,sw);
- File xsdFile =
getResourceFile("tools/jbws-204/wscompile/nillable.xsd");
- checkXMLFiles(xsdFile.toURL(),sw.toString());
+ URL xsdFile = getResourceURL("tools/jbws-204/wscompile/nillable.xsd");
+ checkXMLFiles(xsdFile,sw.toString());
}
private void checkXMLFiles(URL exp,String actual) throws Exception
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/validation/JaxrpcMappingValidator.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/validation/JaxrpcMappingValidator.java 2010-03-19
11:10:51 UTC (rev 11821)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/validation/JaxrpcMappingValidator.java 2010-03-19
12:22:32 UTC (rev 11822)
@@ -62,8 +62,8 @@
public boolean validate(String mappingFile1, String mappingFile2) throws Exception
{
JavaWsdlMappingFactory mappingFactory = JavaWsdlMappingFactory.newInstance();
- JavaWsdlMapping javaWsdlMapping1 = mappingFactory.parse( new
File(mappingFile1).toURL());
- JavaWsdlMapping javaWsdlMapping2 = mappingFactory.parse( new
File(mappingFile2).toURL());
+ JavaWsdlMapping javaWsdlMapping1 = mappingFactory.parse( new
File(mappingFile1).toURI().toURL());
+ JavaWsdlMapping javaWsdlMapping2 = mappingFactory.parse( new
File(mappingFile2).toURI().toURL());
return validate(javaWsdlMapping1, javaWsdlMapping2);
}
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/validation/WSDL11ValidationTestCase.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/validation/WSDL11ValidationTestCase.java 2010-03-19
11:10:51 UTC (rev 11821)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/validation/WSDL11ValidationTestCase.java 2010-03-19
12:22:32 UTC (rev 11822)
@@ -22,6 +22,7 @@
package org.jboss.test.ws.tools.validation;
import java.io.File;
+import java.net.URL;
import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
import org.jboss.ws.tools.exceptions.JBossWSToolsException;
@@ -41,14 +42,12 @@
*/
public void testSimpleCase() throws Exception
{
- //File wsdlFile = getResourceFile("wsdl11/DocLitSimple.wsdl");
- File wsdlFile =
getResourceFile("tools/wsdlfixture/CustomInterfaceService_RPC_11.wsdl");
- assertTrue(wsdlFile.exists());
+ URL wsdlFile =
getResourceURL("tools/wsdlfixture/CustomInterfaceService_RPC_11.wsdl");
WSDLDefinitionsFactory factory = WSDLDefinitionsFactory.newInstance();
- WSDLDefinitions wsdlExp = factory.parse(wsdlFile.toURL());
+ WSDLDefinitions wsdlExp = factory.parse(wsdlFile);
- WSDLDefinitions wsdlActual = factory.parse(wsdlFile.toURL());
+ WSDLDefinitions wsdlActual = factory.parse(wsdlFile);
WSDLValidator validator = new WSDL11Validator();
try
{
@@ -73,13 +72,12 @@
*/
public void testDocLitCase() throws Exception
{
- File wsdlFile = getResourceFile("common/wsdl11/DocLitSimple.wsdl");
- assertTrue(wsdlFile.exists());
+ URL wsdlFile = getResourceURL("common/wsdl11/DocLitSimple.wsdl");
WSDLDefinitionsFactory factory = WSDLDefinitionsFactory.newInstance();
- WSDLDefinitions wsdlExp = factory.parse(wsdlFile.toURL());
+ WSDLDefinitions wsdlExp = factory.parse(wsdlFile);
- WSDLDefinitions wsdlActual = factory.parse(wsdlFile.toURL());
+ WSDLDefinitions wsdlActual = factory.parse(wsdlFile);
WSDLValidator validator = new WSDL11Validator();
try
{
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/xmlschema/WSDLTypesTestCase.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/xmlschema/WSDLTypesTestCase.java 2010-03-19
11:10:51 UTC (rev 11821)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/xmlschema/WSDLTypesTestCase.java 2010-03-19
12:22:32 UTC (rev 11822)
@@ -21,8 +21,8 @@
*/
package org.jboss.test.ws.tools.xmlschema;
-import java.io.File;
import java.io.IOException;
+import java.net.URL;
import javax.xml.namespace.QName;
@@ -45,13 +45,13 @@
public void testXMLTypeReturned()
{
String filename = "StandardJavaTypesService_DOC_11.wsdl";
- File wsdlFile = getResourceFile("tools/wsdlfixture/" + filename);
WSDLTypes types = null;
try
{
+ URL wsdlFile = getResourceURL("tools/wsdlfixture/" + filename);
WSDLToJavaIntf wsdljava = new WSDLToJava();
wsdljava.setTypeMapping(new LiteralTypeMapping());
- WSDLDefinitions wsdl = wsdljava.convertWSDL2Java(wsdlFile.toURL());
+ WSDLDefinitions wsdl = wsdljava.convertWSDL2Java(wsdlFile);
types = wsdl.getWsdlTypes();
}
catch (IOException e)
@@ -69,13 +69,13 @@
public void testXMLSchemaReturned()
{
String filename = "StandardJavaTypesService_DOC_11.wsdl";
- File wsdlFile = getResourceFile("tools/wsdlfixture/" + filename);
WSDLTypes types = null;
try
{
+ URL wsdlFile = getResourceURL("tools/wsdlfixture/" + filename);
WSDLToJavaIntf wsdljava = new WSDLToJava();
wsdljava.setTypeMapping(new LiteralTypeMapping());
- WSDLDefinitions wsdl = wsdljava.convertWSDL2Java(wsdlFile.toURL());
+ WSDLDefinitions wsdl = wsdljava.convertWSDL2Java(wsdlFile);
types = wsdl.getWsdlTypes();
}
catch (IOException e)
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/xmlschema/XMLSchemaTestCase.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/xmlschema/XMLSchemaTestCase.java 2010-03-19
11:10:51 UTC (rev 11821)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/xmlschema/XMLSchemaTestCase.java 2010-03-19
12:22:32 UTC (rev 11822)
@@ -21,8 +21,8 @@
*/
package org.jboss.test.ws.tools.xmlschema;
-import java.io.File;
import java.net.MalformedURLException;
+import java.net.URL;
import java.util.HashMap;
import java.util.Map;
@@ -46,8 +46,8 @@
public void testXMLTypeReturned() throws MalformedURLException
{
String filename = "CustomInterface20.xsd";
- File xsdFile = getResourceFile("tools/wsdlfixture/" + filename);
- XSModel xsmodel = parseSchema(xsdFile.toURL());
+ URL xsdFile = getResourceURL("tools/wsdlfixture/" + filename);
+ XSModel xsmodel = parseSchema(xsdFile);
assertNotNull("XSModel is null?", xsmodel);
XSNamedMap xsmap =
xsmodel.getComponentsByNamespace(XSConstants.ELEMENT_DECLARATION,
"http://org.jboss.ws/types");
assertNotNull("XSNamedMap is null?", xsmap);
@@ -60,9 +60,8 @@
public void testXSDInclude() throws MalformedURLException
{
String filename = "SchemaMain.xsd";
- File xsdFile = getResourceFile("tools/xsd/schemainclude/" + filename);
- assertTrue("Does Schema file exist?", xsdFile.exists());
- XSModel xsmodel = parseSchema(xsdFile.toURL());
+ URL xsdFile = getResourceURL("tools/xsd/schemainclude/" + filename);
+ XSModel xsmodel = parseSchema(xsdFile);
assertNotNull("XSModel is null?", xsmodel);
XSNamedMap xsmap = xsmodel.getComponentsByNamespace(XSConstants.TYPE_DEFINITION,
"http://org.jboss.ws/types");
assertNotNull("XSNamedMap is null?", xsmap);
@@ -73,13 +72,13 @@
/**
* Check bad include in schema
*/
- public void testBadXSDInclude()
+ public void testBadXSDInclude() throws Exception
{
String filename = "SchemaBadMain.xsd";
- File xsdFile = getResourceFile("tools/xsd/schemainclude/" + filename);
+ URL xsdFile = getResourceURL("tools/xsd/schemainclude/" + filename);
try
{
- XSModel xsmodel = parseSchema(xsdFile.toURL());
+ XSModel xsmodel = parseSchema(xsdFile);
assertNotNull("XSModel is null?", xsmodel);
fail("Test should have failed as we have a bad schema include");
}
@@ -95,11 +94,9 @@
*/
public void testXSDImport() throws MalformedURLException
{
- String filename = "SchemaMain.xsd";
- File xsdFile = getResourceFile("tools/xsd/schemaimport/" + filename);
//Create an Hashmap of <namespace,URL>
Map schemaMap = new HashMap();
- schemaMap.put("http://org.jboss.ws/types", xsdFile.toURL());
+ schemaMap.put("http://org.jboss.ws/types",
getResourceURL("tools/xsd/schemaimport/SchemaMain.xsd"));
schemaMap.put("http://org.jboss.ws/types2",
getResourceURL("/tools/xsd/schemaimport/SchemaImport.xsd"));
XSModel xsmodel = parseSchema(schemaMap);
assertNotNull("XSModel is null?", xsmodel);
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/xsdjava/SchemaAnnotationsTestCase.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/xsdjava/SchemaAnnotationsTestCase.java 2010-03-19
11:10:51 UTC (rev 11821)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/xsdjava/SchemaAnnotationsTestCase.java 2010-03-19
12:22:32 UTC (rev 11822)
@@ -21,8 +21,8 @@
*/
package org.jboss.test.ws.tools.xsdjava;
-import java.io.File;
import java.net.MalformedURLException;
+import java.net.URL;
import org.apache.xerces.xs.XSAnnotation;
import org.apache.xerces.xs.XSComplexTypeDefinition;
@@ -46,8 +46,8 @@
public void testXSDAnnotations() throws MalformedURLException
{
String filename = "xsdAnnotation.xsd";
- File xsdFile = getResourceFile("tools/xsd/annotations/" + filename);
- XSModel xsmodel = parseSchema(xsdFile.toURL());
+ URL xsdFile = getResourceURL("tools/xsd/annotations/" + filename);
+ XSModel xsmodel = parseSchema(xsdFile);
assertNotNull("XSModel is null?", xsmodel);
XSObjectList xsobjlist = xsmodel.getAnnotations();
assertNotNull("Schema Annotation is null?", xsobjlist);