axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sc...@apache.org
Subject svn commit: r592085 - in /webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws: ./ description/impl/ i18n/
Date Mon, 05 Nov 2007 16:54:58 GMT
Author: scheu
Date: Mon Nov  5 08:54:56 2007
New Revision: 592085

URL: http://svn.apache.org/viewvc?rev=592085&view=rev
Log:
AXIS2-3261
Contributor:Samuel Isokpunwu
Added NLS Support for the metadata module.

Modified:
    webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/ClientConfigurationFactory.java
    webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/DescriptionFactoryImpl.java
    webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/DescriptionUtils.java
    webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointDescriptionImpl.java
    webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointInterfaceDescriptionImpl.java
    webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/OperationDescriptionImpl.java
    webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/ServiceDescriptionImpl.java
    webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/i18n/resource.properties

Modified: webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/ClientConfigurationFactory.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/ClientConfigurationFactory.java?rev=592085&r1=592084&r2=592085&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/ClientConfigurationFactory.java (original)
+++ webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/ClientConfigurationFactory.java Mon Nov  5 08:54:56 2007
@@ -23,12 +23,17 @@
 import org.apache.axis2.context.ConfigurationContextFactory;
 import org.apache.axis2.deployment.DeploymentException;
 import org.apache.axis2.description.AxisService;
+import org.apache.axis2.jaxws.i18n.Messages;
 import org.apache.axis2.jaxws.util.Constants;
 import org.apache.axis2.metadata.registry.MetadataFactoryRegistry;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 
 /** This class serves as a factory for ConfigurationContexts suitable in the client environment. */
 public class ClientConfigurationFactory {
+    
+    private static final Log log = LogFactory.getLog(ClientConfigurationFactory.class);
 
     /** Returns a ClientConfigurationFactory object. */
     public static ClientConfigurationFactory newInstance() {
@@ -42,15 +47,17 @@
      */
     public synchronized ConfigurationContext getClientConfigurationContext() {
         ConfigurationContext configContext = null;
-        //TODO: Add logging 
         String repoPath = System.getProperty(Constants.AXIS2_REPO_PATH);
         String axisConfigPath = System.getProperty(Constants.AXIS2_CONFIG_PATH);
+        if(log.isDebugEnabled()){
+        	log.debug("Axis2 repository path : "+repoPath);
+        	log.debug("Axis2 Config path : "+axisConfigPath);
+        }
         try {
             configContext = ConfigurationContextFactory
                     .createConfigurationContextFromFileSystem(repoPath, axisConfigPath);
         } catch (AxisFault e) {
-            // TODO: Add RAS logging and processing
-            e.printStackTrace();
+        	throw ExceptionFactory.makeWebServiceException(Messages.getMessage("clientConfigCtxtErr",e.getMessage()));
         }
         return configContext;
     }

Modified: webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/DescriptionFactoryImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/DescriptionFactoryImpl.java?rev=592085&r1=592084&r2=592085&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/DescriptionFactoryImpl.java (original)
+++ webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/DescriptionFactoryImpl.java Mon Nov  5 08:54:56 2007
@@ -34,6 +34,7 @@
 import org.apache.axis2.jaxws.description.builder.converter.JavaClassToDBCConverter;
 import org.apache.axis2.jaxws.description.validator.ServiceDescriptionValidator;
 import org.apache.axis2.jaxws.description.validator.EndpointDescriptionValidator;
+import org.apache.axis2.jaxws.i18n.Messages;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
@@ -195,9 +196,7 @@
                 if (log.isDebugEnabled()) {
                     log.debug("ServiceDesciption was not created for class: " + serviceImplClass);
                 }
-                // TODO: NLS & RAS
-                throw ExceptionFactory.makeWebServiceException(
-                        "A ServiceDescription was not created for " + serviceImplClass);
+                throw ExceptionFactory.makeWebServiceException(Messages.getMessage("createServiceDescrErr", serviceImplClass.getName()));
             }
         }
         return serviceDesc;
@@ -227,18 +226,10 @@
                     }
                 } else {
 
-                    String msg =
-                            "The ServiceDescription failed to validate due to the following errors: \n" +
-                                    validator.toString();
-
-                    if (log.isDebugEnabled()) {
-                        log.debug("Validation Phase 2 failure: " + msg);
-                        log.debug("Failing composite: " + serviceImplComposite.toString());
-                        log.debug("Failing Service Description: " + serviceDescription.toString());
-                    }
-
-                    // TODO: Validate all service descriptions before failing
-                    // TODO: Get more detailed failure information from the Validator
+                    String msg = Messages.getMessage("createSrvcDescrDBCMapErr",
+                    		                         validator.toString(),
+                    		                         serviceImplComposite.toString(),
+                    		                         serviceDescription.toString());
                     throw ExceptionFactory.makeWebServiceException(msg);
                 }
             } else {

Modified: webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/DescriptionUtils.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/DescriptionUtils.java?rev=592085&r1=592084&r2=592085&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/DescriptionUtils.java (original)
+++ webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/DescriptionUtils.java Mon Nov  5 08:54:56 2007
@@ -531,8 +531,7 @@
             try {
                 axisService.addParameter(headerQNParameter);
             } catch (AxisFault e) {
-                // TODO: RAS
-                log.warn("Unable to add Parameter for header QNames to AxisService " + axisService, e);
+                log.warn(Messages.getMessage("regHandlerHeadersErr",axisService.getName(),e.getMessage()));
             }
         }  
     }

Modified: webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointDescriptionImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointDescriptionImpl.java?rev=592085&r1=592084&r2=592085&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointDescriptionImpl.java (original)
+++ webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointDescriptionImpl.java Mon Nov  5 08:54:56 2007
@@ -215,12 +215,8 @@
         // At this point, there must be a port QName set, either as passed in, or determined from the WSDL and/or annotations.
         // If not, that is an error.
         if (this.portQName == null) {
-            if (log.isDebugEnabled()) {
-                log.debug("PortQName was null and could not be determined by runtime.  Class: " +
-                        theClass + "; ServiceDescription: " + parent);
-            }
-            throw ExceptionFactory.makeWebServiceException(
-                    "EndpointDescription: portQName could not be determined for class " + theClass);
+        	String msg = Messages.getMessage("endpointDescriptionErr1",theClass.getName(),parent.getClass().getName());
+            throw ExceptionFactory.makeWebServiceException(msg);
         }
 
         // TODO: Refactor this with the consideration of no WSDL/Generic Service/Annotated SEI
@@ -236,23 +232,9 @@
         try {
             getServiceDescriptionImpl().getClientConfigurationFactory()
                     .completeAxis2Configuration(axisService);
-        } catch (DeploymentException e) {
-            // TODO RAS & NLS
-            if (log.isDebugEnabled()) {
-                log.debug(
-                        "Caught DeploymentException attempting to complete configuration on AxisService: "
-                                + axisService + " for ServiceDesription: " + parent, e);
-            }
-            throw ExceptionFactory.makeWebServiceException(
-                    "Unable to complete configuration due to exception " + e, e);
         } catch (Exception e) {
-            // TODO RAS & NLS
-            if (log.isDebugEnabled()) {
-                log.debug("Caught Exception attempting to complete configuration on AxisService: "
-                        + axisService + " for ServiceDesription: " + parent, e);
-            }
-            throw ExceptionFactory.makeWebServiceException(
-                    "Unable to complete configuration due to exception " + e, e);
+        	String msg = Messages.getMessage("endpointDescriptionErr2",e.getClass().getName(),parent.getClass().getName());
+            throw ExceptionFactory.makeWebServiceException(msg, e);
         }
     }
 
