org.apache.axis.message.addressing
Class AddressingHeaders

java.lang.Object
  extended by org.apache.axis.message.addressing.AddressingHeaders

public class AddressingHeaders
extends java.lang.Object

Represents a set of message addressing headers as defined by the WS-Addressing specification.

Version:
$Revision: 14 $
Author:
Davanum Srinivas, Rodrigo Ruiz

Field Summary
 boolean isW3CVersion
          Are we using the W3C spec rules?
 
Constructor Summary
AddressingHeaders()
          Constructor AddressingHeaders.
AddressingHeaders(EndpointReference epr)
          Copy constructor.
AddressingHeaders(javax.xml.soap.SOAPEnvelope env)
          Constructor AddressingHeaders.
AddressingHeaders(javax.xml.soap.SOAPEnvelope env, boolean process, boolean remove)
          Constructor AddressingHeaders.
AddressingHeaders(javax.xml.soap.SOAPEnvelope env, java.lang.String actorURI, boolean process, boolean remove)
          Constructor AddressingHeaders.
AddressingHeaders(javax.xml.soap.SOAPEnvelope env, java.lang.String actorURI, boolean process, boolean remove, boolean setMustUnderstand, boolean allowNonSpecificActions, java.util.List<javax.xml.namespace.QName> refPropsQNames)
          Constructor AddressingHeaders.
AddressingHeaders(javax.xml.soap.SOAPEnvelope env, java.lang.String actorURI, boolean process, boolean remove, boolean setMustUnderstand, java.util.List<javax.xml.namespace.QName> refPropsQNames)
          Constructor AddressingHeaders.
 
Method Summary
 void addReferenceParameter(org.w3c.dom.Element param)
          Adds a reference parameter.
 void addReferenceParameter(org.apache.axis.message.MessageElement param)
          Adds a reference parameter.
 void addReferenceProperty(org.w3c.dom.Element prop)
          Adds an XML element to the referencePropeties collection.
 void addReferenceProperty(org.apache.axis.message.MessageElement prop)
          Adds a message element to the referencePropeties collection.
 void addRelatesTo(java.lang.String uri, javax.xml.namespace.QName type)
          Method addRelatesTo.
 void addRelatesTo(java.lang.String uri, java.lang.String type)
          Method addRelatesTo.
 Action getAction()
          Method getAction.
 org.apache.axis.AxisFault getAddrHeaderFault()
          Gets the fault contained in the headers.
 EndpointReference getFaultTo()
          Method getFaultTo.
 EndpointReference getFrom()
          Method getFrom.
 MessageID getMessageID()
          Method getMessageID.
 ReferenceParametersType getReferenceParameters()
          Get the reference parameters.
 ReferencePropertiesType getReferenceProperties()
          Method getReferenceProperties.
 java.util.List<RelatesTo> getRelatesTo()
          Method getRelatesTo.
 EndpointReference getReplyTo()
          Method getReplyTo.
 To getTo()
          Method getTo.
 boolean isSetMustUnderstand()
          Gets the value of the "setMustUnderstand" flag.
 void setAction(Action action)
          Method setAction.
 void setAction(java.lang.String uri)
          Sets the action URI.
 void setAction(org.apache.axis.types.URI uri)
          Sets the action URI.
 void setFaultTo(EndpointReference epr)
          Method setFaultTo.
 void setFrom(EndpointReference ref)
          Method setFrom.
 void setMessageID(MessageID messageID)
          Method setMessageID.
 void setReferenceParameters(ReferenceParametersType params)
          Sets the reference parameters.
 void setReferenceProperties(ReferencePropertiesType props)
          Method setReferenceProperties.
 void setRelatesTo(java.util.List<RelatesTo> v)
          Set the collection of RelatesToProperties.
 void setReplyTo(EndpointReference ref)
          Method setReplyTo.
 void setSetMustUnderstand(boolean setMustUnderstand)
          Sets the "SetMustUnderstand" flag.
 void setTo(AttributedURI uri)
          Method setTo.
 void setTo(To to)
          Method setTo.
 void toEnvelope(javax.xml.soap.SOAPEnvelope env)
          Adds these addressing headers to the specified SOAP envelope.
 void toEnvelope(javax.xml.soap.SOAPEnvelope env, java.lang.String actorURI)
          Adds these addressing headers to the specified SOAP envelope.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

