summaryrefslogtreecommitdiffstats
path: root/branches/sca-java-1.x/modules/interface-wsdl/src/main
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2009-10-04 12:51:37 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2009-10-04 12:51:37 +0000
commitbfceace0eedf79ebde8690a698c8fb1264abab51 (patch)
tree92d02d8619a52e0b6e06ea8cb9fc6779deac9465 /branches/sca-java-1.x/modules/interface-wsdl/src/main
parente0beb57c3ae28ac37291fdc93a02c7140cd5d79f (diff)
TUSCANY-3283 re-enable the wrapper generation logic now that the no namespace handling is complete. Had to mess around with how the schema is generated using the schema collection as now the default schema is being extended with wrappers after schema has been generated. Before a new no namespace schema was being generated.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@821535 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-java-1.x/modules/interface-wsdl/src/main')
-rw-r--r--branches/sca-java-1.x/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/WSDLDefinition.java8
-rw-r--r--branches/sca-java-1.x/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/impl/WSDLDefinitionImpl.java10
2 files changed, 18 insertions, 0 deletions
diff --git a/branches/sca-java-1.x/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/WSDLDefinition.java b/branches/sca-java-1.x/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/WSDLDefinition.java
index 039e75f437..60f8647960 100644
--- a/branches/sca-java-1.x/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/WSDLDefinition.java
+++ b/branches/sca-java-1.x/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/WSDLDefinition.java
@@ -137,4 +137,12 @@ public interface WSDLDefinition extends Base {
* @param binding the WSDL binding
*/
void setBinding(Binding binding);
+
+ /**
+ * Find the schema definition for the provided namespace
+ *
+ * @param namespace
+ * @return the schema definition relating to the provided namespace or null if not found
+ */
+ XSDefinition getSchema(String namespace);
}
diff --git a/branches/sca-java-1.x/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/impl/WSDLDefinitionImpl.java b/branches/sca-java-1.x/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/impl/WSDLDefinitionImpl.java
index 16e9cf43f3..7dd6b28665 100644
--- a/branches/sca-java-1.x/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/impl/WSDLDefinitionImpl.java
+++ b/branches/sca-java-1.x/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/impl/WSDLDefinitionImpl.java
@@ -285,5 +285,15 @@ public class WSDLDefinitionImpl implements WSDLDefinition {
public void setBinding(Binding binding) {
this.binding = binding;
}
+
+ public XSDefinition getSchema(String namespace){
+ for (XSDefinition xsDef : schemas){
+ if (xsDef.getNamespace().equals(namespace)){
+ return xsDef;
+ }
+ }
+
+ return null;
+ }
}