@@ -280,8 +262,7 @@
 
         composite = getServiceDescriptionImpl().getDescriptionBuilderComposite();
         if (composite == null) {
-            throw ExceptionFactory.makeWebServiceException(
-                    "EndpointDescription.EndpointDescription: parents DBC is null");
+            throw ExceptionFactory.makeWebServiceException(Messages.getMessage("endpointDescriptionErr3"));
         }
         
         if(composite.getHandlerChainAnnot() != null && composite.getHandlerChainSource() != null) {
@@ -432,8 +413,7 @@
                 axisService.addParameter(wsdlDefParameter);
                 axisService.addParameter(wsdlLocationParameter);
             } catch (Exception e) {
-                throw ExceptionFactory.makeWebServiceException(
-                        "EndpointDescription: Unable to add parameters to AxisService");
+                throw ExceptionFactory.makeWebServiceException(Messages.getMessage("endpointDescriptionErr4"));
             }
         }
         else {
@@ -466,7 +446,7 @@
 
             } catch (Exception e) {
                 throw ExceptionFactory
-                    .makeWebServiceException("EndpointDescription: Unable to add parameters to AxisService");
+                    .makeWebServiceException(Messages.getMessage("endpointDescriptionErr4"),e);
             }
         }
         
@@ -524,9 +504,7 @@
             try {
                 axisService.addParameter(parameter);
             } catch (AxisFault e) {
-                // TODO: Throwing wrong exception
-                e.printStackTrace();
-                throw new UnsupportedOperationException("Can't add AxisService param: " + e);
+            	throw ExceptionFactory.makeWebServiceException(Messages.getMessage("endpointDescriptionErr5"),e);
             }
         }
     }
@@ -560,15 +538,9 @@
                     (WebServiceProvider)implOrSEIClass.getAnnotation(WebServiceProvider.class);
 
             if (webServiceAnnotation == null && webServiceProviderAnnotation == null)
-                // TODO: NLS
-                throw ExceptionFactory.makeWebServiceException(
-                        "Either WebService or WebServiceProvider annotation must be present on " +
-                                implOrSEIClass);
+                throw ExceptionFactory.makeWebServiceException(Messages.getMessage("endpointDescriptionErr6",implOrSEIClass.getName()));
             else if (webServiceAnnotation != null && webServiceProviderAnnotation != null)
-                // TODO: NLS
-                throw ExceptionFactory.makeWebServiceException(
-                        "Both WebService or WebServiceProvider annotations cannot be presenton " +
-                                implOrSEIClass);
+                throw ExceptionFactory.makeWebServiceException(Messages.getMessage("endpointDescriptionErr7",implOrSEIClass.getName()));
         }
         // If portName was specified, set it.  Otherwise, we will get it from the appropriate
         // annotation when the getter is called.
@@ -602,9 +574,8 @@
                         // does not extend Exception, so lets catch everything that extends Throwable
                         // rather than just Exception.
                     } catch (Throwable e) {
-                        // TODO: Throwing wrong exception
-                        e.printStackTrace();
-                        throw new UnsupportedOperationException("Can't create SEI class: " + e);
+                    	throw ExceptionFactory.makeWebServiceException(Messages.getMessage("endpointDescriptionErr8"),e);
+
                     }
                 }
                 endpointInterfaceDescription = new EndpointInterfaceDescriptionImpl(seiClass, this);
@@ -693,15 +664,10 @@
     void updateWithSEI(Class sei) {
         // Updating with an SEI is only valid for declared ports; it is not valid for dynamic ports.
         if (isDynamicPort()) {
-            // TODO: RAS and NLS
-            throw ExceptionFactory.makeWebServiceException(
-                    "Can not update an SEI on a dynamic port.  PortQName:" + portQName);
+            throw ExceptionFactory.makeWebServiceException(Messages.getMessage("updateWithSEIErr1",portQName.toString()));
         }
         if (sei == null) {
-            // TODO: RAS and NLS
-            throw ExceptionFactory.makeWebServiceException(
-                    "EndpointDescription.updateWithSEI was passed a null SEI.  PortQName:" +
-                            portQName);
+            throw ExceptionFactory.makeWebServiceException(Messages.getMessage("updateWithSEIErr2",portQName.toString()));
         }
 
         if (endpointInterfaceDescription != null) {
@@ -731,9 +697,7 @@
         }
 
         if (axisService == null) {
-            // TODO: RAS & NLS
-            throw ExceptionFactory.makeWebServiceException("Unable to create AxisService for "
-                    + createAxisServiceName());
+            throw ExceptionFactory.makeWebServiceException(Messages.getMessage("setupAxisServiceErr1",createAxisServiceName()));
         }
 
         // Save the Service QName as a parameter.
@@ -751,8 +715,7 @@
             axisService.addParameter(portParameter);
         }
         catch (AxisFault e) {
-            // TODO RAS
-            e.printStackTrace();
+            throw ExceptionFactory.makeWebServiceException(Messages.getMessage("setupAxisServiceErr2"),e);
         }
     }
 
@@ -782,9 +745,7 @@
         }
 
         if (axisService == null) {
-            // TODO: RAS & NLS
-            throw ExceptionFactory.makeWebServiceException("Unable to create AxisService for "
-                    + createAxisServiceName());
+            throw ExceptionFactory.makeWebServiceException(Messages.getMessage("setupAxisServiceErr1",createAxisServiceName()));
         }
 
         //Save the Port Type name
@@ -816,8 +777,7 @@
             axisService.addParameter(serviceClassNameParameter);
         }
         catch (AxisFault e) {
-            // TODO RAS
-            e.printStackTrace();
+            throw ExceptionFactory.makeWebServiceException(Messages.getMessage("setupAxisServiceErr2"),e);
         }
     }
 
@@ -871,8 +831,6 @@
         } catch (AxisFault e) {
             // REVIEW: If we couldn't use the WSDL, should we fail instead of continuing to process using annotations?
             //         Note that if we choose to fail, we need to distinguish the partial WSDL case (which can not fail)
-            // TODO: RAS/NLS  Need to update the message with the appropriate inserts
-//    		log.warn(Messages.getMessage("warnAxisFault", e.toString()), e);
             String wsdlLocation = (getServiceDescriptionImpl().getWSDLLocation() != null) ?
                     getServiceDescriptionImpl().getWSDLLocation().toString() : null;
             String implClassName = null;
@@ -881,10 +839,7 @@
             } else {
                 implClassName = (implOrSEIClass != null) ? implOrSEIClass.getName() : null;
             }
