Hi, Yes, you can call it DoSomethingResult which is just a marker response. You just need to return smth from service.
Sent from my iPad On 29.09.2011, at 20:05, "Alfredo Manuel Osorio Martinez" <alfredo.oso...@afirme.com> wrote: > Thanks for your response. But what do you mean with replace void by > empty TestMyServiceResult class? You mean to create a new custom class > named "TestMyServiceResult" and return that form the > MyService.doSomethingMethod? Something like: > > public TestMyServiceResult doSomething() { > throw new IllegalArgumentException("Just testing!"); > } > > -----Mensaje original----- > De: Hodchenkov, Paul [mailto:paul.hodchen...@oxagile.com] > Enviado el: Thursday, September 29, 2011 11:55 AM > Para: java-user@axis.apache.org > Asunto: Re: Axis 2 Client not receiving a thrown exception from an Axis > 2 Webservice > > > 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 > > > --------------------------------------------------------------------- > 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