org.apache.ws.axis.security.util
Class AxisUtil

java.lang.Object
  extended byorg.apache.ws.axis.security.util.AxisUtil

public class AxisUtil
extends java.lang.Object

Axis Utility methods.

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

Constructor Summary
AxisUtil()
           
 
Method Summary
static int decodeAction(java.lang.String action, java.util.Vector actions)
          Returns first WS-Security header for a given actor.
static javax.xml.soap.SOAPMessage toSOAPMessage(org.w3c.dom.Document doc)
          Convert a DOM Document into a soap message.
static javax.xml.soap.SOAPMessage updateSOAPMessage(org.w3c.dom.Document doc, javax.xml.soap.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 javax.xml.soap.SOAPMessage toSOAPMessage(org.w3c.dom.Document doc)
                                                throws java.lang.Exception
Convert a DOM Document into a soap message.

Parameters:
doc -
Returns:
Throws:
java.lang.Exception

updateSOAPMessage

public static javax.xml.soap.SOAPMessage updateSOAPMessage(org.w3c.dom.Document doc,
                                                           javax.xml.soap.SOAPMessage message)
                                                    throws java.lang.Exception
Update soap message.

Parameters:
doc -
message -
Returns:
Throws:
java.lang.Exception

decodeAction

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

Returns:
Throws:
javax.xml.soap.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; }

org.apache.axis.AxisFault