-            log.warn("The WSDL file could not be used due to an exception.  The WSDL will be ignored and annotations will be used.  Implementation class: "
-                             + implClassName
-                             + "; WSDL Location: "
-                             + wsdlLocation);
+            log.warn(Messages.getMessage("bldAxisSrvcFromWSDLErr",implClassName,wsdlLocation),e);
 
             isBuiltFromWSDL = false;
             return isBuiltFromWSDL;
@@ -986,9 +941,7 @@
         }
 
         if (!wsdlPortFound) {
-            // TODO: NLS and RAS
-            throw ExceptionFactory.makeWebServiceException(
-                    "WSDL Port not found for port " + portQName.getLocalPart());
+            throw ExceptionFactory.makeWebServiceException(Messages.getMessage("serviceDescErr3",portQName.getLocalPart()));
         }
     }
 
@@ -1332,12 +1285,8 @@
             if (handlerChainAnnotation != null) {
                 String handlerFileName = handlerChainAnnotation.file();
 
-                // TODO RAS & NLS
                 if (log.isDebugEnabled()) {
-                    log.debug("EndpointDescriptionImpl.getHandlerChain: fileName: "
-                            + handlerFileName
-                            + " className: "
-                            + composite.getClassName());
+                    log.debug(Messages.getMessage("handlerChainsTypeErr",handlerFileName,composite.getClassName()));
                 }
 
                 String className = getServiceDescriptionImpl().isDBCMap() ?
@@ -1393,7 +1342,7 @@
                         if (seic != null) {
                             handlerChainAnnotation = seic.getHandlerChainAnnot();
                         }
-                        // TODO else clause for if to throw exception when seic == null
+                        //TODO else clause for if to throw exception when seic == null
                     }
                 }
             } else {
@@ -1704,8 +1653,7 @@
                         WSDL4JWrapper wsdl4jWrapper = new WSDL4JWrapper(dbc.getWsdlURL(), wsdlDef);
                         getServiceDescriptionImpl().setGeneratedWsdlWrapper(wsdl4jWrapper);
                     } catch (Exception e) {
-                        throw ExceptionFactory.makeWebServiceException(
-                                "EndpointDescriptionImpl: WSDLException thrown when attempting to instantiate WSDL4JWrapper ");
+                        throw ExceptionFactory.makeWebServiceException(Messages.getMessage("generateWSDLErr"),e);
                     }
                 } else {
                     // REVIEW:Determine if we should always throw an exception on this, or at this point

Modified: webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointInterfaceDescriptionImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointInterfaceDescriptionImpl.java?rev=592085&r1=592084&r2=592085&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointInterfaceDescriptionImpl.java (original)
+++ webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointInterfaceDescriptionImpl.java Mon Nov  5 08:54:56 2007
@@ -34,6 +34,7 @@
 import org.apache.axis2.jaxws.description.builder.DescriptionBuilderComposite;
 import org.apache.axis2.jaxws.description.builder.MDQConstants;
 import org.apache.axis2.jaxws.description.builder.MethodDescriptionComposite;
+import org.apache.axis2.jaxws.i18n.Messages;
 import org.apache.axis2.wsdl.WSDLConstants;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -163,12 +164,7 @@
             genericProviderAxisOp = 
                 AxisOperationFactory.getOperationDescription(WSDLConstants.WSDL20_2006Constants.MEP_URI_IN_OUT);
         } catch (AxisFault e) {
-            if (log.isDebugEnabled()) {
-                log.debug("Unable to build AxisOperation for generic Provider; caught exception.", e);
-            }
-            // TODO: NLS & RAS
-            throw ExceptionFactory.makeWebServiceException("Caught exception trying to create AxisOperation",
-                                                           e);
+            throw ExceptionFactory.makeWebServiceException(Messages.getMessage("eiDescrImplErr"),e);
         }
         
         genericProviderAxisOp.setName(new QName(JAXWS_NOWSDL_PROVIDER_OPERATION_NAME));
@@ -282,8 +278,7 @@
                 methodList.add(method);
                 if (!Modifier.isPublic(method.getModifiers())) {
                     // JSR-181 says methods must be public (p14)
-                    // TODO NLS
-                    throw ExceptionFactory.makeWebServiceException("SEI methods must be public");
+                    throw ExceptionFactory.makeWebServiceException(Messages.getMessage("seiMethodsErr"));
                 }
                 // TODO: other validation per JSR-181
             }
@@ -302,9 +297,7 @@
      */
     void updateWithSEI(Class sei) {
         if (seiClass != null && seiClass != sei)
-            // TODO: It probably is invalid to try reset the SEI; but this isn't the right error processing
-            throw new UnsupportedOperationException(
-                    "The seiClass is already set; reseting it is not supported");
+        	throw ExceptionFactory.makeWebServiceException(new UnsupportedOperationException(Messages.getMessage("seiProcessingErr")));
         else if (seiClass != null && seiClass == sei)
             // We've already done the necessary updates for this SEI
             return;
@@ -664,8 +657,7 @@
 
                 //Verify that we can find the SEI in the composite list
                 if (superDBC == null) {
-                    throw ExceptionFactory.makeWebServiceException(
-                            "EndpointInterfaceDescriptionImpl: cannot find super class that was specified for this class");
+                    throw ExceptionFactory.makeWebServiceException(Messages.getMessage("seiNotFoundErr"));
                 }
 
                 //If the superclass contains a WebService annotation then retrieve its methods

Modified: webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/OperationDescriptionImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/OperationDescriptionImpl.java?rev=592085&r1=592084&r2=592085&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/OperationDescriptionImpl.java (original)
+++ webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/OperationDescriptionImpl.java Mon Nov  5 08:54:56 2007
@@ -45,6 +45,7 @@
 import org.apache.axis2.jaxws.description.builder.OneWayAnnot;
 import org.apache.axis2.jaxws.description.builder.ParameterDescriptionComposite;
 import org.apache.axis2.jaxws.description.builder.converter.ConverterUtils;
+import org.apache.axis2.jaxws.i18n.Messages;
 import org.apache.axis2.jaxws.util.WSDL4JWrapper;
 import org.apache.axis2.wsdl.WSDLConstants;
 import org.apache.commons.logging.Log;
@@ -264,13 +265,7 @@
             //                                              ROBUST_IN_ONLY
             //      Determine how these MEP's should be handled, if at all
         } catch (Exception e) {
-            if (log.isDebugEnabled()) {
-                log.debug("Unable to build AxisOperation for OperationDescrition; caught exception.",
-                          e);
-            }
-            // TODO: NLS & RAS
-            throw ExceptionFactory.makeWebServiceException("Caught exception trying to create AxisOperation",
-                                                           e);
+            throw ExceptionFactory.makeWebServiceException(Messages.getMessage("clientAxisOprErr"),e);
         }
 
         newAxisOperation.setName(determineOperationQName(seiMethod));
