summaryrefslogtreecommitdiffstats
path: root/branches/sca-java-1.3.2/modules/binding-ws-wsdlgen
diff options
context:
space:
mode:
authornash <nash@13f79535-47bb-0310-9956-ffa450edef68>2008-09-15 14:49:05 +0000
committernash <nash@13f79535-47bb-0310-9956-ffa450edef68>2008-09-15 14:49:05 +0000
commitecfc25c5a329a3e7528d8aff7279adfd68965806 (patch)
treed181e6208c80d9112a7171aa4d8039e26954e0ab /branches/sca-java-1.3.2/modules/binding-ws-wsdlgen
parent976ee1420e413186a70c74c504a0160f9ee37c2e (diff)
Fix TUSCANY-2531
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@695485 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-java-1.3.2/modules/binding-ws-wsdlgen')
-rw-r--r--branches/sca-java-1.3.2/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGenerator.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/branches/sca-java-1.3.2/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGenerator.java b/branches/sca-java-1.3.2/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGenerator.java
index b8f5b356dd..0fa8773c65 100644
--- a/branches/sca-java-1.3.2/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGenerator.java
+++ b/branches/sca-java-1.3.2/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGenerator.java
@@ -352,18 +352,20 @@ public class Interface2WSDLGenerator {
if ("".equals(nsURI)) {
xsElement.setAttribute("type", typeName.getLocalPart());
addSchemaImport(schema, "", schemaDoc);
- } else if (targetNS.equals(nsURI)) {
- xsElement.setAttribute("type", typeName.getLocalPart());
} else if (SCHEMA_NS.equals(nsURI)) {
xsElement.setAttribute("type", "xs:" + typeName.getLocalPart());
} else {
Map<String, String> prefixMap = prefixMaps.get(schema);
String prefix = prefixMap.get(nsURI);
if (prefix == null) {
- prefix = "ns" + i++;
+ if (targetNS.equals(nsURI)) {
+ prefix = "tns";
+ } else {
+ prefix = "ns" + i++;
+ addSchemaImport(schema, nsURI, schemaDoc);
+ }
prefixMap.put(nsURI, prefix);
schema.setAttributeNS(XMLNS_NS, "xmlns:" + prefix, nsURI);
- addSchemaImport(schema, nsURI, schemaDoc);
}
xsElement.setAttribute("type", prefix + ":" + typeName.getLocalPart());
}