diff options
Diffstat (limited to 'java/sca/modules/binding-ws-xml/src')
2 files changed, 9 insertions, 3 deletions
diff --git a/java/sca/modules/binding-ws-xml/src/main/java/org/apache/tuscany/sca/binding/ws/xml/WebServiceBindingProcessor.java b/java/sca/modules/binding-ws-xml/src/main/java/org/apache/tuscany/sca/binding/ws/xml/WebServiceBindingProcessor.java index c472caac3a..15b58e499c 100644 --- a/java/sca/modules/binding-ws-xml/src/main/java/org/apache/tuscany/sca/binding/ws/xml/WebServiceBindingProcessor.java +++ b/java/sca/modules/binding-ws-xml/src/main/java/org/apache/tuscany/sca/binding/ws/xml/WebServiceBindingProcessor.java @@ -348,8 +348,12 @@ public class WebServiceBindingProcessor implements StAXArtifactProcessor<WebServ model.setService(service.getElement()); if (model.getPortName() != null) { Port port = service.getElement().getPort(model.getPortName()); - model.setPort(port); - model.setBinding(port.getBinding()); + if (port != null) { + model.setPort(port); + model.setBinding(port.getBinding()); + } else { + warning("WsdlPortTypeDoesNotMatch", wsdlDefinition, model.getPortName()); + } } } else { warning("WsdlServiceDoesNotMatch", wsdlDefinition, model.getServiceName()); diff --git a/java/sca/modules/binding-ws-xml/src/main/resources/binding-wsxml-validation-messages.properties b/java/sca/modules/binding-ws-xml/src/main/resources/binding-wsxml-validation-messages.properties index 60a7e9e2f2..2dfa5e6133 100644 --- a/java/sca/modules/binding-ws-xml/src/main/resources/binding-wsxml-validation-messages.properties +++ b/java/sca/modules/binding-ws-xml/src/main/resources/binding-wsxml-validation-messages.properties @@ -21,6 +21,8 @@ InvalidWsdlElementAttr = Invalid WebService binding wsdlElement attribute: {0} MustUseWsdlBinding = {0} must use wsdl.binding when using wsa:EndpointReference InvalidInterfaceException = Exception creating interface from WSDL for binding: {0} -WsdlBindingDoesNotMatch = The #wsdl.binding({0}) does not match with the WSDL Definitions +WsdlBindingDoesNotMatch = The #wsdl.binding({0}) does not match with the WSDL Definitions WsdlServiceDoesNotMatch = The #wsdl.service({0}) does not match with the WSDL Definitions +WsdlPortTypeDoesNotMatch = The #wsdl.port({0}) does not match with the WSDL Definitions + |