@@ -379,14 +374,7 @@
             //                                              ROBUST_IN_ONLY
             //      Determine how these MEP's should be handled, if at all
         } catch (Exception e) {
-            if (log.isDebugEnabled()) {
-                log.debug(
-                        "Unable to build AxisOperation for OperationDescrition; caught exception.",
-                        e);
-            }
-            // TODO: NLS & RAS
-            throw ExceptionFactory
-                    .makeWebServiceException("Caught exception trying to create AxisOperation", e);
+            throw ExceptionFactory.makeWebServiceException(Messages.getMessage("clientAxisOprErr"), e);
         }
 
         newAxisOperation.setName(determineOperationQName(this.methodComposite));
@@ -499,17 +487,11 @@
                                     + elementName + "; partTNS: " + partNamespace);
                         }
                         if (axisMessage == null) {
-                            // TODO: RAS & NLS
-                            throw ExceptionFactory.makeWebServiceException(
-                                    "Could not setup Doc/Lit/Bare operation because input message is null");
+                            throw ExceptionFactory.makeWebServiceException(Messages.getMessage("createAxisOprErr1"));
                         } else if (DescriptionUtils.isEmpty(partNamespace)) {
-                            // TODO: RAS & NLS
-                            throw ExceptionFactory.makeWebServiceException(
-                                    "Could not setup Doc/Lit/Bare operation because part namespace is empty");
+                            throw ExceptionFactory.makeWebServiceException(Messages.getMessage("createAxisOprErr2"));
                         } else if (DescriptionUtils.isEmpty(elementName)) {
-                            // TODO: RAS & NLS
-                            throw ExceptionFactory.makeWebServiceException(
-                                    "Could not setup Doc/Lit/Bare operation because name is empty");
+                            throw ExceptionFactory.makeWebServiceException(Messages.getMessage("createAxisOprErr3"));
                         } else {
                             QName partQName = new QName(partNamespace, elementName);
                             if(log.isDebugEnabled()) {
@@ -565,9 +547,8 @@
 
     void setSEIMethod(Method method) {
         if (seiMethod != null) {
-            // TODO: This is probably an error, but error processing logic is incorrect
-            throw new UnsupportedOperationException(
-                    "Can not set an SEI method once it has been set.");
+        	throw ExceptionFactory.makeWebServiceException(
+        			new UnsupportedOperationException(Messages.getMessage("seiMethodErr")));
         } else {
             seiMethod = method;
             webMethodAnnotation = seiMethod.getAnnotation(WebMethod.class);
@@ -1593,8 +1574,7 @@
             //        And this method is only used to parse out the JAX-WS Async parameter types to find
             //        AsyncHandler<T>.  The problem with the code that was removed is that a Type can not be
             //        instantiated, so we can't new up a Type inside the PDC.
-            throw new UnsupportedOperationException(
-                    "OperationDescriptionImpl.getParameterActualGenericType not supported for DBC");
+        	throw ExceptionFactory.makeWebServiceException(new UnsupportedOperationException(Messages.getMessage("genParamTypesErr")));
 //           Type [] type = new Type[parameterDescriptions.length];
 //           for (int i=0; i < parameterDescriptions.length; i++){
 //               type[i] = ((ParameterDescriptionImpl) parameterDescriptions[i]).getParameterActualGenericType();
@@ -2129,8 +2109,7 @@
             try {
                 theAxisOperation.addParameter(headerQNParameter);
             } catch (AxisFault e) {
-                // TODO: RAS
-                log.warn("Unable to add Parameter for header QNames to AxisOperation " + theAxisOperation, e);
+                log.warn(Messages.getMessage("regMUHeadersErr",theAxisOperation.getClass().getName()), e);
             }
         }
     }

Modified: webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/ServiceDescriptionImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/ServiceDescriptionImpl.java?rev=592085&r1=592084&r2=592085&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/ServiceDescriptionImpl.java (original)
+++ webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/ServiceDescriptionImpl.java Mon Nov  5 08:54:56 2007
@@ -250,7 +250,6 @@
                             .makeWebServiceException(Messages.getMessage("addPortErr2"));
                 }
                 if (getWSDLWrapper() != null && isPortDeclared) {
-                    // TODO: RAS & NLS
                     throw ExceptionFactory.makeWebServiceException(
                             Messages.getMessage("addPortDup", portQName.toString()));
                 } else if (endpointDescription == null) {
@@ -280,15 +279,11 @@
                 if (!isPortDeclared ||
                         (endpointDescription != null && endpointDescription.isDynamicPort())) {
                     // This guards against the case where an addPort was done previously and now a getPort is done on it.
-                    // TODO: RAS & NLS
                     throw ExceptionFactory.makeWebServiceException(
-                        "ServiceDescription.updateEndpointDescription: Can not do a getPort on a port added via addPort().  PortQN: " +
-                        (portQName != null ? portQName.toString() : "not specified"));
+                    		Messages.getMessage("updateEPDescrErr1",(portQName != null ? portQName.toString() : "not specified")));
                 } else if (sei == null) {
-                    // TODO: RAS & NLS
                     throw ExceptionFactory.makeWebServiceException(
-                        "ServiceDescription.updateEndpointDescription: Can not do a getPort with a null SEI.  PortQN: " +
-                        (portQName != null ? portQName.toString() : "not specified"));
+                    		Messages.getMessage("updateEPDescrErr2",(portQName != null ? portQName.toString() : "not specified")));
                 } else if (endpointDescription == null) {
                     // Use the SEI Class and its annotations to finish creating the Description hierachy: Endpoint, EndpointInterface, Operations, Parameters, etc.
                     // TODO: Need to create the Axis Description objects after we have all the config info (i.e. from this SEI)
@@ -307,11 +302,9 @@
                     // Note that an EndpointDescritption created from an addPort (i.e. a dynamic port) can not do this.
                     endpointDescription.updateWithSEI(sei);
                 } else if (getEndpointSEI(portQName) != sei) {
-                    // TODO: RAS & NLS
                     throw ExceptionFactory.makeWebServiceException(
-                            "ServiceDescription.updateEndpointDescription: Can't do a getPort() specifiying a different SEI than the previous getPort().  PortQN: "
-                                    + portQName + "; current SEI: " + sei + "; previous SEI: " +
-                                    getEndpointSEI(portQName));
+                    		Messages.getMessage("updateEPDescrErr3",portQName.toString(),
+                    				sei.getName(),getEndpointSEI(portQName).getName()));
                 } else {
                     // All error check above passed, the EndpointDescription already exists and needs no updating
                 }
@@ -330,8 +323,7 @@
                     // The Dispatch should not have an SEI associated with it on the update call.
                     // REVIEW: Is this a valid check?
                     throw ExceptionFactory.makeWebServiceException(
-                            "ServiceDescription.updateEndpointDescription: Can not specify an SEI when creating a Dispatch. PortQN: " +
-                                    portQName);
+                    		Messages.getMessage("createDispatchFail3",portQName.toString()));
                 } else if (getWSDLWrapper() != null && isPortDeclared) {
                     // EndpointDescription doesn't exist and this is a declared Port, so create one
                     // Use the SEI Class and its annotations to finish creating the Description hierachy.  Note that EndpointInterface, Operations, Parameters, etc.
@@ -675,11 +667,8 @@
             validateIntegrity();
         }
         catch (Exception ex) {
-            if (log.isDebugEnabled()) {
-                log.debug("Validation phase 1 failure: " + ex.toString(), ex);
-                log.debug("Failing composite: " + composite.toString());
-            }
-            throw ExceptionFactory.makeWebServiceException("Validation Exception " + ex, ex);
+            throw ExceptionFactory.makeWebServiceException(
+            		Messages.getMessage("dbclIntegrityErr",ex.toString(),composite.toString()), ex);
         }
     }
 
