axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dave Meier" <>
Subject RE: Axis2C support for dynamic operations
Date Fri, 25 Jan 2008 19:01:20 GMT
Hi Samisa,

Is there any way to do the equivalent of "any" for a service?  Kind of
like an "any" element in a schema, except for an operation.  All I need
is to have the engine call my invoke method and at that point I can
write all the code that knows how to handle the operation.

If this is not possible, maybe I could alter the axis2 code where it
looks up the operation and map it to an existing operation, but store
the original operation name in the context.  So for example, if I have a
known operation called "Update" and a request comes in called
"UpdateFoo" I would map this operation to "Update" and store "UpdateFoo"
somewhere in the context.  So I would have something like the following
in my services.xml:

<operation name="Update" dynamic="Update*">
<parameter name="wsamapping">\"\"</parameter>

Then on the response, I would need to make sure it used the original
"UpdateFoo" name.

I don't mind going off and modifying the axis2 code for my purposes to
make this work.  Can you point me to where this would be done?



-----Original Message-----
From: Samisa Abeysinghe [] 
Sent: Thursday, January 24, 2008 6:06 PM
To: Apache AXIS C Developers List
Subject: Re: Axis2C support for dynamic operations

This cannot be done with WSDLs because we do not have a WSDL model
associated with the description hierarchy.

However, you can add support for new operations, dynamically to the
description hierarchy, in runtime, by accessing configuration. However,
this may have threading issues. Other problem with dynamic operations,
is how to map the operation to a function. For current operations this
happens at the server startup time. We can achieve dynamic operation to
function mapping using a custom message receiver, which will load the
functions mapped to the operation on the run.

In short, this can be done. However, that needs lots of engineering.


Dave Meier wrote:
> Hi All,
> I have a requirement to support dynamically generated wsdls.  Each 
> wsdl will contain a core set of operations, but will then have 
> additional operations defined.  I want to use the wsdl with the core 
> set of operations as my service in Axis2C, but then write code in my 
> invoke method that will know about the additional new operations as 
> they will follow a standard pattern.
> My question is, how can I get Axis2C to forward the request to my 
> invoke method, for operations that are not in the services.xml file?
> In services.xml could I somehow use wildcards?  Like this:
> <operation name="Update*">
> <parameter name="wsamapping">\"\"</parameter>
> </operation>
> So then a custom wsdl file would be given to a client and it could 
> have operations like "UpdateFoo" and "UpdateBar", which are not in the

> services.xml, but the "Update*" could match them.  Then in my invoke 
> method I could analyze the operation name and know what to do with it 
> (e.g. "UpdateFoo" would tell me to use "Foo" logic and I would know 
> how to handle that).
> The purpose for this is ease of use to the client.  We have many 
> operations that are generalized, but if I can generate new wsdl to do 
> specifically what the user is trying to do, they can use these custom 
> operation names directly.  This will result in greatly increased 
> usability.
> I think most of the work is on the service in my code, but I need a 
> way to tell Axis2C to forward along the request even if it is not in 
> the known set.  Is there a way to do this, or is there a way to modify

> the code to support this?
> Thank you much,
> -Dave.
> **********************************************************************
> This email and any files transmitted with it are confidential and 
> intended solely for the use of the individual or entity to whom they 
> are addressed. Any unauthorized review, use, disclosure or 
> distribution is prohibited. If you are not the intended recipient, 
> please contact the sender by reply e-mail and destroy all copies of 
> the original message.
> **********************************************************************
> ----------------------------------------------------------------------
> --
> No virus found in this incoming message.
> Checked by AVG Free Edition. 
> Version: 7.5.516 / Virus Database: 269.19.10/1240 - Release Date: 
> 1/23/2008 5:47 PM

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message