axis-java-user mailing list archives

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

Hello

Ive got this so far

public class SOAPHandler extends HTTPSender
{
    public void invoke(MessageContext msgContext) throws AxisFault
    {
        handleRequest(msgContext);
        super.invoke(msgContext);
    }


    public boolean handleRequest(MessageContext context)
    {
        try
        {
            Message message = context.getRequestMessage();
            SOAPEnvelope envelope = message.getSOAPEnvelope();
            SOAPHeaderElement header = 
envelope.getHeaderByName("http://addressinhere","TokenHeader");
        }
        catch(Exception e)
        {
            System.out.println(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" <Thomas.Dorner@t-systems.com>
>Reply-To: axis-user@ws.apache.org
>To: axis-user@ws.apache.org
>Subject: AW: MessageContext - SOAP headers Date: Tue, 26 Apr 2005 12:16:28 
>+0200
>
>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("http://xml.apache.org/axis/session", "sessionID");
>
>Tomi
>
>-----Ursprüngliche Nachricht-----
>Von: Plorks mail [mailto:plork123@hotmail.com]
>Gesendet: Dienstag, 26. April 2005 11:11
>An: axis-user@ws.apache.org
>Betreff: MessageContext - SOAP headers
>
>
>Hello
>
>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 
>check
>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
>http://messenger.msn.co.uk

_________________________________________________________________
Want to block unwanted pop-ups? Download the free MSN Toolbar now!  
http://toolbar.msn.co.uk/


Mime
View raw message