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/src/org/apache/axis/providers/java JavaProvider.java
Date Fri, 14 Sep 2001 17:24:00 GMT
gdaniels    01/09/14 10:24:00

  Modified:    java/src/org/apache/axis/providers/java JavaProvider.java
  Log:
  Fix WSDL generation two ways:
  
  1) get the service object using the overridable method, so we now
      deal with EJBs correctly
  
  2) Respect the AxisServiceConfig getMethods() result when generating
      WSDL.
  
  Revision  Changes    Path
  1.17      +20 -12    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.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- JavaProvider.java	2001/09/10 17:35:19	1.16
  +++ JavaProvider.java	2001/09/14 17:24:00	1.17
  @@ -262,14 +262,20 @@
   
           /* Now get the service (RPC) specific info  */
           /********************************************/
  -        String  clsName    = (String) service.getOption( "className" );
  -        String  allowedMethods = getServiceAllowedMethods(service);
  +        String  clsName   = getServiceClassName(service);
  +        Object obj        = null;
  +        try {
  +            obj = getServiceObject(msgContext,
  +                                   service,
  +                                   clsName);
  +        } catch( Exception exp ) {
  +            category.error( exp );
  +            if ( !(exp instanceof AxisFault) ) exp = new AxisFault(exp);
  +            throw (AxisFault) exp ;
  +        }
   
  -        if ((clsName == null) || clsName.equals(""))
  -          throw new AxisFault("Server.NoClassForService",
  -            "No 'className' option was configured for the service '" +
  -               serviceName + "'",
  -            null, null);
  +        JavaClass jc	  = new JavaClass(obj.getClass());
  +        String  allowedMethods = getServiceAllowedMethods(service);
   
           /** ??? Should we enforce setting methodName?  As it was,
            * if it's null, we allowed any method.  This seems like it might
  @@ -287,13 +293,15 @@
           if (allowedMethods.equals("*"))
             allowedMethods = null;
   
  +        /** If the class knows what it should be exporting,
  +        * respect its wishes.
  +        */
  +        if (obj instanceof AxisServiceConfig) {
  +            allowedMethods = ((AxisServiceConfig)obj).getMethods();
  +        }
  +
           try {
  -            /* We know we're doing a Java/RPC call so we can ask for the */
  -            /* SOAPBody as an RPCBody and process it accordingly.        */
  -            /*************************************************************/
  -            int             i ;
               AxisClassLoader cl     = msgContext.getClassLoader();
  -            JavaClass       jc     = cl.lookup(clsName);
               Class           cls    = jc.getJavaClass();
               String url = msgContext.getStrProp(MessageContext.TRANS_URL);
               String urn = (String)msgContext.getTargetService();
  
  
  

Mime
View raw message