The operation name and the method name do not need to be the same. You use the <operation> definition in the WSDD to map the method name to an operation name (qname). But you can map a method to only one operation.
Also note that when using the java:MSG provider, your operation may have only one input parameter and one return value. It assumes you are using document/literal style, and it always converts the input and output messages into DOM. If you want Axis to perform XML to Java mapping for you, then you want to use the java:RPC provider.
Can you explain to us why you want to be able to define the input and output parameters, but you don't want to let Axis perform your dispatching?
May I also suggest that given the amount of control you want, you should be defining your service using WSDL rather than WSDD.
Anne
On 1/19/06, Daniel López <[EMAIL PROTECTED]> wrote:
Hi Anne,
Thanks for your suggestions, I tried the java:MSG provider and even
though it goes one step further towards what I want to accomplish, I'm
still limited to make it so the name of the operation and method in the
Java class are the same, which I want to avoid if possible. Is there any
way I can change that?
I also had already considered the workaround you suggest with the
submitRequest generic operation, but then I would lose the extra
features that I can get from defining each operation separatedly in the
wsdd, each one with its parameters and types specified etc.
So I would like to be able to do something like...
...
<service name="TestWebService" provider="java:MSG">
<parameter name="className" value="test.TestWS" />
<parameter name="scope" value="Application" />
<parameter name="allowedMethods" value="process" />
<operation
name="getInfo"
qname="ns:getInfo"
returnQName="return"
returnType="rtns:normalizedString"
xmlns:rtns=" http://www.w3.org/2001/XMLSchema"
xmlns:ns="http://soapinterop.org/xsd"
>
<parameter name="id" type="tns:string"
xmlns:tns="http://www.w3.org/2001/XMLSchema"
/>
</operation>
<operation
name="getMoreInfo"
qname="ns:getMoreInfo"
returnQName="return"
returnType="rtns:normalizedString"
xmlns:rtns="http://www.w3.org/2001/XMLSchema"
xmlns:ns=" http://soapinterop.org/xsd"
>
<parameter name="id" type="tns:string"
xmlns:tns="http://www.w3.org/2001/XMLSchema"
/>
<parameter name="anotherParam" type="tns:string"
xmlns:tns="http://www.w3.org/2001/XMLSchema"
/>
</operation>
...
</service>
...
But have both the operations,"getInfo" and "getMoreInfo" be implemented
in a single Java method like
/**
*
*/
public Element [] dispath(Element [] elems)
{
// Parse elems and see if the requested operation is getInfo
// or getMoreInfo...
}
Is this possible at all?
Thanks,
D.
Anne Thomas Manes escribió:
> You can have complete control over dispatching if you use a message
> style service with the java:MSG provider. Alternatively, you can define
> a generic operation (something like "submitRequest") which will always
> be dispatched to your controller.
>
> Anne
