axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sardar Hussain <>
Subject Re: [AXIS2] Redirecting a response from axis2 handler to client
Date Sat, 05 Feb 2011 03:14:04 GMT
Thank you Deepal, but how can I access that at the client side? I did this earlier but I could
not get meaningful data from that. Like I want to abort and also deliver some specific integer
value like 5 in response to the client.As I want to add something extra as well like my custom
message in response too. I don't know how to get a specific value for example some string
or integer value. 
When I use the following code I can't get that specific values.

ServiceClient sc = new ServiceClient();
        OperationClient opClient = sc.createClient(
        //creating message context
        MessageContext outMsgCtx = new MessageContext();
        //assigning message context's option object into instance variable
        Options opts = outMsgCtx.getOptions();
        //setting properties into option
        opts.setTo(new EndpointReference(
        //pass message label as method argument
        MessageContext inMsgtCtx = opClient.getMessageContext("In");
        SOAPEnvelope response = inMsgtCtx.getEnvelope();


sardar hussain

--- On Fri, 4/2/11, Deepal Jayasinghe <> wrote:

From: Deepal Jayasinghe <>
Subject: Re: [AXIS2] Redirecting a response from axis2 handler to client
Date: Friday, 4 February, 2011, 18:53


  You can simply throw an exception inside your handler, or you can
    return Invocation.ABORT as the return value






              I have a custom module deployed on axis2
              server side. While the client  request goes to that handler in an inflow, i
want it should create
              one error response in that handler and
              send back to client without doing any further processing
              or forwarding the client request to the Web Service. How
              can I achieve this, any clue or tutorial please?




              Sardar Hussain



View raw message