diff options
author | nash <nash@13f79535-47bb-0310-9956-ffa450edef68> | 2008-09-15 12:07:34 +0000 |
---|---|---|
committer | nash <nash@13f79535-47bb-0310-9956-ffa450edef68> | 2008-09-15 12:07:34 +0000 |
commit | 94b8f6bd2b7c97d4141517673fa49624b63fda8e (patch) | |
tree | 10fddfe924e8cc695f4b133d00b20693d85141c9 /java/sca/modules/binding-ws-wsdlgen/src | |
parent | 25d7a83860bee50b396accf2ba34018ab37599fe (diff) |
Fix TUSCANY-2531
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@695444 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/binding-ws-wsdlgen/src')
-rw-r--r-- | java/sca/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/java/sca/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGenerator.java b/java/sca/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGenerator.java index c84e2e3ebe..933534cc79 100644 --- a/java/sca/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGenerator.java +++ b/java/sca/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()); } |