You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by "Tim Bartley (JIRA)" <ax...@ws.apache.org> on 2005/02/11 00:19:12 UTC

[jira] Created: (AXISCPP-426) Programmatic configuration

Programmatic configuration
--------------------------

         Key: AXISCPP-426
         URL: http://issues.apache.org/jira/browse/AXISCPP-426
     Project: Axis-C++
        Type: New Feature
  Components: Configuration  
    Versions: future (enh)    
 Environment: all
    Reporter: Tim Bartley


It would be useful to be able to provide all configuration information programatically not least to prevent interaction between different clients and servers.

Regards,

Tim

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXISCPP-426) Programmatic configuration

Posted by "John Kelly (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXISCPP-426?page=comments#action_12318882 ] 

John Kelly commented on AXISCPP-426:
------------------------------------

I've got an proposal for a solution (i've also implemented it) - comments appeciated

#include <axis/GDefine.hpp>
#include <string>
/**
 *   @class AxisCPPConfigDefaults
 *   @brief class for programmatically setting configuration defaults.
 *   
 *   AxisCPPConfigDefaults allows you to apply new configuration 
 *   defaults, prior to the instantiation of the first web service
 *   class in the application. These programmer-set defaults may be
 *   over-ridden by the external factors, such as..
 *    - the values in axiscpp.conf
 *    - the value of AXISCPP_DEPLOY
 * 
 *   The get/set methods don't have any effect on the ACTUAL defaults. They
 *   are mearly a bundle of values which are set on the ACTUAL defaults when
 *   the apply() method is issued.
 * 
 *   It consists of...
 *   (a) get/set methods for each of the values to be found
 *       in the configuration file, namely:
 *       - ClientLog
 *       - ClientWSDDFile
 *       - XMLParserLibrary
 *       - HTTPTransportLibrary
 *       - HTTPChannelLibrary
 *       - HTTPSSLChannelLibrary 
 *       - NodeName
 *       - ListenPort
 *       - SecureInfo
 *       When the first web-services class is instantiated any values set in the config 
 *       file would over-ride those set by this class.
 *   (b) get/set methods for AxisHome 
 *       This is the programmatic equivaluent of the AXISCPP_DEPLOY
 *       environment variable.
 *       When the first class is instantiated, if AXISCPP_DEPLOY is set 
 *       it will over-ride the value set by this class.
 *   (c) The apply() method takes any values that have been set on the object
 *       and set them as the Axis CPP defaults for this process. 
 * 
 *   Exceptions thrown: AxisConfigException
 * 
 *       Once the first web service is instantiated, new defaults may no longer
 *       be applied. If this is attempted an AxisConfigException is thrown.
 * 
 *   Usage examples
 *   (a) Setting the location of the axiscpp.conf file to the 
 *      "current working directory"
 * 
 *      AxisCPPDefaultConfig defConfig;
 *      defConfig.setAxisHome(".");
 *      defConfig.apply();
 * 
 * 
 *   @author John Kelly (john_kelly@uk.ibm.com)
 */

AXIS_CPP_NAMESPACE_START

/*
 * Forward declarations.
 */

class AxisCPPConfigDefaultsImpl;

/*
 * Class definition.
 */

class STORAGE_CLASS_INFO AxisCPPConfigDefaults
{
    public:

      AxisCPPConfigDefaults();      
      ~AxisCPPConfigDefaults();
 
     char* getClientLog();
     char* getClientWSDDFile();
     char* getXMLParserLibrary();
     char* getHTTPTransportLibrary();
     char* getHTTPChannelLibrary();
     char* getHTTPSSLChannelLibrary(); 
     char* getNodeName();
     char* getListenPort();
     char* getSecureInfo();
     char* getAxisHome();
        
     void setClientLog(char*);
     void setClientWSDDFile(char*);
     void setXMLParserLibrary(char*);
     void setHTTPTransportLibrary(char*);
     void setHTTPChannelLibrary(char*);
     void setHTTPSSLChannelLibrary(char*);
     void setNodeName(char*);
     void setListenPort(char*);
     void setSecureInfo(char*);
     void setAxisHome(char*);                    

     void apply();                                

   protected:         
      AxisCPPConfigDefaultsImpl *m_pImpl;

};

AXIS_CPP_NAMESPACE_END


> Programmatic configuration
> --------------------------
>
>          Key: AXISCPP-426
>          URL: http://issues.apache.org/jira/browse/AXISCPP-426
>      Project: Axis-C++
>         Type: New Feature
>   Components: Configuration
>     Versions: future (enh)
>  Environment: all
>     Reporter: Tim Bartley

>
> It would be useful to be able to provide all configuration information programatically not least to prevent interaction between different clients and servers.
> Regards,
> Tim

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Closed: (AXISCPP-426) Programmatic configuration

Posted by "Fred Preston (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXISCPP-426?page=all ]
     
Fred Preston closed AXISCPP-426:
--------------------------------


