summaryrefslogtreecommitdiffstats
path: root/java/sca/modules/binding-ws-wsdlgen/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'java/sca/modules/binding-ws-wsdlgen/src/main')
-rw-r--r--java/sca/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/BindingWSDLGenerator.java5
-rw-r--r--java/sca/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/WSDLServiceGenerator.java6
-rw-r--r--java/sca/modules/binding-ws-wsdlgen/src/main/resources/wsdlgen-validation-messages.properties1
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}