diff options
author | nash <nash@13f79535-47bb-0310-9956-ffa450edef68> | 2008-12-01 01:50:28 +0000 |
---|---|---|
committer | nash <nash@13f79535-47bb-0310-9956-ffa450edef68> | 2008-12-01 01:50:28 +0000 |
commit | be5b76b69f4bd8f8e401cc284fcca5879e8b0d7c (patch) | |
tree | a21ccd13ba605ffe0c4f73506408c4d9e55df8d4 /branches/sca-java-1.x/modules/binding-ws-xml/src/main/java/org/apache/tuscany/sca/binding | |
parent | 5a47268dd3aa80c86d829fa0db1567ecf82278aa (diff) |
Fix TUSCANY-2698
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@721944 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-java-1.x/modules/binding-ws-xml/src/main/java/org/apache/tuscany/sca/binding')
-rw-r--r-- | branches/sca-java-1.x/modules/binding-ws-xml/src/main/java/org/apache/tuscany/sca/binding/ws/xml/WebServiceBindingProcessor.java | 34 |
1 files changed, 28 insertions, 6 deletions
diff --git a/branches/sca-java-1.x/modules/binding-ws-xml/src/main/java/org/apache/tuscany/sca/binding/ws/xml/WebServiceBindingProcessor.java b/branches/sca-java-1.x/modules/binding-ws-xml/src/main/java/org/apache/tuscany/sca/binding/ws/xml/WebServiceBindingProcessor.java index 15b58e499c..860daa647d 100644 --- a/branches/sca-java-1.x/modules/binding-ws-xml/src/main/java/org/apache/tuscany/sca/binding/ws/xml/WebServiceBindingProcessor.java +++ b/branches/sca-java-1.x/modules/binding-ws-xml/src/main/java/org/apache/tuscany/sca/binding/ws/xml/WebServiceBindingProcessor.java @@ -46,6 +46,7 @@ import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor; import org.apache.tuscany.sca.contribution.resolver.ModelResolver; import org.apache.tuscany.sca.contribution.service.ContributionReadException; import org.apache.tuscany.sca.contribution.service.ContributionResolveException; +import org.apache.tuscany.sca.contribution.service.ContributionRuntimeException; import org.apache.tuscany.sca.contribution.service.ContributionWriteException; import org.apache.tuscany.sca.core.ExtensionPointRegistry; import org.apache.tuscany.sca.core.UtilityExtensionPoint; @@ -97,9 +98,9 @@ public class WebServiceBindingProcessor implements StAXArtifactProcessor<WebServ /** * Report a warning. * - * @param problems - * @param message + * @param problem * @param model + * @param message data */ private void warning(String message, Object model, Object... messageParameters) { if (monitor != null) { @@ -109,11 +110,11 @@ public class WebServiceBindingProcessor implements StAXArtifactProcessor<WebServ } /** - * Report a error. + * Report an error. * - * @param problems - * @param message + * @param problem * @param model + * @param message data */ private void error(String message, Object model, Object... messageParameters) { if (monitor != null) { @@ -122,6 +123,20 @@ public class WebServiceBindingProcessor implements StAXArtifactProcessor<WebServ } } + /** + * Report an exception. + * + * @param problem + * @param model + * @param exception + */ + private void error(String message, Object model, Exception ex) { + if (monitor != null) { + Problem problem = new ProblemImpl(this.getClass().getName(), "binding-wsxml-validation-messages", Severity.ERROR, model, message, ex); + monitor.problem(problem); + } + } + public WebServiceBinding read(XMLStreamReader reader) throws ContributionReadException, XMLStreamException { // Read a <binding.ws> @@ -322,7 +337,14 @@ public class WebServiceBindingProcessor implements StAXArtifactProcessor<WebServ WSDLDefinition wsdlDefinition = wsdlFactory.createWSDLDefinition(); wsdlDefinition.setUnresolved(true); wsdlDefinition.setNamespace(model.getNamespace()); - WSDLDefinition resolved = resolver.resolveModel(WSDLDefinition.class, wsdlDefinition); + WSDLDefinition resolved = null; + try { + resolved = resolver.resolveModel(WSDLDefinition.class, wsdlDefinition); + } catch (ContributionRuntimeException e) { + ContributionResolveException ce = new ContributionResolveException(e.getCause()); + error("ContributionResolveException", wsdlDefinition, ce); + throw ce; + } if (!resolved.isUnresolved()) { wsdlDefinition.setDefinition(resolved.getDefinition()); |