axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Glen Daniels <gdani...@macromedia.com>
Subject RE: cvs commit: xml-axis/java/src/org/apache/axis/utils axisNLS.p roperties
Date Wed, 21 Aug 2002 04:08:21 GMT

Hi Rich!

I'm a little concerned about the linear search in RPCProvider....

How about just detaching the OperationDesc from the ServiceDesc if we can't sync it, or setting
an "invalid" bit?

--Glen

> -----Original Message-----
> From: scheu@apache.org [mailto:scheu@apache.org]
> Sent: Tuesday, August 20, 2002 11:37 PM
> To: xml-axis-cvs@apache.org
> Subject: cvs commit: xml-axis/java/src/org/apache/axis/utils
> axisNLS.properties
> 
> 
> scheu       2002/08/20 20:36:33
> 
>   Modified:    java/src/org/apache/axis/deployment/wsdd 
> WSDDService.java
>                java/src/org/apache/axis/description ServiceDesc.java
>                java/src/org/apache/axis/providers/java 
> RPCProvider.java
>                java/src/org/apache/axis/utils axisNLS.properties
>   Log:
>   Programatic construction of a WSDDService could cause the
>   ServiceDesc to have an invalid TypeMapping.
>   
>   The solution is to update the ServiceDesc's TypeMapping
>   when one is created by deployTypeMapping.  (The TypeMappingRegistry
>   is updated as well.)
>   
>   Added an assertion to WSDDService to catch OperationDesc
>   objects that fail synchronization with a Method.
>   
>   Added an assertion to RPCProvider to make sure the
>   OperationDesc is indeed part of the ServiceDesc.
>   
>   Cheers.
>   
>   Revision  Changes    Path
>   1.80      +2 -0      
> xml-axis/java/src/org/apache/axis/deployment/wsdd/WSDDService.java
>   
>   Index: WSDDService.java
>   ===================================================================
>   RCS file: 
> /home/cvs/xml-axis/java/src/org/apache/axis/deployment/wsdd/WS
> DDService.java,v
>   retrieving revision 1.79
>   retrieving revision 1.80
>   diff -u -r1.79 -r1.80
>   --- WSDDService.java	20 Aug 2002 12:38:35 -0000	1.79
>   +++ WSDDService.java	21 Aug 2002 03:36:33 -0000	1.80
>   @@ -449,6 +449,8 @@
>                    tm.setSupportedEncodings(new String[] 
> {encodingStyle});
>                    tmr.register(encodingStyle, tm);
>                }
>   +            desc.setTypeMappingRegistry(tmr);
>   +            desc.setTypeMapping(tm);
>    
>                SerializerFactory   ser   = null;
>                DeserializerFactory deser = null;
>   
>   
>   
>   1.48      +10 -0     
> xml-axis/java/src/org/apache/axis/description/ServiceDesc.java
>   
>   Index: ServiceDesc.java
>   ===================================================================
>   RCS file: 
> /home/cvs/xml-axis/java/src/org/apache/axis/description/Servic
> eDesc.java,v
>   retrieving revision 1.47
>   retrieving revision 1.48
>   diff -u -r1.47 -r1.48
>   --- ServiceDesc.java	19 Aug 2002 17:12:10 -0000	1.47
>   +++ ServiceDesc.java	21 Aug 2002 03:36:33 -0000	1.48
>   @@ -55,6 +55,7 @@
>    package org.apache.axis.description;
>    
>    import org.apache.axis.AxisServiceConfig;
>   +import org.apache.axis.InternalException;
>    import org.apache.axis.components.logger.LogFactory;
>    import org.apache.axis.encoding.DefaultTypeMappingImpl;
>    import org.apache.axis.encoding.TypeMapping;
>   @@ -627,6 +628,15 @@
>                    (stopClasses == null ||
>                              
> !stopClasses.contains(superClass.getName()))) {
>                syncOperationToClass(oper, superClass);
>   +        }
>   +
>   +        // Exception if sync fails to find method for operation 
>   +        if (oper.getMethod() == null) {
>   +            InternalException ie = 
>   +                new 
> InternalException(JavaUtils.getMessage("serviceDescOperSync00", 
>   +                                                           
> oper.getName(),
>   +                                                           
> implClass.getName()));
>   +            throw ie;
>            }
>        }
>    
>   
>   
>   
>   1.88      +18 -0     
> xml-axis/java/src/org/apache/axis/providers/java/RPCProvider.java
>   
>   Index: RPCProvider.java
>   ===================================================================
>   RCS file: 
> /home/cvs/xml-axis/java/src/org/apache/axis/providers/java/RPC
> Provider.java,v
>   retrieving revision 1.87
>   retrieving revision 1.88
>   diff -u -r1.87 -r1.88
>   --- RPCProvider.java	16 Aug 2002 15:19:56 -0000	1.87
>   +++ RPCProvider.java	21 Aug 2002 03:36:33 -0000	1.88
>   @@ -57,6 +57,7 @@
>    
>    import org.apache.axis.AxisFault;
>    import org.apache.axis.Constants;
>   +import org.apache.axis.InternalException;
>    import org.apache.axis.MessageContext;
>    import org.apache.axis.attachments.MimeMultipartDataSource;
>    import org.apache.axis.attachments.PlainTextDataSource;
>   @@ -122,6 +123,23 @@
>            SOAPService service = msgContext.getService();
>            ServiceDesc serviceDesc = service.getServiceDescription();
>            OperationDesc operation = msgContext.getOperation();
>   +        
>   +        // Assert that the operation is in the serviceDesc
>   +        if (serviceDesc != null && operation != null) {
>   +            ArrayList list = serviceDesc.getOperations();
>   +            boolean found = false;
>   +            int length = list.size();
>   +            for (int i=0; i < length && !found; i++) {
>   +                if (list.get(i) == operation) {
>   +                    found = true;
>   +                }
>   +            }
>   +            if (!found) {
>   +                throw new InternalException(
>   +                    
> JavaUtils.getMessage("rpcProviderOperAssert00", 
>   +                                         operation.getName()));
>   +            }
>   +        }
>    
>            Vector          bodies = reqEnv.getBodyElements();
>            if (log.isDebugEnabled()) {
>   
>   
>   
>   1.49      +2 -0      
> xml-axis/java/src/org/apache/axis/utils/axisNLS.properties
>   
>   Index: axisNLS.properties
>   ===================================================================
>   RCS file: 
> /home/cvs/xml-axis/java/src/org/apache/axis/utils/axisNLS.properties,v
>   retrieving revision 1.48
>   retrieving revision 1.49
>   diff -u -r1.48 -r1.49
>   --- axisNLS.properties	20 Aug 2002 17:25:49 -0000	1.48
>   +++ axisNLS.properties	21 Aug 2002 03:36:33 -0000	1.49
>   @@ -993,3 +993,5 @@
>    imageEnabled=Image attachment support is enabled?
>    
>    wsddServiceName00=The WSDD service name defaults to the port name.
>   +rpcProviderOperAssert00=The OperationDesc for {0} was not 
> found in the ServiceDesc.
>   +serviceDescOperSync00=The OperationDesc for {0} was not 
> syncronized to a method of {1}.
>   
>   
>   
> 

Mime
View raw message