I'm trying to do the following. Can someone tell me whether it is OK/possible doing it this way
Is there a better way of doing it



I'm writing server-side web services, exposing methods to clients (these can be anything).


I need to create a custom soap header. Would it be best for the client to do this?

I then need to add a value to the SOAP header. Is the below code the right wya of doing this?

public static String addSOAPHeader(String token) throws Exception
{
URL endpoint = new URL("http://localhost:8080/somwhere";);
Service service = new Service();
Call call = (Call)service.createCall();
SOAPHeaderElement TokenHeader = new SOAPHeaderElement("http://localhost...","TokenHeader";);


       TokenHeader.setObjectValue(stringvalue);

       call.addHeader(TokenHeader);
           }

With every call the client makes, will this value disappear or will it keep it. How do i make sure the value is kept, until the client is closed ?

Also i'm ok with setting a vlaue (i think), how do i 'grab' the value?

Many thanks

_________________________________________________________________
Be the first to hear what's new at MSN - sign up to our free newsletters! http://www.msn.co.uk/newsletters




Reply via email to