diff options
author | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2008-09-17 05:40:57 +0000 |
---|---|---|
committer | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2008-09-17 05:40:57 +0000 |
commit | 19e2a4048613e0c5bc00ba7d67ebf14cf0baa291 (patch) | |
tree | d854b17cc8843411b2eee18db026106bc7750467 /branches/sca-equinox/modules/binding-ws-wsdlgen/src | |
parent | 51547aa244d203aa3125ba22aba489eadfd616dc (diff) |
Fix TUSCANY-2531
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@696156 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-equinox/modules/binding-ws-wsdlgen/src')
-rw-r--r-- | branches/sca-equinox/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGenerator.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/branches/sca-equinox/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGenerator.java b/branches/sca-equinox/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGenerator.java index c84e2e3ebe..933534cc79 100644 --- a/branches/sca-equinox/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGenerator.java +++ b/branches/sca-equinox/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGenerator.java @@ -400,18 +400,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()); } |