axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dee...@apache.org
Subject svn commit: r627418 - in /webservices/axis2/trunk/java/modules: jaxbri/src/org/apache/axis2/jaxbri/ kernel/src/org/apache/axis2/description/java2wsdl/
Date Wed, 13 Feb 2008 14:13:44 GMT
Author: deepal
Date: Wed Feb 13 06:13:41 2008
New Revision: 627418

URL: http://svn.apache.org/viewvc?rev=627418&view=rev
Log:
fixing schema import issue with Java2WSDL

Modified:
    webservices/axis2/trunk/java/modules/jaxbri/src/org/apache/axis2/jaxbri/JaxbSchemaGenerator.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/java2wsdl/DocLitBareSchemaGenerator.java

Modified: webservices/axis2/trunk/java/modules/jaxbri/src/org/apache/axis2/jaxbri/JaxbSchemaGenerator.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxbri/src/org/apache/axis2/jaxbri/JaxbSchemaGenerator.java?rev=627418&r1=627417&r2=627418&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxbri/src/org/apache/axis2/jaxbri/JaxbSchemaGenerator.java
(original)
+++ webservices/axis2/trunk/java/modules/jaxbri/src/org/apache/axis2/jaxbri/JaxbSchemaGenerator.java
Wed Feb 13 06:13:41 2008
@@ -185,6 +185,7 @@
         if (schemaTypeName == null) {
             list.add(type);
         }
+        addImport(getXmlSchema(schemaTargetNameSpace), schemaTypeName);
     }
 
     protected List<DOMResult> generateJaxbSchemas(JAXBContext context) throws IOException
{

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java?rev=627418&r1=627417&r2=627418&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java
Wed Feb 13 06:13:41 2008
@@ -691,7 +691,7 @@
                     partName,
                     isArrayType);
         }
-
+        addImport(getXmlSchema(schemaTargetNameSpace), schemaTypeName);
         return schemaTypeName;
     }
 
@@ -791,7 +791,7 @@
         return null;
     }
 
-    private XmlSchema getXmlSchema(String targetNamespace) {
+    protected XmlSchema getXmlSchema(String targetNamespace) {
         XmlSchema xmlSchema;
 
         if ((xmlSchema = (XmlSchema) schemaMap.get(targetNamespace)) == null) {
@@ -845,6 +845,11 @@
 
     protected void addImport(XmlSchema xmlSchema, QName schemaTypeName) {
         NamespacePrefixList map = xmlSchema.getNamespaceContext();
+        if (map == null ||
+                ((map instanceof NamespaceMap) && ((NamespaceMap) map).values() ==
null) ||
+                schemaTypeName == null){
+            return;
+        }
         if (map instanceof NamespaceMap && !((NamespaceMap) map).values().
                 contains(schemaTypeName.getNamespaceURI())) {
             XmlSchemaImport importElement = new XmlSchemaImport();

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/java2wsdl/DocLitBareSchemaGenerator.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/java2wsdl/DocLitBareSchemaGenerator.java?rev=627418&r1=627417&r2=627418&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/java2wsdl/DocLitBareSchemaGenerator.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/java2wsdl/DocLitBareSchemaGenerator.java
Wed Feb 13 06:13:41 2008
@@ -289,7 +289,7 @@
                         isArrayType);
             }
         }
-
+        addImport(getXmlSchema(schemaTargetNameSpace), schemaTypeName);
         return schemaTypeName;
     }
 
@@ -510,7 +510,7 @@
         return complexType;
     }
 
-    private XmlSchema getXmlSchema(String targetNamespace) {
+    protected XmlSchema getXmlSchema(String targetNamespace) {
         XmlSchema xmlSchema;
 
         if ((xmlSchema = (XmlSchema) schemaMap.get(targetNamespace)) == null) {



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message