Hi,
Web method with void return type is considered as one way message. Not sure 
about axis 2, but in jax-ws Client does not expect to have a response(including 
faults). Replace void by empty TestMyServiceResult class.
Sent from my iPad

On 28.09.2011, at 19:38, "Alfredo Manuel Osorio Martinez" 
<alfredo.oso...@afirme.com> wrote:

> An Axis 2 client (wsdl2java generated code) invoking an Axis 2
> Webservice is not receiving a RuntimeException thrown from a Service.
> The invoked method is a void method.
> 
> The Axis 2 version I'm using for both client and server is 1.6.1.
> 
> When I run the following test it completes successfully and no Exception
> is received:
> 
> @Test
> public void testMyService() throws RemoteException {
>    String target = "http://localhost:8080/services/MyService";;
>    MyServiceStub myServiceStub = new MyServiceStub(target);
>    myServiceStub.doSomething();
> }
> 
> MyService.java:
> 
> package com.afirme.webservice.service;
> 
> @Service
> public class MyService {
> 
>    public void doSomething() {
>        throw new IllegalArgumentException("Just testing!");
>    }
> 
> }
> 
> services.xml:
> 
> <serviceGroup>
>    <service name="MyService">
>        <description>
>            My Service
>        </description>
>         <messageReceivers>
>                <messageReceiver 
>                    mep="http://www.w3.org/2004/08/wsdl/in-only";
> 
> class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver"/>
>                <messageReceiver
>                    mep="http://www.w3.org/2004/08/wsdl/in-out";
>            class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
>        </messageReceivers>
>         <parameter
> name="ServiceObjectSupplier">org.apache.axis2.extensions.spring.receiver
> s.SpringServletContextObjectSupplier</parameter>
>         <parameter name="SpringBeanName">myService</parameter>
>    </service>  
> </serviceGroup>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscr...@axis.apache.org
> For additional commands, e-mail: java-user-h...@axis.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@axis.apache.org
For additional commands, e-mail: java-user-h...@axis.apache.org

Reply via email to