diff options
author | nash <nash@13f79535-47bb-0310-9956-ffa450edef68> | 2008-07-25 12:09:35 +0000 |
---|---|---|
committer | nash <nash@13f79535-47bb-0310-9956-ffa450edef68> | 2008-07-25 12:09:35 +0000 |
commit | c2d02c05c8e0a886cdce693b1abd8341b23dc464 (patch) | |
tree | 0c2cd4e3d4174250270a95f0dc952b91f9963a90 /java/sca/modules/binding-ws-wsdlgen | |
parent | 8ae097d142aeb570f17a36ab3c8a8487e9ebbf64 (diff) |
Copy 1.3 branch revisions 678491, 678875, 679082, 679205, 679334 and 679385
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@679774 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/binding-ws-wsdlgen')
3 files changed, 10 insertions, 2 deletions
diff --git a/java/sca/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/BindingWSDLGenerator.java b/java/sca/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/BindingWSDLGenerator.java index b8ddb9f51a..d94ed30c34 100644 --- a/java/sca/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/BindingWSDLGenerator.java +++ b/java/sca/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/BindingWSDLGenerator.java @@ -30,6 +30,7 @@ import javax.xml.namespace.QName; import org.apache.tuscany.sca.assembly.AbstractContract; import org.apache.tuscany.sca.assembly.Component; +import org.apache.tuscany.sca.assembly.Contract; import org.apache.tuscany.sca.assembly.builder.BindingBuilderExtension; import org.apache.tuscany.sca.assembly.builder.impl.ProblemImpl; import org.apache.tuscany.sca.binding.ws.WebServiceBinding; @@ -190,14 +191,14 @@ public class BindingWSDLGenerator { WSDLFactory wsdlFactory = modelFactories.getFactory(WSDLFactory.class); XSDFactory xsdFactory = modelFactories.getFactory(XSDFactory.class); - if (contract.getInterfaceContract() == null) { + if (((Contract)contract).getInterfaceContract(wsBinding) == null) { // can happen if incorrect component service name fatal(monitor, "MissingInterfaceContract", wsBinding, component.getName(), contract.getName()); } InterfaceContract icontract = wsBinding.getBindingInterfaceContract(); if (icontract == null) { - icontract = contract.getInterfaceContract().makeUnidirectional(false); + icontract = ((Contract)contract).getInterfaceContract(wsBinding).makeUnidirectional(false); if (icontract instanceof JavaInterfaceContract) { ModelResolver resolver = component instanceof ResolverExtension ? ((ResolverExtension)component).getModelResolver() : null; diff --git a/java/sca/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/WSDLServiceGenerator.java b/java/sca/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/WSDLServiceGenerator.java index 407877c36d..d2e2e9eb34 100644 --- a/java/sca/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/WSDLServiceGenerator.java +++ b/java/sca/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/WSDLServiceGenerator.java @@ -151,13 +151,19 @@ public class WSDLServiceGenerator { AbstractContract contract, Monitor monitor) { + //[nash] changes to the builder sequence avoid calling this for a CompositeService + assert !(contract instanceof CompositeService); + /* // For every promoted composite service, the underlying component // gets a copy of the service with the name prefixed by "$promoted$." String contractName = (contract instanceof CompositeService ? "$promoted$." : "") + contract.getName(); + */ + String contractName = contract.getName(); List<Port> ports = new ArrayList<Port>(); WSDLDefinition wsdlDefinition = wsBinding.getWSDLDefinition(); if (wsdlDefinition == null) { + error(monitor, "NoWsdlInterface", wsBinding, component.getName(), contract.getName()); return null; } Definition def = wsdlDefinition.getDefinition(); diff --git a/java/sca/modules/binding-ws-wsdlgen/src/main/resources/wsdlgen-validation-messages.properties b/java/sca/modules/binding-ws-wsdlgen/src/main/resources/wsdlgen-validation-messages.properties index 91e99f1891..4bfbdd2901 100644 --- a/java/sca/modules/binding-ws-wsdlgen/src/main/resources/wsdlgen-validation-messages.properties +++ b/java/sca/modules/binding-ws-wsdlgen/src/main/resources/wsdlgen-validation-messages.properties @@ -28,3 +28,4 @@ PortTypeNotFound = PortType {0} in {1}/{2} was not found BindingNotFound = Binding {0} in {1}/{2} was not found InvalidPort = Port {0}/{1} in {2}/{3} is not supported NoValidPorts = No valid ports for service {0} in {1}/{2} +NoWsdlInterface = No WSDL interface definition for {1}/{2} |