Author: veithen
Date: Sun May 15 09:41:45 2011
New Revision: 1103301
URL: http://svn.apache.org/viewvc?rev=1103301&view=rev
Log:
AXIS2-4353: XmlSchema 1.4.8-SNAPSHOT now correctly resolves imports relative to
JAR style URLs. Finalized and enabled the test case.
Modified:
axis/axis2/java/core/trunk/modules/kernel/test/org/apache/axis2/client/ServiceClientTest.java
axis/axis2/java/core/trunk/modules/parent/pom.xml
Modified:
axis/axis2/java/core/trunk/modules/kernel/test/org/apache/axis2/client/ServiceClientTest.java
URL:
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/test/org/apache/axis2/client/ServiceClientTest.java?rev=1103301&r1=1103300&r2=1103301&view=diff
==============================================================================
---
axis/axis2/java/core/trunk/modules/kernel/test/org/apache/axis2/client/ServiceClientTest.java
(original)
+++
axis/axis2/java/core/trunk/modules/kernel/test/org/apache/axis2/client/ServiceClientTest.java
Sun May 15 09:41:45 2011
@@ -20,15 +20,17 @@ package org.apache.axis2.client;
import java.io.File;
import java.net.URL;
+import java.util.List;
import javax.xml.namespace.QName;
import org.apache.axis2.context.ConfigurationContext;
import org.apache.axis2.context.ConfigurationContextFactory;
-import org.junit.Ignore;
+import org.apache.ws.commons.schema.XmlSchema;
+import org.junit.Assert;
import org.junit.Test;
-public class ServiceClientTest {
+public class ServiceClientTest extends Assert {
/**
* Tests that imported schemas are correctly resolved if the WSDL is
loaded from a ZIP file.
* This is a regression test for AXIS2-4353 and checks that WSDLs (with
imports) can be loaded
@@ -36,7 +38,7 @@ public class ServiceClientTest {
*
* @throws Exception
*/
- @Test @Ignore
+ @Test
public void testWSDLWithImportsFromZIP() throws Exception {
ConfigurationContext configContext =
ConfigurationContextFactory.createEmptyConfigurationContext();
String basedir = System.getProperty("basedir");
@@ -45,6 +47,10 @@ public class ServiceClientTest {
}
URL zipUrl = new File(basedir, "target/test-zip.zip").toURL();
URL wsdlUrl = new URL("jar:" + zipUrl + "!/test.wsdl");
- new ServiceClient(configContext, wsdlUrl, new QName("urn:test",
"EchoService"), "EchoPort");
+ ServiceClient serviceClient = new ServiceClient(configContext,
wsdlUrl, new QName("urn:test", "EchoService"), "EchoPort");
+ List<XmlSchema> schemas = serviceClient.getAxisService().getSchema();
+ assertEquals(1, schemas.size());
+ XmlSchema schema = schemas.get(0);
+ assertNotNull(schema.getTypeByName(new QName("urn:test",
"echoResponse")));
}
}
Modified: axis/axis2/java/core/trunk/modules/parent/pom.xml
URL:
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/parent/pom.xml?rev=1103301&r1=1103300&r2=1103301&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/parent/pom.xml (original)
+++ axis/axis2/java/core/trunk/modules/parent/pom.xml Sun May 15 09:41:45 2011
@@ -70,9 +70,9 @@
<axiom.version>1.2.12-SNAPSHOT</axiom.version>
<neethi.version>3.0.1-SNAPSHOT</neethi.version>
<woden.version>1.0-SNAPSHOT</woden.version>
+ <xmlschema.version>1.4.8-SNAPSHOT</xmlschema.version>
<!-- Use released versions for these projects -->
- <xmlschema.version>1.4.7</xmlschema.version>
<ant.version>1.7.0</ant.version>
<antlr.version>2.7.7</antlr.version>
<bsf.version>2.4.0</bsf.version>