@@ -715,10 +704,8 @@
                 providerInterfaceValid = true;
                 //This is a provider based endpoint, make sure the annotation exists
                 if (composite.getWebServiceProviderAnnot() == null) {
-                    // TODO: RAS/NLS
                     throw ExceptionFactory.makeWebServiceException(
-                            "Validation error: This is a Provider based endpoint that does not contain a WebServiceProvider annotation.  Provider class: " +
-                                    composite.getClassName());
+                    		Messages.getMessage("validateIntegrityErr1",composite.getClassName()));
                 }
             }
         }
@@ -727,32 +714,24 @@
         //per JAXWS - Sec. 7.7
         if (composite.getWebServiceAnnot() != null &&
                 composite.getWebServiceProviderAnnot() != null) {
-            // TODO: RAS/NLS
             throw ExceptionFactory.makeWebServiceException(
-                    "Validation error: WebService annotation and WebServiceProvider annotation cannot coexist.  Implementation class: " +
-                            composite.getClassName());
+            		Messages.getMessage("validateIntegrityErr2",composite.getClassName()));
         }
 
         if (composite.getWebServiceProviderAnnot() != null) {
             if (!providerInterfaceValid) {
-                // TODO: RAS/NLS
                 throw ExceptionFactory.makeWebServiceException(
-                        "Validation error: This is a Provider that does not specify a valid Provider interface.   Implementation class: " +
-                                composite.getClassName());
+                		Messages.getMessage("validateIntegrityErr3",composite.getClassName()));
             }
             // There must be a public default constructor per JAXWS - Sec 5.1
             if (!validateDefaultConstructor()) {
-                // TODO: RAS/NLS
                 throw ExceptionFactory.makeWebServiceException(
-                        "Validation error: Provider must have a public default constructor.  Implementation class: " +
-                                composite.getClassName());
+                		Messages.getMessage("validateIntegrityErr4",composite.getClassName()));
             }
             // There must be an invoke method per JAXWS - Sec 5.1.1
             if (!validateInvokeMethod()) {
-                // TODO: RAS/NLS
                 throw ExceptionFactory.makeWebServiceException(
-                        "Validation error: Provider must have a public invoke method.  Implementation class: " +
-                                composite.getClassName());
+                		Messages.getMessage("validateIntegrityErr5",composite.getClassName()));
             }
 
             //If ServiceMode annotation specifies 'payload', then make sure that it is not typed with
@@ -762,10 +741,8 @@
         } else if (composite.getWebServiceAnnot() != null) {
 
             if (composite.getServiceModeAnnot() != null) {
-                // TODO: RAS/NLS
                 throw ExceptionFactory.makeWebServiceException(
-                        "Validation error: ServiceMode annotation can only be specified for WebServiceProvider.   Implementation class: " +
-                                composite.getClassName());
+                		Messages.getMessage("validateIntegrityErr6",composite.getClassName()));
             }
 
             //TODO: hmmm, will we ever actually validate an interface directly...don't think so
@@ -776,11 +753,9 @@
                 // TODO: Validate on the class that a finalize() method does not exist
                 if (!DescriptionUtils.isEmpty(composite.getWebServiceAnnot().wsdlLocation())) {
                     if (composite.getWsdlDefinition() == null && composite.getWsdlURL() == null) {
-                        // TODO: RAS/NLS
                         throw ExceptionFactory.makeWebServiceException(
-                                "Validation error: cannot find WSDL Definition specified by this WebService annotation. Implementation class: "
-                                        + composite.getClassName() + "; WSDL location: " +
-                                        composite.getWebServiceAnnot().wsdlLocation());
+                        		Messages.getMessage("validateIntegrityErr7",composite.getClassName(),
+                        				composite.getWebServiceAnnot().wsdlLocation()));
                     }
                 }
 
@@ -792,11 +767,9 @@
 
                     //Verify that we can find the SEI in the composite list
                     if (seic == null) {
-                        // TODO: RAS/NLS
                         throw ExceptionFactory.makeWebServiceException(
-                                "Validation error: cannot find SEI specified by the WebService.endpointInterface.  Implementaiton class: "
-                                        + composite.getClassName() + "; EndpointInterface: " +
-                                        composite.getWebServiceAnnot().endpointInterface());
+                        		Messages.getMessage("validateIntegrityErr8",composite.getClassName(),
+                        				composite.getWebServiceAnnot().endpointInterface()));
                     }
 
                     // Verify that the only class annotations are WebService and HandlerChain
@@ -808,20 +781,16 @@
                             || composite.getWebServiceContextAnnot() != null
                             || !composite.getAllWebServiceRefAnnots().isEmpty()
                             ) {
-                        // TODO: RAS/NLS
                         throw ExceptionFactory.makeWebServiceException(
-                                "Validation error: invalid annotations specified when WebService annotation specifies an endpoint interface.  Implemntation class:  "
-                                        + composite.getClassName());
+                        		Messages.getMessage("validateIntegrityErr9",composite.getClassName()));
                     }
 
                     //Verify that WebService annotation does not contain a name attribute
                     //(per JSR181 Sec. 3.1)
                     if (!DescriptionUtils.isEmpty(composite.getWebServiceAnnot().name())) {
-                        // TODO: RAS/NLS
                         throw ExceptionFactory.makeWebServiceException(
-                                "Validation error: WebService.name must not be specified when the bean specifies an endpoint interface.  Implentation class: "
-                                        + composite.getClassName() + "; WebService.name: " +
-                                        composite.getWebServiceAnnot().name());
+                        		Messages.getMessage("validateIntegrityErr10",composite.getClassName(),
+                        				composite.getWebServiceAnnot().name()));
                     }
 
                     validateSEI(seic);
@@ -830,10 +799,8 @@
 
                     //Verify that this impl. class does not contain any @WebMethod annotations
                     if (webMethodAnnotationsExist()) {
-                        // TODO: RAS/NLS
                         throw ExceptionFactory.makeWebServiceException(
-                                "Validation error: WebMethod annotations cannot exist on implentation when WebService.endpointInterface is set.  Implementation class: " +
-                                        composite.getClassName());
+                        		Messages.getMessage("validateIntegrityErr11",composite.getClassName()));
                     }
 
 
@@ -846,10 +813,8 @@
                     //
                 }
             } else { //this is an interface...we should not be processing interfaces here
-                // TODO: RAS/NLS
                 throw ExceptionFactory.makeWebServiceException(
-                        "Validation error: Improper usage: cannot invoke this method with an interface.  Implementation class: "
-                                + composite.getClassName());
+                		Messages.getMessage("validateIntegrityErr12",composite.getClassName()));
             }
 
             // Verify that the SOAPBinding annotations are supported.
