From eea031c614c32c00c63fb2ddbed0175af6082179 Mon Sep 17 00:00:00 2001 From: slaws Date: Thu, 1 Jul 2010 13:36:29 +0000 Subject: Improve error messages. This validation should happen earlier when the binding is read/resolved rather than when the providers are created. Will look to move it shortly. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@959652 13f79535-47bb-0310-9956-ffa450edef68 --- .../binding/ws/axis2/provider/Axis2ReferenceBindingProvider.java | 8 ++++++-- .../binding/ws/axis2/provider/Axis2ServiceBindingProvider.java | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) (limited to 'sca-java-2.x') diff --git a/sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/provider/Axis2ReferenceBindingProvider.java b/sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/provider/Axis2ReferenceBindingProvider.java index b73bfdd5c1..b8ad851bad 100644 --- a/sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/provider/Axis2ReferenceBindingProvider.java +++ b/sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/provider/Axis2ReferenceBindingProvider.java @@ -127,11 +127,15 @@ public class Axis2ReferenceBindingProvider extends Axis2BaseBindingProvider impl // check the WSDL style as we currently only support some of them if (wsBinding.isRpcEncoded()){ - throw new ServiceRuntimeException("rpc/encoded WSDL style not supported for endpoint reference " + endpointReference); + throw new ServiceRuntimeException("rpc/encoded WSDL style not supported. Component " + endpointReference.getComponent().getName() + + " Reference " + endpointReference.getReference() + + " Binding " + endpointReference.getBinding().getName()); } if (wsBinding.isDocEncoded()){ - throw new ServiceRuntimeException("doc/encoded WSDL style not supported for endpoint reference " + endpointReference); + throw new ServiceRuntimeException("doc/encoded WSDL style not supported. Component " + endpointReference.getComponent().getName() + + " Reference " + endpointReference.getReference() + + " Binding " + endpointReference.getBinding().getName()); } if (wsBinding.isDocLiteralUnwrapped()){ diff --git a/sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/provider/Axis2ServiceBindingProvider.java b/sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/provider/Axis2ServiceBindingProvider.java index 103180f534..e327be86be 100644 --- a/sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/provider/Axis2ServiceBindingProvider.java +++ b/sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/provider/Axis2ServiceBindingProvider.java @@ -170,11 +170,15 @@ public class Axis2ServiceBindingProvider extends Axis2BaseBindingProvider implem // Check the WSDL style as we only support some of them if (wsBinding.isRpcEncoded()){ - throw new ServiceRuntimeException("rpc/encoded WSDL style not supported for endpoint " + endpoint); + throw new ServiceRuntimeException("rpc/encoded WSDL style not supported. Component " + endpoint.getComponent().getName() + + " Service " + endpoint.getService() + + " Binding " + endpoint.getBinding().getName()); } if (wsBinding.isDocEncoded()){ - throw new ServiceRuntimeException("doc/encoded WSDL style not supported for endpoint " + endpoint); + throw new ServiceRuntimeException("doc/encoded WSDL style not supported. Component " + endpoint.getComponent().getName() + + " Service " + endpoint.getService() + + " Binding " + endpoint.getBinding().getName()); } // if (wsBinding.isDocLiteralUnwrapped()){ -- cgit v1.2.3