From 17e573358db8a4a83247037b957db32127bdd00a Mon Sep 17 00:00:00 2001 From: slaws Date: Wed, 29 Feb 2012 15:06:57 +0000 Subject: TUSCANY-4020 - move hardcoded message strings into properties files git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1295144 13f79535-47bb-0310-9956-ffa450edef68 --- .../tuscany/sca/binding/ws/xml/WebServiceBindingProcessor.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'sca-java-2.x/trunk/modules/binding-ws') 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 302088082e..e296e8cee5 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 @@ -46,6 +46,7 @@ import org.apache.tuscany.sca.assembly.Callback; import org.apache.tuscany.sca.assembly.Extensible; import org.apache.tuscany.sca.assembly.Extension; import org.apache.tuscany.sca.assembly.Reference; +import org.apache.tuscany.sca.assembly.xml.Messages; import org.apache.tuscany.sca.assembly.xml.PolicySubjectProcessor; import org.apache.tuscany.sca.binding.ws.WebServiceBinding; import org.apache.tuscany.sca.binding.ws.WebServiceBindingFactory; @@ -312,7 +313,11 @@ public class WebServiceBindingProcessor extends BaseStAXArtifactProcessor implem if (END_POINT_REFERENCE.equals(reader.getName().getLocalPart())) { if (wsdlElement != null && (wsdlElementIsBinding == null || !wsdlElementIsBinding)) { error(monitor, "MustUseWsdlBinding", reader, wsdlElement); - throw new ContributionReadException(wsdlElement + " must use wsdl.binding when using wsa:EndpointReference"); + String message = context.getMonitor().getMessageString(WebServiceBindingProcessor.class.getName(), + "binding-wsxml-validation-messages", + "MustUseWsdlBinding"); + message = message.replace("{0}", wsdlElement); + throw new ContributionReadException(message); } wsBinding.setEndPointReference(EndPointReferenceHelper.readEndPointReference(reader)); -- cgit v1.2.3