Actually my deployment file looks like this:

<!-- Use this file to deploy the service using the following command: -->
<!--       java org.apache.axis.client.AdminClient deploy.wsdd        -->

<deployment xmlns="http://xml.apache.org/axis/wsdd/";
            xmlns:java="http://xml.apache.org/axis/wsdd/providers/java";>

  <service name="MessageService" provider="java:MSG" >
    <parameter name="className" value="si.hermes.bc.server.MessageService"/>
    <parameter name="allowedMethods" value="TypeARequest TypeBRequest"/>
  </service>

</deployment>

but when invoking the service (follows SOAP Message)

<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";
 xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
 <SOAP-ENV:Body><TypeARequest xmlns="http://server.bc.hermes.si";>
<po>
<e1 xmlns:ns0="urn:foo">Hi!</e1>
<e1 xmlns:ns1="urn:foo">World</e1>
<e1 xmlns:ns2="urn:foo">Hello</e1>
</po>
</TypeARequest> </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

I get the following error:


 [java] Exception caught: java.lang.NoSuchMethodException: tried class:
hermes.bc.server.MessageService, 
method name:   TypeARequest TypeBRequest.

as if the MsgProvider tried to call a method called 
"TypeARequest TypeBRequest" not being aware that there are 
actually two methods. I have dedicated one whole day to this issue
and I think this is a bug because everything works fine if I remove
any of the methods from the deployment file: the right method is
always called.

Can perhaps somebody from the developers list clarify me
how does Axis know which method to call in NON-RPC
calls? 

Thanks.

Ramón.

> -----Original Message-----
> From: Ramon Turnes [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 14, 2002 11:57 AM
> To: '[EMAIL PROTECTED]'
> Subject: Document style service with two methods
> 
> 
> Hi,
> 
> I would like to have a service using Document style with two
> methods but it seems that this is not possible because the 
> message dispatcher for Document style services checks for
> a method with the following signature:
> 
> 
>   Document MyMethod(MessageContext mc, Document xml) {
>   .....
>   }
> 
> and the method name is not taken into consideration for
> deciding which method to call. But what if I want to have 
> two methods in my service, let's say a Registration method
> and a Ordering method? Should I provide then two endpoints
> for each of the methods (I saw an example in WSTK that does it).
> Can I do this with Document style services or I need to use RPC?
> 
> Thanks.
> 

Reply via email to