org.kth.pdc.grid.utility
Class AxisUtil

java.lang.Object
  extended by org.kth.pdc.grid.utility.AxisUtil

public class AxisUtil
extends Object

Axis Utility methods.

Author:
Davanum Srinivas (dims@yahoo.com).

Constructor Summary
AxisUtil()
           
 
Method Summary
static int decodeAction(String action, Vector actions)
          Returns first WS-Security header for a given actor.
static SOAPMessage toSOAPMessage(Document doc)
          Convert a DOM Document into a soap message.
static SOAPMessage updateSOAPMessage(Document doc, SOAPMessage message)
          Update soap message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AxisUtil

public AxisUtil()
Method Detail

toSOAPMessage

public static SOAPMessage toSOAPMessage(Document doc)
                                 throws Exception
Convert a DOM Document into a soap message.

Parameters:
doc -
Returns:
Throws:
Exception

updateSOAPMessage

public static SOAPMessage updateSOAPMessage(Document doc,
                                            SOAPMessage message)
                                     throws Exception
Update soap message.

Parameters:
doc -
message -
Returns:
Throws:
Exception

decodeAction

public static int decodeAction(String action,
                               Vector actions)
                        throws AxisFault
Returns first WS-Security header for a given actor. Only one WS-Security header is allowed for an actor.

Parameters:
env -
actor -
Returns:
Throws:
SOAPException - public static SOAPHeaderElement getSecurityHeader( SOAPEnvelope env, String actor) throws SOAPException { SOAPHeader header = env.getHeader(); if (header == null) { return null; } Iterator headerElements = header.examineHeaderElements(actor); while (headerElements.hasNext()) { SOAPHeaderElement he = (SOAPHeaderElement) headerElements.next(); Name nm = he.getElementName();

// find ws-security header if (nm.getLocalName().equalsIgnoreCase(WSConstants.WSSE_LN) && nm.getURI().equalsIgnoreCase(WSConstants.WSSE_NS)) { return he; } } return null; }

AxisFault


Copyright © 2001-2008 University of Southampton IT Innovation Centre. All Rights Reserved.