Modified: axis/axis2/java/core/trunk/modules/kernel/test/org/apache/axis2/description/java2wsdl/DefaultSchemaGeneratorTest.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/test/org/apache/axis2/description/java2wsdl/DefaultSchemaGeneratorTest.java?rev=1536050&r1=1536049&r2=1536050&view=diff ============================================================================== --- axis/axis2/java/core/trunk/modules/kernel/test/org/apache/axis2/description/java2wsdl/DefaultSchemaGeneratorTest.java (original) +++ axis/axis2/java/core/trunk/modules/kernel/test/org/apache/axis2/description/java2wsdl/DefaultSchemaGeneratorTest.java Sun Oct 27 05:48:34 2013 @@ -19,6 +19,12 @@ package org.apache.axis2.description.java2wsdl; +import org.apache.axis2.description.AxisService; +import org.apache.ws.commons.schema.XmlSchema; +import org.w3c.dom.Document; + +import javax.management.RuntimeErrorException; +import javax.xml.namespace.QName; import java.io.BufferedReader; import java.io.ByteArrayOutputStream; import java.io.File; @@ -29,13 +35,6 @@ import java.util.Iterator; import java.util.List; import java.util.Map; -import javax.management.RuntimeErrorException; -import javax.xml.namespace.QName; - -import org.apache.axis2.description.AxisService; -import org.apache.ws.commons.schema.XmlSchema; -import org.w3c.dom.Document; - public class DefaultSchemaGeneratorTest extends XMLSchemaTest { protected AxisService axisService; @@ -81,9 +80,7 @@ public class DefaultSchemaGeneratorTest XmlSchema schema = schemaColl.iterator().next(); boolean foundExtra = false; - Iterator names = schema.getSchemaTypes().getNames(); - while (names.hasNext()) { - QName name = (QName) names.next(); + for (QName name : schema.getSchemaTypes().keySet()) { if (name.getLocalPart().equals("ExtraClass")) foundExtra = true; }
Modified: axis/axis2/java/core/trunk/modules/kernel/test/org/apache/axis2/description/java2wsdl/XMLSchemaTest.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/test/org/apache/axis2/description/java2wsdl/XMLSchemaTest.java?rev=1536050&r1=1536049&r2=1536050&view=diff ============================================================================== --- axis/axis2/java/core/trunk/modules/kernel/test/org/apache/axis2/description/java2wsdl/XMLSchemaTest.java (original) +++ axis/axis2/java/core/trunk/modules/kernel/test/org/apache/axis2/description/java2wsdl/XMLSchemaTest.java Sun Oct 27 05:48:34 2013 @@ -19,6 +19,13 @@ package org.apache.axis2.description.java2wsdl; +import junit.framework.TestCase; +import org.apache.axis2.util.XMLPrettyPrinter; +import org.apache.ws.commons.schema.XmlSchema; +import org.apache.ws.commons.schema.XmlSchemaCollection; +import org.custommonkey.xmlunit.Diff; + +import javax.xml.transform.stream.StreamSource; import java.io.BufferedReader; import java.io.ByteArrayOutputStream; import java.io.File; @@ -28,15 +35,6 @@ import java.io.FileWriter; import java.io.InputStream; import java.util.ArrayList; -import javax.xml.transform.stream.StreamSource; - -import junit.framework.TestCase; - -import org.apache.axis2.util.XMLPrettyPrinter; -import org.apache.ws.commons.schema.XmlSchema; -import org.apache.ws.commons.schema.XmlSchemaCollection; -import org.custommonkey.xmlunit.Diff; - public abstract class XMLSchemaTest extends TestCase { public final String XMLSchemaNameSpace = "xmlns:xs=\"http://www.w3.org/2001/XMLSchema\""; @@ -79,7 +77,7 @@ public abstract class XMLSchemaTest exte while (file.exists()) { InputStream is = new FileInputStream(file); XmlSchemaCollection schemaCol = new XmlSchemaCollection(); - XmlSchema schema = schemaCol.read(new StreamSource(is), null); + XmlSchema schema = schemaCol.read(new StreamSource(is)); schemas.add(schema); i++; file = new File(SampleSchemasDirectory + "sampleSchema" + i @@ -93,7 +91,7 @@ public abstract class XMLSchemaTest exte + ".xsd"); InputStream is = new FileInputStream(file); XmlSchemaCollection schemaCol = new XmlSchemaCollection(); - XmlSchema schema = schemaCol.read(new StreamSource(is), null); + XmlSchema schema = schemaCol.read(new StreamSource(is)); return schema; } @@ -114,7 +112,7 @@ public abstract class XMLSchemaTest exte public String readXMLfromSchemaFile(String path) throws Exception { InputStream is = new FileInputStream(path); XmlSchemaCollection schemaCol = new XmlSchemaCollection(); - XmlSchema schema = schemaCol.read(new StreamSource(is), null); + XmlSchema schema = schemaCol.read(new StreamSource(is)); ByteArrayOutputStream stream = new ByteArrayOutputStream(); schema.write(stream); return stream.toString(); 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=1536050&r1=1536049&r2=1536050&view=diff ============================================================================== --- axis/axis2/java/core/trunk/modules/parent/pom.xml (original) +++ axis/axis2/java/core/trunk/modules/parent/pom.xml Sun Oct 27 05:48:34 2013 @@ -70,7 +70,7 @@ <axiom.version>1.2.15-SNAPSHOT</axiom.version> <neethi.version>3.0.3-SNAPSHOT</neethi.version> <woden.version>1.0-SNAPSHOT</woden.version> - <xmlschema.version>1.4.8-SNAPSHOT</xmlschema.version> + <xmlschema.version>2.0.3</xmlschema.version> <!-- Use released versions for these projects --> <ant.version>1.7.0</ant.version> @@ -642,8 +642,8 @@ <version>${axiom.version}</version> </dependency> <dependency> - <groupId>org.apache.ws.commons.schema</groupId> - <artifactId>XmlSchema</artifactId> + <groupId>org.apache.ws.xmlschema</groupId> + <artifactId>xmlschema-core</artifactId> <version>${xmlschema.version}</version> </dependency> <dependency> @@ -752,7 +752,12 @@ </dependency> <dependency> <groupId>org.apache.woden</groupId> - <artifactId>woden-core</artifactId> + <artifactId>woden-impl-commons</artifactId> + <version>${woden.version}</version> + </dependency> + <dependency> + <groupId>org.apache.woden</groupId> + <artifactId>woden-impl-dom</artifactId> <version>${woden.version}</version> </dependency> <dependency> Modified: axis/axis2/java/core/trunk/modules/tool/axis2-ant-plugin/pom.xml URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/tool/axis2-ant-plugin/pom.xml?rev=1536050&r1=1536049&r2=1536050&view=diff ============================================================================== --- axis/axis2/java/core/trunk/modules/tool/axis2-ant-plugin/pom.xml (original) +++ axis/axis2/java/core/trunk/modules/tool/axis2-ant-plugin/pom.xml Sun Oct 27 05:48:34 2013 @@ -81,8 +81,8 @@ <artifactId>neethi</artifactId> </dependency> <dependency> - <groupId>org.apache.ws.commons.schema</groupId> - <artifactId>XmlSchema</artifactId> + <groupId>org.apache.ws.xmlschema</groupId> + <artifactId>xmlschema-core</artifactId> </dependency> <dependency> <groupId>org.apache.geronimo.specs</groupId> Modified: axis/axis2/java/core/trunk/modules/tool/axis2-idea-plugin/pom.xml URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/tool/axis2-idea-plugin/pom.xml?rev=1536050&r1=1536049&r2=1536050&view=diff ============================================================================== --- axis/axis2/java/core/trunk/modules/tool/axis2-idea-plugin/pom.xml (original) +++ axis/axis2/java/core/trunk/modules/tool/axis2-idea-plugin/pom.xml Sun Oct 27 05:48:34 2013 @@ -113,12 +113,12 @@ <artifactId>xmlbeans</artifactId> </dependency> <dependency> - <groupId>org.apache.ws.commons.schema</groupId> - <artifactId>XmlSchema</artifactId> + <groupId>org.apache.ws.xmlschema</groupId> + <artifactId>xmlschema-core</artifactId> </dependency> <dependency> <groupId>org.apache.woden</groupId> - <artifactId>woden-core</artifactId> + <artifactId>woden-impl-commons</artifactId> </dependency> <dependency> <groupId>log4j</groupId> Modified: axis/axis2/java/core/trunk/modules/transport/http/test/org/apache/axis2/transport/http/XMLSchemaTest.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/transport/http/test/org/apache/axis2/transport/http/XMLSchemaTest.java?rev=1536050&r1=1536049&r2=1536050&view=diff ============================================================================== --- axis/axis2/java/core/trunk/modules/transport/http/test/org/apache/axis2/transport/http/XMLSchemaTest.java (original) +++ axis/axis2/java/core/trunk/modules/transport/http/test/org/apache/axis2/transport/http/XMLSchemaTest.java Sun Oct 27 05:48:34 2013 @@ -19,6 +19,13 @@ package org.apache.axis2.transport.http; +import junit.framework.TestCase; +import org.apache.axis2.util.XMLPrettyPrinter; +import org.apache.ws.commons.schema.XmlSchema; +import org.apache.ws.commons.schema.XmlSchemaCollection; +import org.custommonkey.xmlunit.Diff; + +import javax.xml.transform.stream.StreamSource; import java.io.BufferedReader; import java.io.ByteArrayOutputStream; import java.io.File; @@ -26,17 +33,9 @@ import java.io.FileInputStream; import java.io.FileReader; import java.io.FileWriter; import java.io.InputStream; +import java.io.UnsupportedEncodingException; import java.util.ArrayList; -import javax.xml.transform.stream.StreamSource; - -import junit.framework.TestCase; - -import org.apache.axis2.util.XMLPrettyPrinter; -import org.apache.ws.commons.schema.XmlSchema; -import org.apache.ws.commons.schema.XmlSchemaCollection; -import org.custommonkey.xmlunit.Diff; - public abstract class XMLSchemaTest extends TestCase { public final String XMLSchemaNameSpace = "xmlns:xs=\"http://www.w3.org/2001/XMLSchema\""; @@ -79,7 +78,7 @@ public abstract class XMLSchemaTest exte while (file.exists()) { InputStream is = new FileInputStream(file); XmlSchemaCollection schemaCol = new XmlSchemaCollection(); - XmlSchema schema = schemaCol.read(new StreamSource(is), null); + XmlSchema schema = schemaCol.read(new StreamSource(is)); schemas.add(schema); i++; file = new File(SampleSchemasDirectory + "sampleSchema" + i @@ -93,7 +92,7 @@ public abstract class XMLSchemaTest exte + ".xsd"); InputStream is = new FileInputStream(file); XmlSchemaCollection schemaCol = new XmlSchemaCollection(); - XmlSchema schema = schemaCol.read(new StreamSource(is), null); + XmlSchema schema = schemaCol.read(new StreamSource(is)); return schema; } @@ -115,7 +114,7 @@ public abstract class XMLSchemaTest exte public String readXMLfromSchemaFile(String path) throws Exception { InputStream is = new FileInputStream(path); XmlSchemaCollection schemaCol = new XmlSchemaCollection(); - XmlSchema schema = schemaCol.read(new StreamSource(is), null); + XmlSchema schema = schemaCol.read(new StreamSource(is)); ByteArrayOutputStream stream = new ByteArrayOutputStream(); schema.write(stream); is.close(); @@ -136,7 +135,7 @@ public abstract class XMLSchemaTest exte fileWriter.close(); } - public String schemaToString(XmlSchema schema){ + public String schemaToString(XmlSchema schema) throws UnsupportedEncodingException { ByteArrayOutputStream stream=new ByteArrayOutputStream(); schema.write(stream); return stream.toString(); @@ -146,7 +145,7 @@ public abstract class XMLSchemaTest exte File file = new File(path); InputStream is = new FileInputStream(file); XmlSchemaCollection schemaCol = new XmlSchemaCollection(); - XmlSchema schema = schemaCol.read(new StreamSource(is), null); + XmlSchema schema = schemaCol.read(new StreamSource(is)); return schema; } Modified: axis/axis2/java/core/trunk/modules/transport/xmpp/src/org/apache/axis2/transport/xmpp/XMPPSender.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/transport/xmpp/src/org/apache/axis2/transport/xmpp/XMPPSender.java?rev=1536050&r1=1536049&r2=1536050&view=diff ============================================================================== --- axis/axis2/java/core/trunk/modules/transport/xmpp/src/org/apache/axis2/transport/xmpp/XMPPSender.java (original) +++ axis/axis2/java/core/trunk/modules/transport/xmpp/src/org/apache/axis2/transport/xmpp/XMPPSender.java Sun Oct 27 05:48:34 2013 @@ -19,12 +19,6 @@ package org.apache.axis2.transport.xmpp; -import java.util.Iterator; -import java.util.Map; -import java.util.UUID; - -import javax.xml.namespace.QName; - import org.apache.axiom.om.OMElement; import org.apache.axiom.soap.SOAP12Version; import org.apache.axiom.soap.SOAPVersion; @@ -56,9 +50,9 @@ import org.apache.commons.logging.LogFac import org.apache.ws.commons.schema.XmlSchemaAll; import org.apache.ws.commons.schema.XmlSchemaComplexType; import org.apache.ws.commons.schema.XmlSchemaElement; -import org.apache.ws.commons.schema.XmlSchemaGroupBase; import org.apache.ws.commons.schema.XmlSchemaParticle; import org.apache.ws.commons.schema.XmlSchemaSequence; +import org.apache.ws.commons.schema.XmlSchemaSequenceMember; import org.apache.ws.commons.schema.XmlSchemaType; import org.jivesoftware.smack.Chat; import org.jivesoftware.smack.ChatManager; @@ -68,6 +62,11 @@ import org.jivesoftware.smack.filter.Pac import org.jivesoftware.smack.filter.PacketTypeFilter; import org.jivesoftware.smack.packet.Message; +import javax.xml.namespace.QName; +import java.util.Iterator; +import java.util.Map; +import java.util.UUID; + public class XMPPSender extends AbstractHandler implements TransportSender { static Log log = null; @@ -342,24 +341,40 @@ public class XMPPSender extends Abstract XmlSchemaComplexType complexType = ((XmlSchemaComplexType)schemaType); XmlSchemaParticle particle = complexType.getParticle(); if (particle instanceof XmlSchemaSequence || particle instanceof XmlSchemaAll) { - XmlSchemaGroupBase xmlSchemaGroupBase = (XmlSchemaGroupBase)particle; - Iterator iterator = xmlSchemaGroupBase.getItems().getIterator(); - while (iterator.hasNext()) { - XmlSchemaElement innerElement = (XmlSchemaElement)iterator.next(); - QName qName = innerElement.getQName(); - if (qName == null && innerElement.getSchemaTypeName() - .equals(org.apache.ws.commons.schema.constants.Constants.XSD_ANYTYPE)) { - break; - } - long minOccurs = innerElement.getMinOccurs(); - boolean nillable = innerElement.isNillable(); - String name = - qName != null ? qName.getLocalPart() : innerElement.getName(); - String type = innerElement.getSchemaTypeName().toString(); - paramList.append(","+type +" " +name); - } - } + if (particle instanceof XmlSchemaSequence) { + XmlSchemaSequence sequence = (XmlSchemaSequence) particle; + for (XmlSchemaSequenceMember member : sequence.getItems()) { + XmlSchemaElement innerElement = (XmlSchemaElement) member; + QName qName = innerElement.getQName(); + if (qName == null && innerElement.getSchemaTypeName() + .equals(org.apache.ws.commons.schema.constants.Constants.XSD_ANYTYPE)) { + break; + } + long minOccurs = innerElement.getMinOccurs(); + boolean nillable = innerElement.isNillable(); + String name = + qName != null ? qName.getLocalPart() : innerElement.getName(); + String type = innerElement.getSchemaTypeName().toString(); + paramList.append(","+type +" " +name); + } + } else { + XmlSchemaAll xmlSchemaAll = (XmlSchemaAll) particle; + for (XmlSchemaElement innerElement : xmlSchemaAll.getItems()) { + QName qName = innerElement.getQName(); + if (qName == null && innerElement.getSchemaTypeName() + .equals(org.apache.ws.commons.schema.constants.Constants.XSD_ANYTYPE)) { + break; + } + long minOccurs = innerElement.getMinOccurs(); + boolean nillable = innerElement.isNillable(); + String name = + qName != null ? qName.getLocalPart() : innerElement.getName(); + String type = innerElement.getSchemaTypeName().toString(); + paramList.append("," + type + " " + name); + } + } + } } } //remove first "," Modified: axis/axis2/java/core/trunk/modules/xmlbeans/src/org/apache/axis2/xmlbeans/CodeGenerationUtility.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/xmlbeans/src/org/apache/axis2/xmlbeans/CodeGenerationUtility.java?rev=1536050&r1=1536049&r2=1536050&view=diff ============================================================================== --- axis/axis2/java/core/trunk/modules/xmlbeans/src/org/apache/axis2/xmlbeans/CodeGenerationUtility.java (original) +++ axis/axis2/java/core/trunk/modules/xmlbeans/src/org/apache/axis2/xmlbeans/CodeGenerationUtility.java Sun Oct 27 05:48:34 2013 @@ -62,6 +62,7 @@ import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.io.StringWriter; +import java.io.UnsupportedEncodingException; import java.io.Writer; import java.net.URL; import java.util.ArrayList; @@ -703,10 +704,11 @@ public class CodeGenerationUtility { * * @param schema */ - private InputStream getSchemaAsInputStream(XmlSchema schema){ - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - schema.write(baos); - return new ByteArrayInputStream(baos.toByteArray()); + private InputStream getSchemaAsInputStream(XmlSchema schema) + throws UnsupportedEncodingException { + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + schema.write(baos); + return new ByteArrayInputStream(baos.toByteArray()); } }