diff options
Diffstat (limited to 'sca-java-2.x/trunk/modules/binding-ws/src/main')
2 files changed, 9 insertions, 3 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 0b81dbbb5a..b388311987 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 @@ -33,7 +33,6 @@ import javax.wsdl.Port; import javax.wsdl.PortType; import javax.wsdl.Service; import javax.wsdl.extensions.soap.SOAPAddress; -import javax.wsdl.extensions.soap.SOAPBinding; import javax.wsdl.extensions.soap12.SOAP12Address; import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; @@ -236,8 +235,14 @@ public class WebServiceBindingProcessor extends BaseStAXArtifactProcessor implem // Read wsdlLocation wsBinding.setLocation(reader.getAttributeValue(WSDLI_NS, WSDL_LOCATION)); - if (wsdlElement == null && wsBinding.getLocation() != null) { - error(monitor, "WsdliLocationMissingWsdlElement", reader); + if (wsBinding.getLocation() != null) { + if (wsdlElement == null) { + error(monitor, "WsdliLocationMissingWsdlElement", reader); + } + String[] iris = wsBinding.getLocation().split(" "); + if (iris.length % 2 != 0) { + error(monitor, "WsdliLocationNotIRIPairs", reader); + } } // Skip to end element 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 b5ede881e7..4c2a857d6c 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 @@ -25,6 +25,7 @@ WsdlBindingDoesNotMatch = The #wsdl.binding({0}) not found in the available WSDL 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 = [BWS20017] binding.ws has a @wsdli:wsdlLocation attribute but no @wsdlElement attribute +WsdliLocationNotIRIPairs = The binding.ws @wsdli:wsdlLocation attribute MUST be a list of pairs of IRIs 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} |