> Programmatic configuration
> --------------------------
>
>          Key: AXISCPP-426
>          URL: http://issues.apache.org/jira/browse/AXISCPP-426
>      Project: Axis-C++
>         Type: New Feature

>   Components: Configuration
>     Versions: future (enh)
>  Environment: all
>     Reporter: Tim Bartley
>      Fix For: 1.6 Alpha

>
> It would be useful to be able to provide all configuration information programatically not least to prevent interaction between different clients and servers.
> Regards,
> Tim

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (AXISCPP-426) Programmatic configuration

Posted by "John Hawkins (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXISCPP-426?page=all ]
     
John Hawkins resolved AXISCPP-426:
----------------------------------

    Fix Version: 1.6 Alpha
     Resolution: Fixed

I'm resolving this as implemented as discussed in the JIRA. It's not been tested yet so I'm not closing it until then

> Programmatic configuration
> --------------------------
>
>          Key: AXISCPP-426
>          URL: http://issues.apache.org/jira/browse/AXISCPP-426
>      Project: Axis-C++
>         Type: New Feature
>   Components: Configuration
>     Versions: future (enh)
>  Environment: all
>     Reporter: Tim Bartley
>      Fix For: 1.6 Alpha

>
> It would be useful to be able to provide all configuration information programatically not least to prevent interaction between different clients and servers.
> Regards,
> Tim

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXISCPP-426) Programmatic configuration

Posted by "John Hawkins (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXISCPP-426?page=comments#action_66632 ]
     
John Hawkins commented on AXISCPP-426:
--------------------------------------

Some comments from the community ->
JOHN KELLY -
John,

A couple of minor suggestions

a) ClientLogPath

Might be nice if you could pass a file_handle so the output could go to
places like sdtout or stderr

b) ClientWSDDFile

Might be nice if you could pass a file_handle so the input could come
places like stdin

Might also be nice if one could optionally pass the equivalent of the file
contents in as a string, rather than just a file name. The program could
then build up the configuration programmatically removing the need for
deploying a separate file.

c) Library names

Might be nice if all the library names on the different platforms had a
standardised naming convention like
HTTP_channel.dll and libHTTP_channel.so, then you could have the
axiscpp.conf and the api take a short form of the shared library name, so
the method setHTTPChannelLibrary("HTTP_channel"); would be platform neutral
and the client would look for HTTP_channel.dll on the PATH on Windows or
libHTTP_channel.so on the LD_LIBRARY_PATH on Linux.

regards
John

CARSTEN BLACKEN -
Excellent idea! +1
 
The only suggestion I have is that would be hesitant to set the configuration per service
constructor. The configuration is typically done globally on a per process basis and there should 
be an option to do it globally and programmatically.
For example adding a method to Axis.cpp:
 
static void Axis::setConfig(AxisCPP_Configuration conf);
 
which sets g_pConfig.
 
My 2c,
 
Carsten
 
 
 
-----Original Message-----
From: John Hawkins [mailto:HAWKINSJ@uk.ibm.com]
Sent: Friday, May 06, 2005 6:40 AM
To: axis-c-dev@ws.apache.org
Subject: New client configuration API


Hi Folks, 

we'd like to implement a new API for configuration of the client-side. 

I've written a vrief synopsis of what is there to day and what we'd like to do.......... 


The environment variable is AXISCPP_DEPLOY. This variable is used by the configuration system to look up a file called axiscpp.conf. This file consists of the following: 

#ClientLogPath:                 The path to the axis client log 
#ClientWSDDFilePath:         The path to the client wsdd 
#XMLParser:                 The xml parser library 
#Transport_http:                 The HTTP transport library 
#Channel_HTTP:                 The HTTP transport channel library 
#Channel_HTTP_SSL:         The HTTP transport secure channel library 

This data can be placed in a new configuration Object with the following signature (Pseudo) 

AxisCPP_Configuration 
{ 
        get/set ClientLog(String); 
        get/set ClientWSDDFile(String); 
get/set XMLParserLibrary(String); 
get/set TransportLibrary(String); 
get/set HTTPChannelLibrary(String); 
get/set HTTPSSLChannelLibrary(String); 
} 

A new Web Service constructor will be created that takes in an AxisCPP_Configuration object. This constructor will be in addition to the current range of constructors that are created for each service. 

The user may create a web service using the constructor. However, if they attempt to use the constructor with a configuration object more than once in any given process the configuration object will be ignored i.e. the engine can only be configured once per process. 


Client WSDD files will still be required and no new API will be introduced for them. 


thoughts please? 


thanks, 
john.

> Programmatic configuration
> --------------------------
>
>          Key: AXISCPP-426
>          URL: http://issues.apache.org/jira/browse/AXISCPP-426
>      Project: Axis-C++
>         Type: New Feature
>   Components: Configuration
>     Versions: future (enh)
>  Environment: all
>     Reporter: Tim Bartley

>
> It would be useful to be able to provide all configuration information programatically not least to prevent interaction between different clients and servers.
> Regards,
> Tim

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira