You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-commits@axis.apache.org by ve...@apache.org on 2017/12/17 22:16:05 UTC

svn commit: r1818516 [1/5] - in /axis/axis2/java/core/branches/AXIS2-4091: ./ modules/adb-codegen/ modules/adb-codegen/src/org/apache/axis2/schema/ modules/adb-codegen/src/org/apache/axis2/schema/template/ modules/adb-codegen/test/org/apache/axis2/sche...

Author: veithen
Date: Sun Dec 17 22:16:04 2017
New Revision: 1818516

URL: http://svn.apache.org/viewvc?rev=1818516&view=rev
Log:
Merge r1536050 from the trunk.

Modified:
    axis/axis2/java/core/branches/AXIS2-4091/   (props changed)
    axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/pom.xml
    axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/src/org/apache/axis2/schema/ExtensionUtility.java
    axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java
    axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl
    axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/test/org/apache/axis2/schema/XMLSchemaTest.java
    axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/test/org/apache/axis2/schema/extension/SimpleExtensionTest.java
    axis/axis2/java/core/branches/AXIS2-4091/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/JAXWSWapperExtension.java
    axis/axis2/java/core/branches/AXIS2-4091/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/SchemaUnwrapperExtension.java
    axis/axis2/java/core/branches/AXIS2-4091/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/WSDLValidatorExtension.java
    axis/axis2/java/core/branches/AXIS2-4091/modules/codegen/src/org/apache/axis2/wsdl/codegen/schema/AxisServiceTopElementSchemaGenerator.java
    axis/axis2/java/core/branches/AXIS2-4091/modules/codegen/test/org/apache/axis2/wsdl/codegen/XMLSchemaTest.java
    axis/axis2/java/core/branches/AXIS2-4091/modules/codegen/test/org/apache/axis2/wsdl/codegen/extension/SchemaUnwrapperExtensionTest.java
    axis/axis2/java/core/branches/AXIS2-4091/modules/codegen/test/org/apache/axis2/wsdl/codegen/extension/WSDLValidatorExtensionTest.java
    axis/axis2/java/core/branches/AXIS2-4091/modules/corba/src/org/apache/axis2/corba/deployer/CorbaConstants.java
    axis/axis2/java/core/branches/AXIS2-4091/modules/corba/src/org/apache/axis2/corba/deployer/SchemaGenerator.java
    axis/axis2/java/core/branches/AXIS2-4091/modules/fastinfoset/pom.xml
    axis/axis2/java/core/branches/AXIS2-4091/modules/integration/pom.xml
    axis/axis2/java/core/branches/AXIS2-4091/modules/java2wsdl/pom.xml
    axis/axis2/java/core/branches/AXIS2-4091/modules/jaxbri/src/main/java/org/apache/axis2/jaxbri/CodeGenerationUtility.java
    axis/axis2/java/core/branches/AXIS2-4091/modules/jaxbri/src/main/java/org/apache/axis2/jaxbri/JaxbSchemaGenerator.java
    axis/axis2/java/core/branches/AXIS2-4091/modules/jaxbri/src/test/java/org/temp/XMLSchemaTest.java
    axis/axis2/java/core/branches/AXIS2-4091/modules/jibx/src/main/java/org/apache/axis2/jibx/CodeGenerationUtility.java
    axis/axis2/java/core/branches/AXIS2-4091/modules/json/src/org/apache/axis2/json/gson/factory/XmlNodeGenerator.java
    axis/axis2/java/core/branches/AXIS2-4091/modules/json/test/org/apache/axis2/json/gson/GsonXMLStreamReaderTest.java
    axis/axis2/java/core/branches/AXIS2-4091/modules/json/test/org/apache/axis2/json/gson/GsonXMLStreamWriterTest.java
    axis/axis2/java/core/branches/AXIS2-4091/modules/json/test/org/apache/axis2/json/gson/JSONMessageHandlerTest.java
    axis/axis2/java/core/branches/AXIS2-4091/modules/json/test/org/apache/axis2/json/gson/JsonFormatterTest.java
    axis/axis2/java/core/branches/AXIS2-4091/modules/json/test/org/apache/axis2/json/gson/factory/XmlNodeGeneratorTest.java
    axis/axis2/java/core/branches/AXIS2-4091/modules/kernel/pom.xml
    axis/axis2/java/core/branches/AXIS2-4091/modules/kernel/src/org/apache/axis2/builder/BuilderUtil.java
    axis/axis2/java/core/branches/AXIS2-4091/modules/kernel/src/org/apache/axis2/description/AxisMessage.java
    axis/axis2/java/core/branches/AXIS2-4091/modules/kernel/src/org/apache/axis2/description/AxisService.java
    axis/axis2/java/core/branches/AXIS2-4091/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL20.java
    axis/axis2/java/core/branches/AXIS2-4091/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java
    axis/axis2/java/core/branches/AXIS2-4091/modules/kernel/src/org/apache/axis2/description/java2wsdl/DocLitBareSchemaGenerator.java
    axis/axis2/java/core/branches/AXIS2-4091/modules/kernel/src/org/apache/axis2/util/SchemaUtil.java
    axis/axis2/java/core/branches/AXIS2-4091/modules/kernel/test-resources/wsdl/printWSDLreference.wsdl
    axis/axis2/java/core/branches/AXIS2-4091/modules/kernel/test-resources/wsdl/testGenerateInterfaceOperationElement11_WSDL.wsdl
    axis/axis2/java/core/branches/AXIS2-4091/modules/kernel/test-resources/wsdl/testGenerateInterfaceOperationElement_WSDL.wsdl
    axis/axis2/java/core/branches/AXIS2-4091/modules/kernel/test/org/apache/axis2/description/AxisServiceTest.java
    axis/axis2/java/core/branches/AXIS2-4091/modules/kernel/test/org/apache/axis2/description/WSDL11ToAxisServiceBuilderTest.java
    axis/axis2/java/core/branches/AXIS2-4091/modules/kernel/test/org/apache/axis2/description/java2wsdl/DefaultSchemaGeneratorTest.java
    axis/axis2/java/core/branches/AXIS2-4091/modules/kernel/test/org/apache/axis2/description/java2wsdl/XMLSchemaTest.java
    axis/axis2/java/core/branches/AXIS2-4091/modules/parent/pom.xml
    axis/axis2/java/core/branches/AXIS2-4091/modules/tool/axis2-ant-plugin/pom.xml
    axis/axis2/java/core/branches/AXIS2-4091/modules/tool/axis2-idea-plugin/pom.xml
    axis/axis2/java/core/branches/AXIS2-4091/modules/transport/http/test/org/apache/axis2/transport/http/XMLSchemaTest.java
    axis/axis2/java/core/branches/AXIS2-4091/modules/transport/xmpp/src/org/apache/axis2/transport/xmpp/XMPPSender.java
    axis/axis2/java/core/branches/AXIS2-4091/modules/xmlbeans/src/org/apache/axis2/xmlbeans/CodeGenerationUtility.java

Propchange: axis/axis2/java/core/branches/AXIS2-4091/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Dec 17 22:16:04 2017
@@ -1,4 +1,4 @@
 /axis/axis2/java/core/branches/1_6:1295540
 /axis/axis2/java/core/branches/AXIOM-420:1334386-1336397
 /axis/axis2/java/core/branches/AXIS2-4318:1230452,1295542,1324772,1327468,1329571,1332141,1335355,1335357,1340985
-/axis/axis2/java/core/trunk:1441270-1536049
+/axis/axis2/java/core/trunk:1441270-1536050

Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/pom.xml
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/pom.xml?rev=1818516&r1=1818515&r2=1818516&view=diff
==============================================================================
--- axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/pom.xml (original)
+++ axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/pom.xml Sun Dec 17 22:16:04 2017
@@ -47,8 +47,8 @@
             <version>${project.version}</version>
         </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>commons-cli</groupId>
@@ -119,6 +119,7 @@
                         <exclude>**/*Util*.java</exclude>
                         <exclude>**/*PhaseResolvingTest.java</exclude>
                         <exclude>**/*UnionQNameTest.java</exclude>
+                        <exclude>**/*UnqualifiedTest.java</exclude>
                     </excludes>
                     <includes>
                         <include>**/*Test.java</include>

Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/src/org/apache/axis2/schema/ExtensionUtility.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/src/org/apache/axis2/schema/ExtensionUtility.java?rev=1818516&r1=1818515&r2=1818516&view=diff
==============================================================================
--- axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/src/org/apache/axis2/schema/ExtensionUtility.java (original)
+++ axis/axis2/java/core/branches/AXIS2-4091/modules/adb-codegen/src/org/apache/axis2/schema/ExtensionUtility.java Sun Dec 17 22:16:04 2017
@@ -46,9 +46,9 @@ import org.apache.ws.commons.schema.XmlS
 import org.apache.ws.commons.schema.XmlSchemaImport;
 import org.apache.ws.commons.schema.XmlSchemaInclude;
 import org.apache.ws.commons.schema.XmlSchemaObject;
-import org.apache.ws.commons.schema.XmlSchemaObjectCollection;
 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.XmlSchemaSimpleType;
 import org.apache.ws.commons.schema.XmlSchemaType;
 
@@ -356,10 +356,8 @@ public class ExtensionUtility {
                                    String opName,
                                    String qnameSuffix,
                                    TypeMapper typeMap) {
-        XmlSchemaObjectCollection xmlObjectCollection = complexType.getAttributes();
-        XmlSchemaObject item;
-        for (Iterator iter = xmlObjectCollection.getIterator(); iter.hasNext();) {
-            item = (XmlSchemaObject) iter.next();
+
+        for (XmlSchemaObject item : complexType.getAttributes()) {
             XmlSchemaAttribute xmlSchemaAttribute;
             if (item instanceof XmlSchemaAttribute) {
                 xmlSchemaAttribute = (XmlSchemaAttribute) item;
@@ -380,24 +378,20 @@ public class ExtensionUtility {
         if (schema != null) {
             xmlSchemaType = schema.getTypeByName(typeName);
             if (xmlSchemaType == null) {
-                // try to find in an import or an include
-                XmlSchemaObjectCollection includes = schema.getIncludes();
-                if (includes != null) {
-                    Iterator includesIter = includes.getIterator();
-                    Object object = null;
-                    while (includesIter.hasNext()) {
-                        object = includesIter.next();
-                        if (object instanceof XmlSchemaImport) {
-                            XmlSchema schema1 = ((XmlSchemaImport) object).getSchema();
-                            xmlSchemaType = getSchemaType(schema1,typeName);
-                        }
-                        if (object instanceof XmlSchemaInclude) {
-                            XmlSchema schema1 = ((XmlSchemaInclude) object).getSchema();
-                            xmlSchemaType = getSchemaType(schema1,typeName);
-                        }
-                        if (xmlSchemaType != null){
-                            break;
-                        }
+                // try to find in an import or an include) {
+
+                for (XmlSchemaObject object : schema.getExternals()) {
+
+                    if (object instanceof XmlSchemaImport) {
+                        XmlSchema schema1 = ((XmlSchemaImport) object).getSchema();
+                        xmlSchemaType = getSchemaType(schema1, typeName);
+                    }
+                    if (object instanceof XmlSchemaInclude) {
+                        XmlSchema schema1 = ((XmlSchemaInclude) object).getSchema();
+                        xmlSchemaType = getSchemaType(schema1, typeName);
+                    }
+                    if (xmlSchemaType != null) {
+                        break;
                     }
                 }
             }
@@ -440,9 +434,8 @@ public class ExtensionUtility {
                                               Map<String,XmlSchema> schemaMap,
                                               String qnameSuffix) {
         if (particle instanceof XmlSchemaSequence) {
-            XmlSchemaObjectCollection items = ((XmlSchemaSequence) particle).getItems();
-            for (Iterator i = items.getIterator(); i.hasNext();) {
-                Object item = i.next();
+          List<XmlSchemaSequenceMember> items = ((XmlSchemaSequence) particle).getItems();
+            for (XmlSchemaSequenceMember item : items) {
                 // get each and every element in the sequence and
                 // traverse through them
                 if (item instanceof XmlSchemaElement) {
@@ -453,8 +446,8 @@ public class ExtensionUtility {
 
                     XmlSchemaType schemaType = xmlSchemaElement.getSchemaType();
                     String partName = null;
-                    if (xmlSchemaElement.getRefName() != null) {
-                        partName = xmlSchemaElement.getRefName().getLocalPart();
+                    if (xmlSchemaElement.getRef().getTargetQName() != null) {
+                        partName = xmlSchemaElement.getRef().getTargetQName().getLocalPart();
                     } else {
                         partName = xmlSchemaElement.getName();
                     }