You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by am...@apache.org on 2009/10/01 07:18:43 UTC
svn commit: r820534 -
/webservices/axis2/trunk/java/modules/xmlbeans/src/org/apache/axis2/xmlbeans/CodeGenerationUtility.java
Author: amilas
Date: Thu Oct 1 05:18:43 2009
New Revision: 820534
URL: http://svn.apache.org/viewvc?rev=820534&view=rev
Log:
fixing a possible issue as commented in AXIS2-3048. i.e having two xsds like supported.xsd and unsupported.xsd
Modified:
webservices/axis2/trunk/java/modules/xmlbeans/src/org/apache/axis2/xmlbeans/CodeGenerationUtility.java
Modified: webservices/axis2/trunk/java/modules/xmlbeans/src/org/apache/axis2/xmlbeans/CodeGenerationUtility.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/xmlbeans/src/org/apache/axis2/xmlbeans/CodeGenerationUtility.java?rev=820534&r1=820533&r2=820534&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/xmlbeans/src/org/apache/axis2/xmlbeans/CodeGenerationUtility.java (original)
+++ webservices/axis2/trunk/java/modules/xmlbeans/src/org/apache/axis2/xmlbeans/CodeGenerationUtility.java Thu Oct 1 05:18:43 2009
@@ -623,8 +623,19 @@
try {
for (int i = 0; i < schemas.length; i++) {
XmlSchema schema = schemas[i];
+
if (schema.getSourceURI() != null &&
schema.getSourceURI().endsWith(systemId.replaceAll("\\\\", "/"))) {
+
+ // if source uri does not contain any / then it should match
+ // with the final part of the system ID
+ if (schema.getSourceURI().indexOf("/") == -1){
+ String systemIDFinalPath = systemId.substring(systemId.indexOf("/") + 1);
+ if (!systemIDFinalPath.equals(schema.getSourceURI())){
+ continue;
+ }
+ }
+
String path = schema.getSourceURI();
File f = getFileFromURI(path);
if(f.exists()){