summaryrefslogtreecommitdiffstats
path: root/branches/sca-java-1.x/modules/binding-ws-xml/src/main/java/org/apache/tuscany/sca/binding/ws/xml/WebServiceBindingProcessor.java
diff options
context:
space:
mode:
authorramkumar <ramkumar@13f79535-47bb-0310-9956-ffa450edef68>2009-05-12 08:47:30 +0000
committerramkumar <ramkumar@13f79535-47bb-0310-9956-ffa450edef68>2009-05-12 08:47:30 +0000
commitcf52969d8a2d48928f1caaa8b0e6e2aa0074e7ed (patch)
treed126e4c33e205fafe3faaf9b3ec4200351a3842d /branches/sca-java-1.x/modules/binding-ws-xml/src/main/java/org/apache/tuscany/sca/binding/ws/xml/WebServiceBindingProcessor.java
parent86ab94b2c1b40fb112cda282ef347d7b1d0ac12d (diff)
Fix for TUSCANY-2962
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@773823 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-java-1.x/modules/binding-ws-xml/src/main/java/org/apache/tuscany/sca/binding/ws/xml/WebServiceBindingProcessor.java')
-rw-r--r--branches/sca-java-1.x/modules/binding-ws-xml/src/main/java/org/apache/tuscany/sca/binding/ws/xml/WebServiceBindingProcessor.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/branches/sca-java-1.x/modules/binding-ws-xml/src/main/java/org/apache/tuscany/sca/binding/ws/xml/WebServiceBindingProcessor.java b/branches/sca-java-1.x/modules/binding-ws-xml/src/main/java/org/apache/tuscany/sca/binding/ws/xml/WebServiceBindingProcessor.java
index 226362eb31..b54fa6b722 100644
--- a/branches/sca-java-1.x/modules/binding-ws-xml/src/main/java/org/apache/tuscany/sca/binding/ws/xml/WebServiceBindingProcessor.java
+++ b/branches/sca-java-1.x/modules/binding-ws-xml/src/main/java/org/apache/tuscany/sca/binding/ws/xml/WebServiceBindingProcessor.java
@@ -22,6 +22,7 @@ package org.apache.tuscany.sca.binding.ws.xml;
import static javax.xml.stream.XMLStreamConstants.END_ELEMENT;
import static javax.xml.stream.XMLStreamConstants.START_ELEMENT;
+import java.util.List;
import java.util.Map;
import javax.wsdl.Binding;
@@ -69,6 +70,8 @@ import org.apache.tuscany.sca.monitor.Problem.Severity;
import org.apache.tuscany.sca.policy.IntentAttachPointTypeFactory;
import org.apache.tuscany.sca.policy.PolicyFactory;
+import com.ibm.wsdl.OperationImpl;
+
/**
* This is the StAXArtifactProcessor for the Web Services Binding.
*
@@ -421,6 +424,19 @@ public class WebServiceBindingProcessor implements StAXArtifactProcessor<WebServ
PortType portType = getPortType(model);
if (portType != null) {
+ // Introspect the WSDL portType and validate the input/output messages.
+ List<OperationImpl> operations = portType.getOperations();
+ for (OperationImpl operation : operations) {
+ if (operation.getInput().getMessage() == null) {
+ ContributionResolveException ce = new ContributionResolveException("WSDL binding operation input name " + operation.getInput().getName() + " does not match with PortType Definition");
+ error("ContributionResolveException", wsdlDefinition, ce);
+ }
+ if (operation.getOutput().getMessage() == null) {
+ ContributionResolveException ce = new ContributionResolveException("WSDL binding operation output name " + operation.getOutput().getName() + " does not match with PortType Definition");
+ error("ContributionResolveException", wsdlDefinition, ce);
+ }
+ }
+
WSDLInterfaceContract interfaceContract = wsdlFactory.createWSDLInterfaceContract();
WSDLInterface wsdlInterface = null;
try {