diff options
author | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2010-06-21 14:31:11 +0000 |
---|---|---|
committer | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2010-06-21 14:31:11 +0000 |
commit | 421a641782ab71f9a9703ce93626b25716834367 (patch) | |
tree | 1d546028db5703851ec3b6bec68f179fcfd6a166 /sca-java-2.x/trunk/modules/binding-ws | |
parent | 1b39cb5478dc178ef8f0bc6d70ead9bffc2d7934 (diff) |
BWS_2018 - add a check that uri doesn't appear on a service callback binding.ws element
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@956599 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/binding-ws')
2 files changed, 9 insertions, 1 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 170a5259f3..67bd206115 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 @@ -37,6 +37,7 @@ import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; import javax.xml.stream.XMLStreamWriter; +import org.apache.tuscany.sca.assembly.Callback; import org.apache.tuscany.sca.assembly.Reference; import org.apache.tuscany.sca.assembly.xml.PolicySubjectProcessor; import org.apache.tuscany.sca.binding.ws.WebServiceBinding; @@ -149,6 +150,12 @@ public class WebServiceBindingProcessor extends BaseStAXArtifactProcessor implem error(monitor, "InvalidURISyntax", reader, ex.getMessage()); } } + + // BWS20020 + if ((context.getParentModel() instanceof Callback) && + (((Callback)context.getParentModel()).getParentContract() instanceof org.apache.tuscany.sca.assembly.Service)){ + error(monitor, "URIFoundForServiceCallback", reader, uri); + } } // Read a qname in the form: 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 1e06d882e3..a355d1b5ae 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 @@ -24,10 +24,11 @@ InvalidInterfaceException = Exception creating interface from WSDL for binding: WsdlBindingDoesNotMatch = The #wsdl.binding({0}) not found in the available WSDL Definitions WsdlServiceDoesNotMatch = [BWS20005] The #wsdl.service({0}) not found in the available WSDL Definitions WsdlPortTypeDoesNotMatch = The #wsdl.port({0}) does not match with the WSDL Definitions -WsdliLocationMissingWsdlElement = binding.ws has a @wsdli:wsdlLocation attribute but no @wsdlElement attribute +WsdliLocationMissingWsdlElement = [BWS20017] 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} +URIFoundForServiceCallback = [BWS20020] For the callback element of an SCA service, the binding must not specify an endpoint address URI or a WS-Addressing wsa:EndpointReference |