isW3CVersion

public boolean isW3CVersion
Are we using the W3C spec rules? (no ref props, etc...)

Constructor Detail

AddressingHeaders

public AddressingHeaders()
Constructor AddressingHeaders.


AddressingHeaders

public AddressingHeaders(EndpointReference epr)
Copy constructor.

Parameters:
epr - Reference to copy from

AddressingHeaders

public AddressingHeaders(javax.xml.soap.SOAPEnvelope env)
                  throws java.lang.Exception
Constructor AddressingHeaders.

Parameters:
env - Envelope to get the headers from
Throws:
java.lang.Exception - If an error occurs

AddressingHeaders

public AddressingHeaders(javax.xml.soap.SOAPEnvelope env,
                         boolean process,
                         boolean remove)
                  throws java.lang.Exception
Constructor AddressingHeaders.

Parameters:
env - Parent Envelope
process - Should the headers be marked as processed
remove - Should the headers be removed after processing
Throws:
java.lang.Exception - If an error occurs

AddressingHeaders

public AddressingHeaders(javax.xml.soap.SOAPEnvelope env,
                         java.lang.String actorURI,
                         boolean process,
                         boolean remove)
                  throws java.lang.Exception
Constructor AddressingHeaders.

Parameters:
env - Parent Envelope
actorURI - Actor URI
process - Should the headers be marked as processed
remove - Should the headers be removed after processing
Throws:
java.lang.Exception - If an error occurs

AddressingHeaders

public AddressingHeaders(javax.xml.soap.SOAPEnvelope env,
                         java.lang.String actorURI,
                         boolean process,
                         boolean remove,
                         boolean setMustUnderstand,
                         boolean allowNonSpecificActions,
                         java.util.List<javax.xml.namespace.QName> refPropsQNames)
                  throws java.lang.Exception
Constructor AddressingHeaders.

Parameters:
env - The SOAP Envelope
actorURI - The SOAP Actor URI
process - Should the headers be marked as processed
remove - Should the headers be removed after processing
setMustUnderstand - whether or not to set mustUnderstand="true" on the headers
allowNonSpecificActions - whether or not to allow a non-specific Action URI
refPropsQNames - A list of QNames for reference properties. If null all non-WSA headers will be added as reference properties. If an empty list is passed than no headers will be added reference properties (default). If non empty list of qnames is passed then only headers matching the qname in the list will be added as reference properties.
Throws:
java.lang.Exception

AddressingHeaders

public AddressingHeaders(javax.xml.soap.SOAPEnvelope env,
                         java.lang.String actorURI,
                         boolean process,
                         boolean remove,
                         boolean setMustUnderstand,
                         java.util.List<javax.xml.namespace.QName> refPropsQNames)
                  throws java.lang.Exception
Constructor AddressingHeaders.

Parameters:
env - The SOAP Envelope
actorURI - The SOAP Actor URI
process - Should the headers be marked as processed
remove - Should the headers be removed after processing
setMustUnderstand - whether or not to set mustUnderstand="true" on the headers
refPropsQNames - A list of QNames for reference properties. If null all non-WSA headers will be added as reference properties. If an empty list is passed than no headers will be added reference properties (default). If non empty list of qnames is passed then only headers matching the qname in the list will be added as reference properties.
Throws:
java.lang.Exception
Method Detail

addReferenceParameter

public void addReferenceParameter(org.w3c.dom.Element param)
Adds a reference parameter.

Parameters:
param - Parameter to add

addReferenceParameter

public void addReferenceParameter(org.apache.axis.message.MessageElement param)
Adds a reference parameter.

Parameters:
param - Parameter to add

addReferenceProperty

public void addReferenceProperty(org.w3c.dom.Element prop)
Adds an XML element to the referencePropeties collection.

Parameters:
prop - Element to add

addReferenceProperty

public void addReferenceProperty(org.apache.axis.message.MessageElement prop)
Adds a message element to the referencePropeties collection.

Parameters:
prop - Element to add

addRelatesTo

public void addRelatesTo(java.lang.String uri,
                         javax.xml.namespace.QName type)
                  throws org.apache.axis.types.URI.MalformedURIException
Method addRelatesTo.