@@ -857,8 +822,8 @@
             //        (implicit SEI) or a WebServiceProvider
             if (composite.getSoapBindingAnnot() != null) {
                 if (composite.getSoapBindingAnnot().use() == javax.jws.soap.SOAPBinding.Use.ENCODED) {
-                    throw ExceptionFactory.makeWebServiceException("Validation error: Unsupported SOAPBinding annotation value. The ENCODED setting is not supported for SOAPBinding.Use. Implementation class: " 
-                                +composite.getClassName());  
+                    throw ExceptionFactory.makeWebServiceException(
+                    		Messages.getMessage("validateIntegrityErr13",composite.getClassName()));  
                 }
             }
             
@@ -901,11 +866,9 @@
                 String interfaceString = iter.next();
                 if (interfaceString.equals(MDQConstants.PROVIDER_SOAP)
                         || interfaceString.equals(MDQConstants.PROVIDER_DATASOURCE)) {
-
-                    throw ExceptionFactory
-                            .makeWebServiceException(
-                                    "Validation error: SOAPMessage and DataSource objects cannot be used when ServiceMode specifies PAYLOAD. Implementation class: "
-                                            + composite.getClassName());
+                	
+                    throw ExceptionFactory.makeWebServiceException(
+                    		Messages.getMessage("validatePIsErr1",composite.getClassName()));
                 }
             }
 
@@ -939,11 +902,9 @@
                             .equals(SOAPBinding.SOAP12HTTP_BINDING)
                             && !bindingType
                             .equals(SOAPBinding.SOAP12HTTP_MTOM_BINDING))
-
-                        throw ExceptionFactory
-                                .makeWebServiceException(
-                                        "Validation error: SOAPMessage objects cannot be used with HTTP binding type. Implementation class: "
-                                                + composite.getClassName());
+                    	
+                        throw ExceptionFactory.makeWebServiceException(
+                        		Messages.getMessage("validatePIsErr2",composite.getClassName()));
 
                 } else if (interfaceString
                         .equals(MDQConstants.PROVIDER_DATASOURCE)) {
@@ -952,11 +913,9 @@
                     if (DescriptionUtils.isEmpty(bindingType)
                             || !bindingType
                             .equals(javax.xml.ws.http.HTTPBinding.HTTP_BINDING))
-
-                        throw ExceptionFactory
-                                .makeWebServiceException(
-                                        "Validation error: DataSource objects must be used with HTTP binding type. Implementation class: "
-                                                + composite.getClassName());
+                    	
+                        throw ExceptionFactory.makeWebServiceException(
+                        		Messages.getMessage("validatePIsErr3",composite.getClassName()));
                 }
             }
         }
@@ -1056,10 +1015,8 @@
                 // We didn't find the implementation for this SEI method, so throw a validation
                 // exception.
                 throw ExceptionFactory.makeWebServiceException(
-                    "Validation error: Implementation subclass does not implement method on specified interface.  Implementation class: "
-                    + composite.getClassName() + "; missing method name: " +
-                    seiMDC.getMethodName() + "; endpointInterface: " +
-                    seic.getClassName());
+                		Messages.getMessage("validateImplErr",composite.getClassName(),
+                				seiMDC.getMethodName(),seic.getClassName()));
             }
         }
     }
@@ -1075,27 +1032,20 @@
             // There are no parameters on the SEI or the impl; all is well
         } else if ((seiPDCList == null || seiPDCList.isEmpty())
             && !(implPDCList == null || implPDCList.isEmpty())) {
-            String message = "Validation error: SEI indicates no parameters but implementation method specifies parameters: "
-                + implPDCList
-                + "; Implementation class: "
-                + composite.getClassName()
-                + "; Method name: " + seiMDC.getMethodName() + "; Endpoint Interface: " + className;
-            throw ExceptionFactory.makeWebServiceException(message);
+            throw ExceptionFactory.makeWebServiceException(
+            		Messages.getMessage("validateMethodParamErr1",implPDCList.toString(),
+            				composite.getClassName(),seiMDC.getMethodName(),className));
         } else if ((seiPDCList != null && !seiPDCList.isEmpty())
             && !(implPDCList != null && !implPDCList.isEmpty())) {
-            String message = "Validation error: SEI indicates parameters " + seiPDCList
-                + " but implementation method specifies no parameters; Implementation class: "
-                + composite.getClassName() + "; Method name: " + seiMDC.getMethodName()
-                + "; Endpoint Interface: " + className;
-            throw ExceptionFactory.makeWebServiceException(message);
+            throw ExceptionFactory.makeWebServiceException(
+            		Messages.getMessage("validateMethodParamErr2",seiPDCList.toString(),
+            				composite.getClassName(),seiMDC.getMethodName(),className));
         } else if (seiPDCList.size() != implPDCList.size()) {
-            String message = "Validation error: The number of parameters on the SEI method ("
-                + seiPDCList.size()
-                + ") does not match the number of parameters on the implementation ( "
-                + implPDCList.size() + "); Implementation class: " + composite.getClassName()
-                + "; Method name: " + seiMDC.getMethodName() + "; Endpoint Interface: " + className;
-            throw ExceptionFactory.makeWebServiceException(message);
-
+            throw ExceptionFactory.makeWebServiceException(
+            		Messages.getMessage("validateMethodParamErr3",
+            				new Integer(seiPDCList.size()).toString(),
+            				new Integer(implPDCList.size()).toString(),composite.getClassName(),
+            				seiMDC.getMethodName(),className));
         } else {
             // Make sure the order and type of parameters match
             // REVIEW: This checks for strict equality of the fully qualified
@@ -1136,24 +1086,17 @@
         if (seiReturnValue == null && implReturnValue == null) {
             // Neither specify a return value; all is well
         } else if (seiReturnValue == null && implReturnValue != null) {
-            String message = "Validation error: SEI indicates no return value but implementation method specifies return value: "
-                + implReturnValue
-                + "; Implementation class: "
-                + composite.getClassName()
-                + "; Method name: " + seiMDC.getMethodName() + "; Endpoint Interface: " + className;
-            throw ExceptionFactory.makeWebServiceException(message);
+            throw ExceptionFactory.makeWebServiceException(
+            		Messages.getMessage("validateMethodRVErr1",implReturnValue,
+            				composite.getClassName(),seiMDC.getMethodName(),className));
         } else if (seiReturnValue != null && implReturnValue == null) {
-            String message = "Validation error: SEI indicates return value " + seiReturnValue
-                + " but implementation method specifies no return value; Implementation class: "
-                + composite.getClassName() + "; Method name: " + seiMDC.getMethodName()
-                + "; Endpoint Interface: " + className;
-            throw ExceptionFactory.makeWebServiceException(message);
+            throw ExceptionFactory.makeWebServiceException(
+            		Messages.getMessage("validateMethodRVErr2",seiReturnValue,
+            				composite.getClassName(),seiMDC.getMethodName(),className));
         } else if (!seiReturnValue.equals(implReturnValue)) {
-            String message = "Validation error: SEI return value " + seiReturnValue
-                + " does not match implementation method return value " + implReturnValue
-                + "; Implementation class: " + composite.getClassName() + "; Method name: "
-                + seiMDC.getMethodName() + "; Endpoint Interface: " + className;
-            throw ExceptionFactory.makeWebServiceException(message);
+            throw ExceptionFactory.makeWebServiceException(
+            		Messages.getMessage("validateMethodRVErr3",seiReturnValue,implReturnValue,
+            				composite.getClassName(),seiMDC.getMethodName(),className));
         }
 
     }
