summaryrefslogtreecommitdiffstats
path: root/branches/sca-java-1.3/modules/binding-ws-wsdlgen
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2008-07-08 22:55:15 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2008-07-08 22:55:15 +0000
commita54ec2b53c3e478c61bc5c71548321ba33017773 (patch)
tree4cb7b66a33da3df2735f4776ec18cec22327acab /branches/sca-java-1.3/modules/binding-ws-wsdlgen
parent78c0e27338ae7dd0f37eaf137724e070cb1745d7 (diff)
Merge one more change from trunk for TUSCANY-2465 (r675013)
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@675016 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-java-1.3/modules/binding-ws-wsdlgen')
-rw-r--r--branches/sca-java-1.3/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGenerator.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/branches/sca-java-1.3/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGenerator.java b/branches/sca-java-1.3/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGenerator.java
index 624dcadb0f..2e8e34853e 100644
--- a/branches/sca-java-1.3/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGenerator.java
+++ b/branches/sca-java-1.3/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGenerator.java
@@ -20,6 +20,7 @@
package org.apache.tuscany.sca.binding.ws.wsdlgen;
import java.lang.reflect.Method;
+import java.net.URI;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
@@ -266,6 +267,7 @@ public class Interface2WSDLGenerator {
// generate schema elements for wrappers that aren't defined in the schemas
if (wrappers.size() > 0) {
int i = 0;
+ int index = 0;
Map<String, XSDefinition> wrapperXSDs = new HashMap<String, XSDefinition>();
Map<Element, Map<String, String>> prefixMaps = new HashMap<Element, Map<String, String>>();
for (Map.Entry<QName, List<ElementInfo>> entry: wrappers.entrySet()) {
@@ -292,6 +294,9 @@ public class Interface2WSDLGenerator {
xsDef.setUnresolved(true);
xsDef.setNamespace(targetNS);
xsDef.setDocument(schemaDoc);
+ // TUSCANY-2465: Set the system id to avoid schema conflict
+ xsDef.setLocation(URI.create("xsd_" + index + ".xsd"));
+ index++;
wrapperXSDs.put(targetNS, xsDef);
}
Element wrapper = schemaDoc.createElementNS(SCHEMA_NS, "xs:element");