Hi all,

As we all know, with Axis2/C we can specify a configuration value as a
parameter i.e. in services.xml.

<parameter name="ServiceClass" locked="xsd:false">echo</parameter>

These are usefull for specifying custom configuraions i.e module
configurations.

When we specify a xml element as the parameter value the behaviour is little
bit confusing.  I'm reffering  to the code in desc_builder.c: 611-641. From
the code it seems that it tries to create a new parameter for every child
xml element recursively. Then it store these new parameters in an array list
of the original parameter. Ultimately it tries to capture the xml
configuration in a tree like structure. In this tree structure we have
axutil_param_t to represent nodes instead of axiom_node_t.

<parameter name="ServiceClass" locked="xsd:false"><myconfig
myattribute:"value">10</myconfig ></parameter>

For the above configuration we will have a parameter named ServiceClass and
in its internal arraylist we will have another parameter with the name
myconfig. The problem with this approach is that it cannot capture the
entire XML configuration. i.e xml namespaces.

AFAIK the most logical thing would be to store the element as an axiom node
in the configuration and return it when requested. It is up to the entity
which defines the parameter to process the axiom node and retrieve values
from it. This approach is much cleaner and gives the maximum control. AFAIK
Java implementation works in this way. So how about changing the processing
to store the axiom node?

Thanks,
Supun..

Software Engineer, WSO2 Inc

Reply via email to