@@ -1172,10 +1115,9 @@
                 return;
             } else {
                 // SEI delcares no checked exceptions, but the implementation has checked exceptions, which is an error
-                throw ExceptionFactory.makeWebServiceException("Validation error: Implementation method signature has more checked exceptions than SEI method signature (0): Implementation class: "
-                    + composite.getClassName() 
-                    + "; method name: " + seiMDC.getMethodName() 
-                    + "; endpointInterface: " + className);
+                throw ExceptionFactory.makeWebServiceException(
+                		Messages.getMessage("validateMethodExceptionErr1",
+                				composite.getClassName(),seiMDC.getMethodName(),className));
             }
         } else if (implExceptions == null) {
             // Implementation throws fewer checked exceptions than SEI, which is OK.
@@ -1184,12 +1126,11 @@
         
         // Check the list length; An implementation can not declare more exceptions than the SEI
         if (seiExceptions.length < implExceptions.length) {
-            throw ExceptionFactory.makeWebServiceException("Validation error: Implementation method signature has more checked exceptions ("
-                + implExceptions.length + ") than SEI method signature ("
-                + seiExceptions.length + "): Implementation class: "
-                + composite.getClassName() 
-                + "; method name: " + seiMDC.getMethodName() 
-                + "; endpointInterface: " + className);
+            throw ExceptionFactory.makeWebServiceException(
+            		Messages.getMessage("validateMethodExceptionErr2",
+            				new Integer(implExceptions.length).toString(),
+            				new Integer(seiExceptions.length).toString(),
+            				composite.getClassName(),seiMDC.getMethodName(),className));
         }
         
         // Make sure that each checked exception declared by the 
@@ -1206,12 +1147,10 @@
                     }
                 }
                 
-                if (!foundIt) {
-                    throw ExceptionFactory.makeWebServiceException("Validation error: Implementation method signature throws exception " 
-                        + implException + "which is not declared on the SEI method signature: Implementation class: "
-                        + composite.getClassName() 
-                        + "; method name: " + seiMDC.getMethodName() 
-                        + "; endpointInterface: " + className);
+                if (!foundIt) {    	
+                    throw ExceptionFactory.makeWebServiceException(
+                    		Messages.getMessage("validateMethodExceptionErr3",implException,
+                    				composite.getClassName(),seiMDC.getMethodName(),className));
                 }
             }
         }
@@ -1290,26 +1229,19 @@
         //TODO: Validate SEI superclasses -- hmmm, may be doing this below
         //
         if (seic.getWebServiceAnnot() == null) {
-            // TODO: RAS & NLS
             throw ExceptionFactory.makeWebServiceException(
-                    "Validation error: SEI does not contain a WebService annotation.  Implementation class: "
-                            + composite.getClassName() + "; SEI: " + seic.getClassName());
+            		Messages.getMessage("validateSEIErr1",composite.getClassName(),seic.getClassName()));
         }
         if (!seic.getWebServiceAnnot().endpointInterface().equals("")) {
-            // TODO: RAS & NLS
             throw ExceptionFactory.makeWebServiceException(
-                    "Validation error: SEI must not set a value for @WebService.endpointInterface.  Implementation class: "
-                            + composite.getClassName() + "; SEI: " + seic.getClassName()
-                            + "; Invalid endpointInterface value: " +
-                            seic.getWebServiceAnnot().endpointInterface());
+            		Messages.getMessage("validateSEIErr2",composite.getClassName(),
+            				seic.getClassName(),seic.getWebServiceAnnot().endpointInterface()));
         }
         // Verify that the SOAPBinding annotations are supported.
