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 [5/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...

Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/kernel/test-resources/wsdl/testGenerateInterfaceOperationElement11_WSDL.wsdl
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/kernel/test-resources/wsdl/testGenerateInterfaceOperationElement11_WSDL.wsdl?rev=1818516&r1=1818515&r2=1818516&view=diff
==============================================================================
--- axis/axis2/java/core/branches/AXIS2-4091/modules/kernel/test-resources/wsdl/testGenerateInterfaceOperationElement11_WSDL.wsdl (original)
+++ axis/axis2/java/core/branches/AXIS2-4091/modules/kernel/test-resources/wsdl/testGenerateInterfaceOperationElement11_WSDL.wsdl Sun Dec 17 22:16:04 2017
@@ -1,5 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
+<?xml version="1.0" encoding="UTF-8"?><!--
   ~ Licensed to the Apache Software Foundation (ASF) under one
   ~ or more contributor license agreements. See the NOTICE file
   ~ distributed with this work for additional information
@@ -16,8 +15,7 @@
   ~ KIND, either express or implied. See the License for the
   ~ specific language governing permissions and limitations
   ~ under the License.
-  -->
-<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:tns="http://ws.apache.org/axis2" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://ws.apache.org/axis2">
+  --><wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:tns="http://ws.apache.org/axis2" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://ws.apache.org/axis2">
     <wsdl:types/>
     <wsdl:portType name="testPortType">
         <wsdl:operation name="test">

Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/kernel/test-resources/wsdl/testGenerateInterfaceOperationElement_WSDL.wsdl
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/kernel/test-resources/wsdl/testGenerateInterfaceOperationElement_WSDL.wsdl?rev=1818516&r1=1818515&r2=1818516&view=diff
==============================================================================
--- axis/axis2/java/core/branches/AXIS2-4091/modules/kernel/test-resources/wsdl/testGenerateInterfaceOperationElement_WSDL.wsdl (original)
+++ axis/axis2/java/core/branches/AXIS2-4091/modules/kernel/test-resources/wsdl/testGenerateInterfaceOperationElement_WSDL.wsdl Sun Dec 17 22:16:04 2017
@@ -1,5 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
+<?xml version="1.0" encoding="UTF-8"?><!--
   ~ Licensed to the Apache Software Foundation (ASF) under one
   ~ or more contributor license agreements. See the NOTICE file
   ~ distributed with this work for additional information
@@ -16,8 +15,7 @@
   ~ KIND, either express or implied. See the License for the
   ~ specific language governing permissions and limitations
   ~ under the License.
-  -->
-<wsdl2:description xmlns:wsdl2="http://www.w3.org/ns/wsdl" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:tns="http://ws.apache.org/axis2" xmlns:wsoap="http://www.w3.org/ns/wsdl/soap" xmlns:wrpc="http://www.w3.org/ns/wsdl/rpc" xmlns:wsdlx="http://www.w3.org/ns/wsdl-extensions" xmlns:whttp="http://www.w3.org/ns/wsdl/http" targetNamespace="http://ws.apache.org/axis2">
+  --><wsdl2:description xmlns:wsdl2="http://www.w3.org/ns/wsdl" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:tns="http://ws.apache.org/axis2" xmlns:wsoap="http://www.w3.org/ns/wsdl/soap" xmlns:wrpc="http://www.w3.org/ns/wsdl/rpc" xmlns:wsdlx="http://www.w3.org/ns/wsdl-extensions" xmlns:whttp="http://www.w3.org/ns/wsdl/http" targetNamespace="http://ws.apache.org/axis2">
     <wsdl2:types/>
     <wsdl2:interface name="ServiceInterface">
         <wsdl2:operation name="test" pattern="http://www.w3.org/ns/wsdl/in-out">

Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/kernel/test/org/apache/axis2/description/AxisServiceTest.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/kernel/test/org/apache/axis2/description/AxisServiceTest.java?rev=1818516&r1=1818515&r2=1818516&view=diff
==============================================================================
--- axis/axis2/java/core/branches/AXIS2-4091/modules/kernel/test/org/apache/axis2/description/AxisServiceTest.java (original)
+++ axis/axis2/java/core/branches/AXIS2-4091/modules/kernel/test/org/apache/axis2/description/AxisServiceTest.java Sun Dec 17 22:16:04 2017
@@ -19,17 +19,6 @@
 
 package org.apache.axis2.description;
 
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.InputStream;
-import java.io.ObjectOutputStream;
-import java.util.ArrayList;
-
-import javax.xml.namespace.QName;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.transform.stream.StreamSource;
-
 import org.apache.axis2.context.ConfigurationContext;
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.context.ServiceContext;
@@ -44,6 +33,16 @@ import org.apache.ws.commons.schema.XmlS
 import org.w3c.dom.ls.DOMImplementationLS;
 import org.w3c.dom.ls.LSSerializer;
 
+import javax.xml.namespace.QName;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.transform.stream.StreamSource;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.InputStream;
+import java.io.ObjectOutputStream;
+import java.util.ArrayList;
+
 public class AxisServiceTest extends XMLSchemaTest {
     public static final String PARAM_NAME = "CustomParameter";
     public static final Object PARAM_VALUE = new Object();
@@ -256,7 +255,7 @@ public class AxisServiceTest extends XML
     public void testPrintXSD() throws Exception {
         InputStream is = new FileInputStream(SampleSchemasDirectory + "sampleSchema1.xsd");
         XmlSchemaCollection schemaCol = new XmlSchemaCollection();
-        XmlSchema schema = schemaCol.read(new StreamSource(is), null);
+        XmlSchema schema = schemaCol.read(new StreamSource(is));
         ByteArrayOutputStream stream = new ByteArrayOutputStream();
         ArrayList<XmlSchema> xmlSchemas = new ArrayList<XmlSchema>();
         xmlSchemas.add(schema);

Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/kernel/test/org/apache/axis2/description/WSDL11ToAxisServiceBuilderTest.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/kernel/test/org/apache/axis2/description/WSDL11ToAxisServiceBuilderTest.java?rev=1818516&r1=1818515&r2=1818516&view=diff
==============================================================================
--- axis/axis2/java/core/branches/AXIS2-4091/modules/kernel/test/org/apache/axis2/description/WSDL11ToAxisServiceBuilderTest.java (original)
+++ axis/axis2/java/core/branches/AXIS2-4091/modules/kernel/test/org/apache/axis2/description/WSDL11ToAxisServiceBuilderTest.java Sun Dec 17 22:16:04 2017
@@ -22,7 +22,6 @@ import java.io.FileInputStream;
 import java.io.InputStream;
 import java.util.List;
 import java.util.ArrayList;
-import java.util.Iterator;
 import java.util.Set;
 import java.util.HashSet;
 
@@ -31,7 +30,6 @@ import javax.xml.namespace.QName;
 import org.apache.ws.commons.schema.XmlSchema;
 import org.apache.ws.commons.schema.XmlSchemaElement;
 import org.apache.ws.commons.schema.XmlSchemaObject;
-import org.apache.ws.commons.schema.XmlSchemaObjectCollection;
 
 import junit.framework.TestCase;
 
@@ -85,9 +83,7 @@ public class WSDL11ToAxisServiceBuilderT
         // Iterate over all schema documents
         for (int i = 0; i < schemaDocuments.size(); i++) {
             XmlSchema schemaDocument = (XmlSchema)schemaDocuments.get(i);
-            XmlSchemaObjectCollection items = schemaDocument.getItems();
-            for (Iterator itemsIt = items.getIterator(); itemsIt.hasNext();) {
-                XmlSchemaObject xmlSchemaObject = (XmlSchemaObject)itemsIt.next();
+            for (XmlSchemaObject xmlSchemaObject : schemaDocument.getItems()) {
                 // Check only XML schema elements
                 if (xmlSchemaObject instanceof XmlSchemaElement) {
                     QName elementName = ((XmlSchemaElement)xmlSchemaObject).getQName();

Modified: axis/axis2/java/core/branches/AXIS2-4091/modules/kernel/test/org/apache/axis2/description/java2wsdl/DefaultSchemaGeneratorTest.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/kernel/test/org/apache/axis2/description/java2wsdl/DefaultSchemaGeneratorTest.java?rev=1818516&r1=1818515&r2=1818516&view=diff
==============================================================================
--- axis/axis2/java/core/branches/AXIS2-4091/modules/kernel/test/org/apache/axis2/description/java2wsdl/DefaultSchemaGeneratorTest.java (original)
+++ axis/axis2/java/core/branches/AXIS2-4091/modules/kernel/test/org/apache/axis2/description/java2wsdl/DefaultSchemaGeneratorTest.java Sun Dec 17 22:16:04 2017
@@ -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/branches/AXIS2-4091/modules/kernel/test/org/apache/axis2/description/java2wsdl/XMLSchemaTest.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/kernel/test/org/apache/axis2/description/java2wsdl/XMLSchemaTest.java?rev=1818516&r1=1818515&r2=1818516&view=diff
==============================================================================
--- axis/axis2/java/core/branches/AXIS2-4091/modules/kernel/test/org/apache/axis2/description/java2wsdl/XMLSchemaTest.java (original)
+++ axis/axis2/java/core/branches/AXIS2-4091/modules/kernel/test/org/apache/axis2/description/java2wsdl/XMLSchemaTest.java Sun Dec 17 22:16:04 2017
@@ -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/branches/AXIS2-4091/modules/parent/pom.xml
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/parent/pom.xml?rev=1818516&r1=1818515&r2=1818516&view=diff
==============================================================================
--- axis/axis2/java/core/branches/AXIS2-4091/modules/parent/pom.xml (original)
+++ axis/axis2/java/core/branches/AXIS2-4091/modules/parent/pom.xml Sun Dec 17 22:16:04 2017
@@ -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/branches/AXIS2-4091/modules/tool/axis2-ant-plugin/pom.xml
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/tool/axis2-ant-plugin/pom.xml?rev=1818516&r1=1818515&r2=1818516&view=diff
==============================================================================
--- axis/axis2/java/core/branches/AXIS2-4091/modules/tool/axis2-ant-plugin/pom.xml (original)
+++ axis/axis2/java/core/branches/AXIS2-4091/modules/tool/axis2-ant-plugin/pom.xml Sun Dec 17 22:16:04 2017
@@ -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/branches/AXIS2-4091/modules/tool/axis2-idea-plugin/pom.xml
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/tool/axis2-idea-plugin/pom.xml?rev=1818516&r1=1818515&r2=1818516&view=diff
==============================================================================
--- axis/axis2/java/core/branches/AXIS2-4091/modules/tool/axis2-idea-plugin/pom.xml (original)
+++ axis/axis2/java/core/branches/AXIS2-4091/modules/tool/axis2-idea-plugin/pom.xml Sun Dec 17 22:16:04 2017
@@ -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/branches/AXIS2-4091/modules/transport/http/test/org/apache/axis2/transport/http/XMLSchemaTest.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/transport/http/test/org/apache/axis2/transport/http/XMLSchemaTest.java?rev=1818516&r1=1818515&r2=1818516&view=diff
==============================================================================
--- axis/axis2/java/core/branches/AXIS2-4091/modules/transport/http/test/org/apache/axis2/transport/http/XMLSchemaTest.java (original)
+++ axis/axis2/java/core/branches/AXIS2-4091/modules/transport/http/test/org/apache/axis2/transport/http/XMLSchemaTest.java Sun Dec 17 22:16:04 2017
@@ -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/branches/AXIS2-4091/modules/transport/xmpp/src/org/apache/axis2/transport/xmpp/XMPPSender.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/transport/xmpp/src/org/apache/axis2/transport/xmpp/XMPPSender.java?rev=1818516&r1=1818515&r2=1818516&view=diff
==============================================================================
--- axis/axis2/java/core/branches/AXIS2-4091/modules/transport/xmpp/src/org/apache/axis2/transport/xmpp/XMPPSender.java (original)
+++ axis/axis2/java/core/branches/AXIS2-4091/modules/transport/xmpp/src/org/apache/axis2/transport/xmpp/XMPPSender.java Sun Dec 17 22:16:04 2017
@@ -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/branches/AXIS2-4091/modules/xmlbeans/src/org/apache/axis2/xmlbeans/CodeGenerationUtility.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-4091/modules/xmlbeans/src/org/apache/axis2/xmlbeans/CodeGenerationUtility.java?rev=1818516&r1=1818515&r2=1818516&view=diff
==============================================================================
--- axis/axis2/java/core/branches/AXIS2-4091/modules/xmlbeans/src/org/apache/axis2/xmlbeans/CodeGenerationUtility.java (original)
+++ axis/axis2/java/core/branches/AXIS2-4091/modules/xmlbeans/src/org/apache/axis2/xmlbeans/CodeGenerationUtility.java Sun Dec 17 22:16:04 2017
@@ -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());
         }
     }