Parameters:
uri - Address URI
type - an IRI indicating the relationship type
Throws:
URI.MalformedURIException - If the URI is not valid

addRelatesTo

public void addRelatesTo(java.lang.String uri,
                         java.lang.String type)
                  throws org.apache.axis.types.URI.MalformedURIException
Method addRelatesTo.

Parameters:
uri - Address URI
type - an IRI indicating the relationship type
Throws:
URI.MalformedURIException - If the URI is not valid

getAction

public Action getAction()
Method getAction.

Returns:
The action field

getAddrHeaderFault

public org.apache.axis.AxisFault getAddrHeaderFault()
Gets the fault contained in the headers.

Returns:
A fault

getFaultTo

public EndpointReference getFaultTo()
Method getFaultTo.

Returns:
The FaultTo end-point reference

getFrom

public EndpointReference getFrom()
Method getFrom.

Returns:
The from field

getMessageID

public MessageID getMessageID()
Method getMessageID.

Returns:
The message ID

getReferenceParameters

public ReferenceParametersType getReferenceParameters()
Get the reference parameters.

Returns:
a List of reference parameters (MessageElements)

getReferenceProperties

public ReferencePropertiesType getReferenceProperties()
Method getReferenceProperties.

Returns:
referenceProperties

getRelatesTo

public java.util.List<RelatesTo> getRelatesTo()
Method getRelatesTo.

Returns:
The list of RelatesTo fields

getReplyTo

public EndpointReference getReplyTo()
Method getReplyTo.

Returns:
The ReplyTo end-point reference

getTo

public To getTo()
Method getTo.

Returns:
The To field

isSetMustUnderstand

public boolean isSetMustUnderstand()
Gets the value of the "setMustUnderstand" flag.

Returns:
The flag value

setAction

public void setAction(Action action)
Method setAction.

Parameters:
action - Action field

setAction

public void setAction(java.lang.String uri)
               throws java.lang.Exception
Sets the action URI.

Parameters:
uri - Action URI
Throws:
java.lang.Exception - If an error occurs

setAction

public void setAction(org.apache.axis.types.URI uri)
Sets the action URI.

Parameters:
uri - Action URI

setFaultTo

public void setFaultTo(EndpointReference epr)
Method setFaultTo.

Parameters:
epr - The FaultTo end-point reference

setFrom

public void setFrom(EndpointReference ref)
Method setFrom.

Parameters:
ref - From end-point reference

setMessageID

public void setMessageID(MessageID messageID)
Method setMessageID.

Parameters:
messageID - The message ID to set

setReferenceParameters

public void setReferenceParameters(ReferenceParametersType params)
Sets the reference parameters.

Parameters:
params - Reference parameters bean

setReferenceProperties

public void setReferenceProperties(ReferencePropertiesType props)
Method setReferenceProperties.

Parameters:
props - The properties to set

setRelatesTo

public void setRelatesTo(java.util.List<RelatesTo> v)
Set the collection of RelatesToProperties. Not additive, this replaces the current collection.

Parameters:
v - List of RelatesToProperties

setReplyTo

public void setReplyTo(EndpointReference ref)
Method setReplyTo.

Parameters:
ref - The ReplyTo end-point reference

setSetMustUnderstand

public void setSetMustUnderstand(boolean setMustUnderstand)
Sets the "SetMustUnderstand" flag.

Parameters:
setMustUnderstand - Flag value

setTo

public void setTo(AttributedURI uri)
Method setTo.

Parameters:
uri - To URI

setTo

public void setTo(To to)
Method setTo.

Parameters:
to - The To field

toEnvelope

public void toEnvelope(javax.xml.soap.SOAPEnvelope env)
                throws java.lang.Exception
Adds these addressing headers to the specified SOAP envelope.

Parameters:
env - Envelope to add to
Throws:
java.lang.Exception - If an error occurs

toEnvelope

public void toEnvelope(javax.xml.soap.SOAPEnvelope env,
                       java.lang.String actorURI)
                throws javax.xml.soap.SOAPException
Adds these addressing headers to the specified SOAP envelope.

Parameters:
env - Envelope to add to
actorURI - Actor URI
Throws:
javax.xml.soap.SOAPException


Copyright © 2008-2009 Rodrigo Ruiz. All Rights Reserved.