-        if (seic.getSoapBindingAnnot() != null) {
-        if (seic.getSoapBindingAnnot().use() == javax.jws.soap.SOAPBinding.Use.ENCODED) {
-               throw ExceptionFactory.makeWebServiceException("Validation error: Unsupported SOAPBinding annotation value. The ENCODED setting is not supported for SOAPBinding.Use. Implementation class: " 
-                        +seic.getClassName());  
+        if (seic.getSoapBindingAnnot() != null &&
+        		seic.getSoapBindingAnnot().use() == javax.jws.soap.SOAPBinding.Use.ENCODED) {
+        	throw ExceptionFactory.makeWebServiceException(Messages.getMessage("validateSEIErr3",seic.getClassName()));  
         }
-       }
 
         checkSEIAgainstWSDL();
 
@@ -1444,7 +1376,6 @@
 
                 String handlerFileName = handlerChainAnnotation.file();
 
-                // TODO RAS & NLS
                 if (log.isDebugEnabled()) {
                     if (composite != null) {
                         log.debug("EndpointDescriptionImpl.getHandlerChain: fileName: "
@@ -1481,7 +1412,7 @@
                     handlerChainsType = (HandlerChainsType) o.getValue();
 
                 } catch (Exception e) {
-                    throw ExceptionFactory.makeWebServiceException("EndpointDescriptionImpl: getHandlerChain: thrown when attempting to unmarshall JAXB content");
+                    throw ExceptionFactory.makeWebServiceException(Messages.getMessage("handlerChainErr"),e);
                 }
             }
         }

Modified: webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/i18n/resource.properties
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/i18n/resource.properties?rev=592085&r1=592084&r2=592085&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/i18n/resource.properties (original)
+++ webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/i18n/resource.properties Mon Nov  5 08:54:56 2007
@@ -185,3 +185,69 @@
 soapBindingStyle=The SEI {0} contains method {1} with annotation SOAPBinding.Style set to RPC.
 handlerSourceFail=Internal error. Multiple sources were supplied for the handler chain configuration information in the class {0}.
 failureLogger=A {0} throwable was caught.  The detail message is: {1}
+clientConfigCtxtErr=Error getting Client Configuration Context : {0}
+createServiceDescrErr=A ServiceDescription was not created for {0}
+createSrvcDescrDBCMapErr=The ServiceDescription failed to validate due to the following errors -- Validation Phase 2 failure: {0}, Failing composite: {1}, Failing Service Description: {2}
+regHandlerHeadersErr=Unable to add Parameter for header QNames to AxisService {0}. {1}
+endpointDescriptionErr1=EndpointDescription: PortQName was null and could not be determined by runtime for class {0}; ServiceDescription: {1}
+endpointDescriptionErr2=Caught {0} attempting to complete configuration on AxisService for ServiceDesription: {1}
+endpointDescriptionErr3=EndpointDescription.EndpointDescription: parents DBC is null
+endpointDescriptionErr4=EndpointDescription: Unable to add parameters to AxisService
+endpointDescriptionErr5=Can't add AxisService param: {0}
+endpointDescriptionErr6=Either WebService or WebServiceProvider annotation must be present on {0}
+endpointDescriptionErr7=Both WebService or WebServiceProvider annotations cannot be presenton {0}
+endpointDescriptionErr8=Can't create SEI class:
+updateWithSEIErr1=Can not update an SEI on a dynamic port.  PortQName: {0}
+updateWithSEIErr2=EndpointDescription.updateWithSEI was passed a null SEI.  PortQName: {0}
+setupAxisServiceErr1=Unable to create AxisService for {0}
+setupAxisServiceErr2=Exception when adding service parameters.
+bldAxisSrvcFromWSDLErr=The WSDL file could not be used due to an exception.  The WSDL will be ignored and annotations will be used.  Implementation class: {0}; WSDL Location: {1}
+serviceDescErr3=WSDL Port not found for port {0}
+generateWSDLErr=EndpointDescriptionImpl: WSDLException thrown when attempting to instantiate WSDL4JWrapper
+handlerChainsTypeErr=EndpointDescriptionImpl.getHandlerChain: fileName: {0}; className: {1}
+eiDescrImplErr=Unable to build AxisOperation for generic Provider; caught exception.
+seiMethodsErr=SEI methods must be public.
+seiProcessingErr=The seiClass is already set; reseting it is not supported.
+seiNotFoundErr=EndpointInterfaceDescriptionImpl: cannot find super class that was specified for this class.
+clientAxisOprErr=Caught exception trying to create AxisOperation.
+createAxisOprErr1=Could not setup Doc/Lit/Bare operation because input message is null.
+createAxisOprErr2=Could not setup Doc/Lit/Bare operation because part namespace is empty.
+createAxisOprErr3=Could not setup Doc/Lit/Bare operation because name is empty.
+seiMethodErr=Can not set an SEI method once it has been set.
+regMUHeadersErr=Unable to add Parameter for header QNames to AxisOperation {0}
+genParamTypesErr=OperationDescriptionImpl.getParameterActualGenericType not supported for DBC.
+updateEPDescrErr1=ServiceDescription.updateEndpointDescription: Can not do a getPort on a port added via addPort().  PortQN: {0}
+updateEPDescrErr2=ServiceDescription.updateEndpointDescription: Can not do a getPort with a null SEI.  PortQN: {0}
+updateEPDescrErr3=ServiceDescription.updateEndpointDescription: Can't do a getPort() specifiying a different SEI than the previous getPort().  PortQN: {0}; current SEI: {1}; previous SEI: {2}
+dbclIntegrityErr=Validation phase 1 failure: {0}; Failing composite: {1}
+validateIntegrityErr1=Validation error: This is a Provider based endpoint that does not contain a WebServiceProvider annotation.  Provider class: {0}
+validateIntegrityErr2=Validation error: WebService annotation and WebServiceProvider annotation cannot coexist.  Implementation class: {0}
+validateIntegrityErr3=Validation error: This is a Provider that does not specify a valid Provider interface.   Implementation class: {0}
+validateIntegrityErr4=Validation error: Provider must have a public default constructor.  Implementation class: {0}
+validateIntegrityErr5=Validation error: Provider must have a public invoke method.  Implementation class: {0}
+validateIntegrityErr6=Validation error: ServiceMode annotation can only be specified for WebServiceProvider.   Implementation class: {0}
+validateIntegrityErr7=Validation error: cannot find WSDL Definition specified by this WebService annotation. Implementation class: {0}; WSDL location: {1}
+validateIntegrityErr8=Validation error: cannot find SEI specified by the WebService.endpointInterface.  Implementaiton class: {0}; EndpointInterface: {1}
+validateIntegrityErr9=Validation error: invalid annotations specified when WebService annotation specifies an endpoint interface.  Implemntation class: {0}
+validateIntegrityErr10=Validation error: WebService.name must not be specified when the bean specifies an endpoint interface.  Implentation class: {0}; WebService.name: {1}
+validateIntegrityErr11=Validation error: WebMethod annotations cannot exist on implentation when WebService.endpointInterface is set.  Implementation class: {0}
+validateIntegrityErr12=Validation error: Improper usage: cannot invoke this method with an interface.  Implementation class: {0}
+validateIntegrityErr13=Validation error: Unsupported SOAPBinding annotation value. The ENCODED setting is not supported for SOAPBinding.Use. Implementation class: {0}
+validatePIsErr1=Validation error: SOAPMessage and DataSource objects cannot be used when ServiceMode specifies PAYLOAD. Implementation class: {0}
+validatePIsErr2=Validation error: SOAPMessage objects cannot be used with HTTP binding type. Implementation class: {0}
+validatePIsErr3=Validation error: DataSource objects must be used with HTTP binding type. Implementation class: {0}
+validateImplErr=Validation error: Implementation subclass does not implement method on specified interface.  Implementation class: {0}; missing method name: {1}; endpointInterface: {2}
+validateMethodParamErr1=Validation error: SEI indicates no parameters but implementation method specifies parameters: {0}; Implementation class: {1}; Method name: {2}; Endpoint Interface: {3}
+validateMethodParamErr2=Validation error: SEI indicates parameters {0} but implementation method specifies no parameters; Implementation class: {1}; Method name: {2}; Endpoint Interface: {3}
+validateMethodParamErr3=Validation error: The number of parameters on the SEI method ({0}) does not match the number of parameters on the implementation ({1}); Implementation class: {2}; Method name: {3}; Endpoint Interface: {4}
+validateMethodRVErr1=Validation error: SEI indicates no return value but implementation method specifies return value: {0}; Implementation class: {1}; Method name: {2}; Endpoint Interface: {3}
+validateMethodRVErr2=Validation error: SEI indicates return value {0} but implementation method specifies no return value; Implementation class: {1}; Method name: {2}; Endpoint Interface: {3}
+validateMethodRVErr3=Validation error: SEI return value {0} does not match implementation method return value {1}; Implementation class: {2}; Method name: {3}; Endpoint Interface: {4}
+validateMethodExceptionErr1=Validation error: Implementation method signature has more checked exceptions than SEI method signature (0): Implementation class: {0}; method name: {1}; endpointInterface: {2}
+validateMethodExceptionErr2=Validation error: Implementation method signature has more checked exceptions ({0}) than SEI method signature ({1}): Implementation class: {2}; method name: {3}; endpointInterface: {4}
+validateMethodExceptionErr3=Validation error: Implementation method signature throws exception {0} which is not declared on the SEI method signature: Implementation class: {1}; method name: {2}; endpointInterface: {3}
+validateSEIErr1=Validation error: SEI does not contain a WebService annotation.  Implementation class: {0}; SEI: {1}
+validateSEIErr2=Validation error: SEI must not set a value for @WebService.endpointInterface.  Implementation class: {0}; SEI: {1}; Invalid endpointInterface value: {2}
+validateSEIErr3=Validation error: Unsupported SOAPBinding annotation value. The ENCODED setting is not supported for SOAPBinding.Use. Implementation class: {0}
+handlerChainErr=EndpointDescriptionImpl: getHandlerChain: thrown when attempting to unmarshall JAXB content.
+createDispatchFail3=ServiceDescription.updateEndpointDescription: Can not specify an SEI when creating a Dispatch. PortQN: {0}



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message