axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Plorks mail" <>
Subject RE: AW: MessageContext - SOAP headers
Date Tue, 26 Apr 2005 10:31:56 GMT


Ive got this so far

public class SOAPHandler extends HTTPSender
    public void invoke(MessageContext msgContext) throws AxisFault

    public boolean handleRequest(MessageContext context)
            Message message = context.getRequestMessage();
            SOAPEnvelope envelope = message.getSOAPEnvelope();
            SOAPHeaderElement header = 
        catch(Exception e)

        return true;

I know i need a handleResponse - will that be similar to handleRequest?

Can you tell me what MessageContext is?

I'm new to Axis

Thanks for any help

>From: "Dorner, Thomas" <>
>Subject: AW: MessageContext - SOAP headers Date: Tue, 26 Apr 2005 12:16:28 
>The invoke(MessageContext context) of the Handler (every handler needs
>invoke()) gets the MessageContext
>Then make the following:
>Message msg = context.getRequestMessage();
>SOAPEnvelope env = msg.getSOAPEnvelope();
>SOAPHeaderElement header =
>env.getHeaderByName("", "sessionID");
>-----Ursprüngliche Nachricht-----
>Von: Plorks mail []
>Gesendet: Dienstag, 26. April 2005 11:11
>Betreff: MessageContext - SOAP headers
>Please can someone help me as I am really stuck and confused
>I have some server-side code that passes parameters to a back-end db table.
>If OK, I return a string value
>I want to write a AXIS SOAP handler that will do the following :
>1. Take the string value and pass it to a client - the client will create a
>SOAP header and store the vlaue in it
>2.  I want to be able to get the SOAP header value from the client, to 
>the value, if it exists, and if needed update the SOAP header value.
>To get the SOAP header vlaue in the client, do i use MessageContext?
>So the string returned by the 'server-side' is used by the client in it's
>fruther communication as a proof of authenticated client
>Use MSN Messenger to send music and pics to your friends

Want to block unwanted pop-ups? Download the free MSN Toolbar now!

View raw message