axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdani...@apache.org
Subject cvs commit: xml-axis/java/test/encoding TestArrayListConversions.java
Date Tue, 06 Aug 2002 03:55:05 GMT
gdaniels    2002/08/05 20:55:05

  Modified:    java/src/org/apache/axis MessageContext.java
               java/src/org/apache/axis/handlers JWSProcessor.java
               java/src/org/apache/axis/handlers/soap SOAPService.java
               java/src/org/apache/axis/message RPCElement.java
               java/src/org/apache/axis/providers BasicProvider.java
               java/src/org/apache/axis/providers/java EJBProvider.java
                        JavaProvider.java
               java/test/encoding TestArrayListConversions.java
  Log:
  Reintroduce MessageContext argument when building intialized
  ServiceDescs, since my last commit inadvertently damaged the
  EJBProvider functionality, which may need a username/pw...
  
  Long run this needs to be investigated a bit more, but this should
  make everything happy again for now.
  
  Thanks to Alex Glosband and William Chan for noticing this.
  
  Revision  Changes    Path
  1.115     +2 -2      xml-axis/java/src/org/apache/axis/MessageContext.java
  
  Index: MessageContext.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/MessageContext.java,v
  retrieving revision 1.114
  retrieving revision 1.115
  diff -u -r1.114 -r1.115
  --- MessageContext.java	5 Aug 2002 05:15:31 -0000	1.114
  +++ MessageContext.java	6 Aug 2002 03:55:04 -0000	1.115
  @@ -232,7 +232,7 @@
           }
   
           if (serviceHandler != null) {
  -            ServiceDesc desc = serviceHandler.getInitializedServiceDesc();
  +            ServiceDesc desc = serviceHandler.getInitializedServiceDesc(this);
   
               if (desc != null) {
                   possibleOperations = desc.getOperationsByQName(qname);
  @@ -619,7 +619,7 @@
               // new service.
               highFidelity = service.needsHighFidelityRecording();
   
  -            ServiceDesc sd = service.getInitializedServiceDesc();
  +            ServiceDesc sd = service.getInitializedServiceDesc(this);
   
               if (service.getStyle() == Style.MESSAGE) {
                   // There should be only one operation
  
  
  
  1.60      +1 -1      xml-axis/java/src/org/apache/axis/handlers/JWSProcessor.java
  
  Index: JWSProcessor.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/handlers/JWSProcessor.java,v
  retrieving revision 1.59
  retrieving revision 1.60
  diff -u -r1.59 -r1.60
  --- JWSProcessor.java	5 Aug 2002 05:10:47 -0000	1.59
  +++ JWSProcessor.java	6 Aug 2002 03:55:04 -0000	1.60
  @@ -304,7 +304,7 @@
                   sd.setTypeMappingRegistry(tmr);
                   sd.setTypeMapping(msgContext.getTypeMapping());
   
  -                rpc.getInitializedServiceDesc();
  +                rpc.getInitializedServiceDesc(msgContext);
   
                   soapServices.put(clsName, rpc);
   
  
  
  
  1.76      +3 -2      xml-axis/java/src/org/apache/axis/handlers/soap/SOAPService.java
  
  Index: SOAPService.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/handlers/soap/SOAPService.java,v
  retrieving revision 1.75
  retrieving revision 1.76
  diff -u -r1.75 -r1.76
  --- SOAPService.java	5 Aug 2002 05:10:47 -0000	1.75
  +++ SOAPService.java	6 Aug 2002 03:55:04 -0000	1.76
  @@ -291,7 +291,8 @@
        *
        * Syncronized to prevent simutaneous modification of serviceDescription.
        */
  -    public synchronized ServiceDesc getInitializedServiceDesc()
  +    public synchronized ServiceDesc getInitializedServiceDesc(
  +                                                     MessageContext msgContext)
               throws AxisFault {
   
           if (serviceDescription.getImplClass() == null) {
  @@ -302,7 +303,7 @@
               // providers which don't strictly map to Java class backends
               // (BSFProvider, etc.), and as such we hand off here.
               if (pivotHandler instanceof BasicProvider) {
  -                ((BasicProvider)pivotHandler).initServiceDesc(this);
  +                ((BasicProvider)pivotHandler).initServiceDesc(this, msgContext);
               }
   
           }
  
  
  
  1.69      +6 -2      xml-axis/java/src/org/apache/axis/message/RPCElement.java
  
  Index: RPCElement.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/message/RPCElement.java,v
  retrieving revision 1.68
  retrieving revision 1.69
  diff -u -r1.68 -r1.69
  --- RPCElement.java	5 Aug 2002 05:10:47 -0000	1.68
  +++ RPCElement.java	6 Aug 2002 03:55:04 -0000	1.69
  @@ -101,11 +101,15 @@
           if (operations == null) {
               SOAPService service    = msgContext.getService();
               if (service != null) {
  -                ServiceDesc serviceDesc = service.getInitializedServiceDesc();
  +                ServiceDesc serviceDesc =
  +                        service.getInitializedServiceDesc(msgContext);
                   
                   String lc = Utils.xmlNameToJava(name);
                   if (serviceDesc == null) {
  -                    AxisFault.makeFault(new ClassNotFoundException(JavaUtils.getMessage("noClassForService00",
lc)));
  +                    AxisFault.makeFault(
  +                            new ClassNotFoundException(
  +                                    JavaUtils.getMessage("noClassForService00",
  +                                                         lc)));
                   }
   
                   operations = serviceDesc.getOperationsByName(lc);
  
  
  
  1.12      +3 -1      xml-axis/java/src/org/apache/axis/providers/BasicProvider.java
  
  Index: BasicProvider.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/providers/BasicProvider.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- BasicProvider.java	5 Aug 2002 05:10:47 -0000	1.11
  +++ BasicProvider.java	6 Aug 2002 03:55:05 -0000	1.12
  @@ -58,6 +58,7 @@
   import org.apache.axis.handlers.BasicHandler;
   import org.apache.axis.handlers.soap.SOAPService;
   import org.apache.axis.AxisFault;
  +import org.apache.axis.MessageContext;
   
   import javax.xml.namespace.QName;
   
  @@ -74,7 +75,8 @@
        * This method returns a ServiceDesc that contains the correct 
        * implimentation class. 
        */ 
  -    public abstract void initServiceDesc(SOAPService service)
  +    public abstract void initServiceDesc(SOAPService service,
  +                                         MessageContext msgContext)
               throws AxisFault;
       
       public void addOperation(String name, QName qname) {
  
  
  
  1.29      +15 -6     xml-axis/java/src/org/apache/axis/providers/java/EJBProvider.java
  
  Index: EJBProvider.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/providers/java/EJBProvider.java,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- EJBProvider.java	1 Aug 2002 20:14:33 -0000	1.28
  +++ EJBProvider.java	6 Aug 2002 03:55:05 -0000	1.29
  @@ -61,6 +61,7 @@
   import org.apache.axis.Constants;
   import org.apache.axis.Handler;
   import org.apache.axis.MessageContext;
  +import org.apache.axis.handlers.soap.SOAPService;
   import org.apache.axis.utils.ClassUtils;
   import org.apache.axis.utils.JavaUtils;
   
  @@ -187,26 +188,34 @@
        * @param beanJndiName the JNDI name of the EJB
        * @return the class info of the EJB remote interface
        */ 
  -    protected Class getServiceClass(MessageContext msgContext, String beanJndiName)
  +    protected Class getServiceClass(String beanJndiName,
  +                                    SOAPService service,
  +                                    MessageContext msgContext)
           throws AxisFault
       {
  -        Handler serviceHandler = msgContext.getService();
  +        if (msgContext == null) {
  +            // FIXME : what should we do here?
  +            return null;
  +        }
  +
           Class interfaceClass = null;
           
           // First try to get the interface class from the configuation
           String remoteName = 
  -                (String) getStrOption(OPTION_REMOTEINTERFACENAME, serviceHandler);
  +                (String) getStrOption(OPTION_REMOTEINTERFACENAME, service);
           try {
               if(remoteName != null){
  -                interfaceClass = ClassUtils.forName(remoteName, true, msgContext.getClassLoader());
  +                interfaceClass = ClassUtils.forName(remoteName,
  +                                                    true,
  +                                                    msgContext.getClassLoader());
               }
               else
               {
                   // Get the EJB Home object from JNDI
                   Object ejbHome = getEJBHome(msgContext, beanJndiName);
   
  -                String homeName = (String) getStrOption(OPTION_HOMEINTERFACENAME,
  -                                                        serviceHandler);
  +                String homeName = (String)getStrOption(OPTION_HOMEINTERFACENAME,
  +                                                        service);
                   if (homeName == null)
                       throw new AxisFault(
                               JavaUtils.getMessage("noOption00",
  
  
  
  1.72      +8 -5      xml-axis/java/src/org/apache/axis/providers/java/JavaProvider.java
  
  Index: JavaProvider.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/providers/java/JavaProvider.java,v
  retrieving revision 1.71
  retrieving revision 1.72
  diff -u -r1.71 -r1.72
  --- JavaProvider.java	5 Aug 2002 05:10:47 -0000	1.71
  +++ JavaProvider.java	6 Aug 2002 03:55:05 -0000	1.72
  @@ -301,7 +301,7 @@
           /* Find the service we're invoking so we can grab it's options */
           /***************************************************************/
           SOAPService service = msgContext.getService();
  -        ServiceDesc serviceDesc = service.getInitializedServiceDesc();
  +        ServiceDesc serviceDesc = service.getInitializedServiceDesc(msgContext);
   
           try {
               String url = msgContext.getStrProp(MessageContext.TRANS_URL);
  @@ -446,11 +446,14 @@
       /**
        * Returns the Class info about the service class.
        */
  -    protected Class getServiceClass(String clsName, AxisEngine engine)
  +    protected Class getServiceClass(String clsName,
  +                                    SOAPService service,
  +                                    MessageContext msgContext)
               throws AxisFault {
           ClassLoader cl = null;
           Class serviceClass = null;
  -        
  +        AxisEngine engine = service.getEngine();
  +
           // If we have a message context, use that to get classloader and engine
           // otherwise get the current threads classloader
           cl = Thread.currentThread().getContextClassLoader();
  @@ -483,7 +486,7 @@
        * other providers (like the EJBProvider) to get the class from the
        * right place.
        */
  -    public void initServiceDesc(SOAPService service)
  +    public void initServiceDesc(SOAPService service, MessageContext msgContext)
               throws AxisFault 
       {
           // Set up the Implementation class for the service
  @@ -492,7 +495,7 @@
           ServiceDesc serviceDescription = service.getServiceDescription();
   
           if (clsName != null) {
  -            Class cls = getServiceClass(clsName, service.getEngine());
  +            Class cls = getServiceClass(clsName, service, msgContext);
               serviceDescription.setImplClass(cls);
           }
           
  
  
  
  1.21      +1 -1      xml-axis/java/test/encoding/TestArrayListConversions.java
  
  Index: TestArrayListConversions.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/encoding/TestArrayListConversions.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- TestArrayListConversions.java	5 Aug 2002 05:10:48 -0000	1.20
  +++ TestArrayListConversions.java	6 Aug 2002 03:55:05 -0000	1.21
  @@ -60,7 +60,7 @@
               service.setOption("className", "test.encoding.TestArrayListConversions");
               service.setOption("allowedMethods", "*");
   
  -            ServiceDesc desc = service.getInitializedServiceDesc();
  +            ServiceDesc desc = service.getInitializedServiceDesc(null);
               desc.setDefaultNamespace(SERVICE_NAME);
   
               provider.deployService(SERVICE_NAME, service);
  
  
  

Mime
View raw message