diff options
author | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2010-06-21 09:18:29 +0000 |
---|---|---|
committer | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2010-06-21 09:18:29 +0000 |
commit | d6ed6920c75de949294a6dc29eff5e2a3c1b08ac (patch) | |
tree | 637ef7bd5ee57d6379a532cc75758320897f9d89 /sca-java-2.x/trunk/modules | |
parent | 4af7697deaad36a980f7341d13967e2c202ec6be (diff) |
BWS_2003 - add a check that wsdl.service doesn't appear on a service binding.ws element
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@956511 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules')
2 files changed, 7 insertions, 0 deletions
diff --git a/sca-java-2.x/trunk/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/xml/WebServiceBindingProcessor.java b/sca-java-2.x/trunk/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/xml/WebServiceBindingProcessor.java index 9c2bbd6043..4863088cd5 100644 --- a/sca-java-2.x/trunk/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/xml/WebServiceBindingProcessor.java +++ b/sca-java-2.x/trunk/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/xml/WebServiceBindingProcessor.java @@ -135,6 +135,7 @@ public class WebServiceBindingProcessor extends BaseStAXArtifactProcessor implem if (uri != null) { wsBinding.setURI(uri); + // BWS20001 if (context.getParentModel() instanceof Reference){ try { URI tmpURI = new URI(uri); @@ -164,6 +165,11 @@ public class WebServiceBindingProcessor extends BaseStAXArtifactProcessor implem String localName = wsdlElement.substring(index + 1); if (localName.startsWith("wsdl.service")) { + // BWS20003 + if (context.getParentModel() instanceof org.apache.tuscany.sca.assembly.Service){ + error(monitor, "WSDLServiceOnService", reader, wsdlElement); + } + // Read a wsdl.service localName = localName.substring("wsdl.service(".length(), localName.length() - 1); wsBinding.setServiceName(new QName(namespace, localName)); diff --git a/sca-java-2.x/trunk/modules/binding-ws/src/main/resources/binding-wsxml-validation-messages.properties b/sca-java-2.x/trunk/modules/binding-ws/src/main/resources/binding-wsxml-validation-messages.properties index d8ecef91ef..4e88c5bcce 100644 --- a/sca-java-2.x/trunk/modules/binding-ws/src/main/resources/binding-wsxml-validation-messages.properties +++ b/sca-java-2.x/trunk/modules/binding-ws/src/main/resources/binding-wsxml-validation-messages.properties @@ -27,6 +27,7 @@ WsdlPortTypeDoesNotMatch = The #wsdl.port({0}) does not match with the WSDL Defi WsdliLocationMissingWsdlElement = binding.ws has a @wsdli:wsdlLocation attribute but no @wsdlElement attribute URINotAbsolute = [BWS20001] The URI value for binding.ws on an SCA reference must be absolute. Non-absolute value found {0} InvalidURISyntax = The URI value {0} found on binding.ws has invalid syntax +WSDLServiceOnService = [BWS20003] The wsdlElement attribute of a binding.ws on an SCA service must not specify the wsdl.service form of URI. The following URI was found {0} |