Spring Web Services Framework

org.springframework.ws.soap.saaj
Class Saaj13Implementation

java.lang.Object
  extended by org.springframework.ws.soap.saaj.Saaj13Implementation
All Implemented Interfaces:
SaajImplementation

public class Saaj13Implementation
extends Object
implements SaajImplementation

SAAJ 1.3 specific implementation of the SaajImplementation interface.

Since:
1.0.0
Author:
Arjen Poutsma

Method Summary
 AttachmentPart addAttachmentPart(SOAPMessage message, DataHandler dataHandler)
          Adds an attachment to the given message.
 void addAttribute(SOAPElement element, QName name, String value)
          Adds an attribute to the specified element.
 DetailEntry addDetailEntry(Detail detail, QName name)
          Adds a detail entry to the given detail.
 SOAPFault addFault(SOAPBody body, QName faultCode, String faultString, Locale locale)
          Adds a fault to the given body.
 Detail addFaultDetail(SOAPFault fault)
          Adds a fault detail for the given fault.
 SOAPHeaderElement addHeaderElement(SOAPHeader header, QName name)
          Adds a header element to the given header.
 SOAPHeaderElement addNotUnderstoodHeaderElement(SOAPHeader header, QName name)
          Adds a not understood header element to the given header.
 void addTextNode(DetailEntry detailEntry, String text)
           
 SOAPHeaderElement addUpgradeHeaderElement(SOAPHeader header, String[] supportedSoapUris)
          Adds a upgrade header element to the given header.
 void appendFaultSubcode(SOAPFault fault, QName subcode)
          Adds a fault sub code.
 Iterator examineAllHeaderElements(SOAPHeader header)
          Returns all header elements.
 Iterator examineMustUnderstandHeaderElements(SOAPHeader header, String actorOrRole)
          Returns all header elements for which the must understand attribute is true, given the actor or role.
 String getActorOrRole(SOAPHeaderElement headerElement)
          Returns the SOAP 1.1 actor or SOAP 1.2 role attribute for the given header element.
 Iterator getAllAttibutes(SOAPElement element)
          Returns all attributes as an iterator of QNames
 Iterator getAttachment(SOAPMessage message, MimeHeaders mimeHeaders)
          Returns an iteration over all attachments in the message with the given headers.
 Iterator getAttachments(SOAPMessage message)
          Returns an iteration over all attachments in the message.
 String getAttributeValue(SOAPElement element, QName name)
          Returns the attribute value *
 SOAPBody getBody(SOAPEnvelope envelope)
          Returns the body of the given envelope.
 Iterator getDetailEntries(Detail detail)
          Returns an iteration over all detail entries.
 SOAPEnvelope getEnvelope(SOAPMessage message)
          Returns the envelope of the given message.
 SOAPFault getFault(SOAPBody body)
          Returns the fault for the given body, if any.
 String getFaultActor(SOAPFault fault)
          Returns the actor for the given fault.
 QName getFaultCode(SOAPFault fault)
          Returns the fault code for the given fault.
 Detail getFaultDetail(SOAPFault fault)
          Returns the fault detail for the given fault.
 String getFaultNode(SOAPFault fault)
          Returns the fault node.
 String getFaultReasonText(SOAPFault fault, Locale locale)
          Returns the fault reason text.
 String getFaultRole(SOAPFault fault)
          Returns the fault role.
 String getFaultString(SOAPFault fault)
          Returns the fault string for the given fault.
 Locale getFaultStringLocale(SOAPFault fault)
          Returns the fault string language for the given fault.
 Iterator getFaultSubcodes(SOAPFault fault)
          Returns the fault sub code.
 SOAPElement getFirstBodyElement(SOAPBody body)
          Returns the first child element of the given body.
 SOAPHeader getHeader(SOAPEnvelope envelope)
          Returns the header of the given envelope.
static Saaj13Implementation getInstance()
           
 MimeHeaders getMimeHeaders(SOAPMessage message)
          Returns the MIME headers of the message.
 boolean getMustUnderstand(SOAPHeaderElement headerElement)
          Gets the must understand attribute for the given header element.
 QName getName(SOAPElement element)
          Returns the name of the given element.
 Result getResult(SOAPElement element)
          Returns the writable Result of the given element.
 Source getSource(SOAPElement element)
          Returns the readable Source of the given element.
 String getText(SOAPElement element)
          Returns the text of the given element
 boolean hasFault(SOAPBody body)
          Returns true if the body has a fault, false otherwise.
 boolean isSoap11(SOAPElement element)
           
 void removeAttribute(SOAPElement element, QName name)
          Removes an attribute from the specified element.
 void removeContents(SOAPElement element)
          Removes the contents (i.e. children) of the element.
 void setActorOrRole(SOAPHeaderElement headerElement, String actorOrRole)
          Sets the SOAP 1.1 actor or SOAP 1.2 role attribute for the given header element.
 void setFaultActor(SOAPFault fault, String actorOrRole)
          Sets the actor for the given fault.
 void setFaultNode(SOAPFault fault, String uri)
          Sets the fault node.
 void setFaultReasonText(SOAPFault fault, Locale locale, String text)
          Sets the fault reason text.
 void setFaultRole(SOAPFault fault, String role)
          Sets the fault role.
 void setMustUnderstand(SOAPHeaderElement headerElement, boolean mustUnderstand)
          Sets the must understand attribute for the given header element.
 void setText(SOAPElement element, String content)
          Returns the text of the given element
 void writeTo(SOAPMessage message, OutputStream outputStream)
          Writes the given message to the given stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static Saaj13Implementation getInstance()

getName

public QName getName(SOAPElement element)
Description copied from interface: SaajImplementation
Returns the name of the given element.

Specified by:
getName in interface SaajImplementation

getFaultCode

public QName getFaultCode(SOAPFault fault)
Description copied from interface: SaajImplementation
Returns the fault code for the given fault.

Specified by:
getFaultCode in interface SaajImplementation

isSoap11

public boolean isSoap11(SOAPElement element)

addDetailEntry

public DetailEntry addDetailEntry(Detail detail,
                                  QName name)
                           throws SOAPException
Description copied from interface: SaajImplementation
Adds a detail entry to the given detail.

Specified by:
addDetailEntry in interface SaajImplementation
Throws:
SOAPException

addHeaderElement

public SOAPHeaderElement addHeaderElement(SOAPHeader header,
                                          QName name)
                                   throws SOAPException
Description copied from interface: SaajImplementation
Adds a header element to the given header.

Specified by:
addHeaderElement in interface SaajImplementation
Throws:
SOAPException

getFaultRole

public String getFaultRole(SOAPFault fault)
Description copied from interface: SaajImplementation
Returns the fault role.

Specified by:
getFaultRole in interface SaajImplementation

setFaultRole

public void setFaultRole(SOAPFault fault,
                         String role)
                  throws SOAPException
Description copied from interface: SaajImplementation
Sets the fault role.

Specified by:
setFaultRole in interface SaajImplementation
Throws:
SOAPException

addNotUnderstoodHeaderElement

public SOAPHeaderElement addNotUnderstoodHeaderElement(SOAPHeader header,
                                                       QName name)
                                                throws SOAPException
Description copied from interface: SaajImplementation
Adds a not understood header element to the given header.

Specified by:
addNotUnderstoodHeaderElement in interface SaajImplementation
Throws:
SOAPException

addUpgradeHeaderElement

public SOAPHeaderElement addUpgradeHeaderElement(SOAPHeader header,
                                                 String[] supportedSoapUris)
                                          throws SOAPException
Description copied from interface: SaajImplementation
Adds a upgrade header element to the given header.

Specified by:
addUpgradeHeaderElement in interface SaajImplementation
Throws:
SOAPException

getFaultSubcodes

public Iterator getFaultSubcodes(SOAPFault fault)
Description copied from interface: SaajImplementation
Returns the fault sub code.

Specified by:
getFaultSubcodes in interface SaajImplementation

appendFaultSubcode

public void appendFaultSubcode(SOAPFault fault,
                               QName subcode)
                        throws SOAPException
Description copied from interface: SaajImplementation
Adds a fault sub code.

Specified by:
appendFaultSubcode in interface SaajImplementation
Throws:
SOAPException

getFaultNode

public String getFaultNode(SOAPFault fault)
Description copied from interface: SaajImplementation
Returns the fault node.

Specified by:
getFaultNode in interface SaajImplementation

setFaultNode

public void setFaultNode(SOAPFault fault,
                         String uri)
                  throws SOAPException
Description copied from interface: SaajImplementation
Sets the fault node.

Specified by:
setFaultNode in interface SaajImplementation
Throws:
SOAPException

getFaultReasonText

public String getFaultReasonText(SOAPFault fault,
                                 Locale locale)
                          throws SOAPException
Description copied from interface: SaajImplementation
Returns the fault reason text.

Specified by:
getFaultReasonText in interface SaajImplementation
Throws:
SOAPException

setFaultReasonText

public void setFaultReasonText(SOAPFault fault,
                               Locale locale,
                               String text)
                        throws SOAPException
Description copied from interface: SaajImplementation
Sets the fault reason text.

Specified by:
setFaultReasonText in interface SaajImplementation
Throws:
SOAPException

addFault

public SOAPFault addFault(SOAPBody body,
                          QName faultCode,
                          String faultString,
                          Locale locale)
                   throws SOAPException
Description copied from interface: SaajImplementation
Adds a fault to the given body.

Specified by:
addFault in interface SaajImplementation
Throws:
SOAPException

getSource

public Source getSource(SOAPElement element)
Description copied from interface: SaajImplementation
Returns the readable Source of the given element.

Specified by:
getSource in interface SaajImplementation

getResult

public Result getResult(SOAPElement element)
Description copied from interface: SaajImplementation
Returns the writable Result of the given element.

Specified by:
getResult in interface SaajImplementation

getText

public String getText(SOAPElement element)
Description copied from interface: SaajImplementation
Returns the text of the given element

Specified by:
getText in interface SaajImplementation

setText

public void setText(SOAPElement element,
                    String content)
Description copied from interface: SaajImplementation
Returns the text of the given element

Specified by:
setText in interface SaajImplementation

addAttribute

public void addAttribute(SOAPElement element,
                         QName name,
                         String value)
                  throws SOAPException
Description copied from interface: SaajImplementation
Adds an attribute to the specified element.

Specified by:
addAttribute in interface SaajImplementation
Throws:
SOAPException

removeAttribute

public void removeAttribute(SOAPElement element,
                            QName name)
                     throws SOAPException
Description copied from interface: SaajImplementation
Removes an attribute from the specified element.

Specified by:
removeAttribute in interface SaajImplementation
Throws:
SOAPException

getAttributeValue

public String getAttributeValue(SOAPElement element,
                                QName name)
                         throws SOAPException
Description copied from interface: SaajImplementation
Returns the attribute value *

Specified by:
getAttributeValue in interface SaajImplementation
Throws:
SOAPException

getAllAttibutes

public Iterator getAllAttibutes(SOAPElement element)
Description copied from interface: SaajImplementation
Returns all attributes as an iterator of QNames. *

Specified by:
getAllAttibutes in interface SaajImplementation

getEnvelope

public SOAPEnvelope getEnvelope(SOAPMessage message)
                         throws SOAPException
Description copied from interface: SaajImplementation
Returns the envelope of the given message.

Specified by:
getEnvelope in interface SaajImplementation
Throws:
SOAPException

getHeader

public SOAPHeader getHeader(SOAPEnvelope envelope)
                     throws SOAPException
Description copied from interface: SaajImplementation
Returns the header of the given envelope.

Specified by:
getHeader in interface SaajImplementation
Throws:
SOAPException

getBody

public SOAPBody getBody(SOAPEnvelope envelope)
                 throws SOAPException
Description copied from interface: SaajImplementation
Returns the body of the given envelope.

Specified by:
getBody in interface SaajImplementation
Throws:
SOAPException

examineAllHeaderElements

public Iterator examineAllHeaderElements(SOAPHeader header)
Description copied from interface: SaajImplementation
Returns all header elements.

Specified by:
examineAllHeaderElements in interface SaajImplementation

examineMustUnderstandHeaderElements

public Iterator examineMustUnderstandHeaderElements(SOAPHeader header,
                                                    String actorOrRole)
Description copied from interface: SaajImplementation
Returns all header elements for which the must understand attribute is true, given the actor or role.

Specified by:
examineMustUnderstandHeaderElements in interface SaajImplementation

getActorOrRole

public String getActorOrRole(SOAPHeaderElement headerElement)
Description copied from interface: SaajImplementation
Returns the SOAP 1.1 actor or SOAP 1.2 role attribute for the given header element.

Specified by:
getActorOrRole in interface SaajImplementation

setActorOrRole

public void setActorOrRole(SOAPHeaderElement headerElement,
                           String actorOrRole)
Description copied from interface: SaajImplementation
Sets the SOAP 1.1 actor or SOAP 1.2 role attribute for the given header element.

Specified by:
setActorOrRole in interface SaajImplementation

getMustUnderstand

public boolean getMustUnderstand(SOAPHeaderElement headerElement)
Description copied from interface: SaajImplementation
Gets the must understand attribute for the given header element.

Specified by:
getMustUnderstand in interface SaajImplementation

setMustUnderstand

public void setMustUnderstand(SOAPHeaderElement headerElement,
                              boolean mustUnderstand)
Description copied from interface: SaajImplementation
Sets the must understand attribute for the given header element.

Specified by:
setMustUnderstand in interface SaajImplementation

hasFault

public boolean hasFault(SOAPBody body)
Description copied from interface: SaajImplementation
Returns true if the body has a fault, false otherwise.

Specified by:
hasFault in interface SaajImplementation

getFault

public SOAPFault getFault(SOAPBody body)
Description copied from interface: SaajImplementation
Returns the fault for the given body, if any.

Specified by:
getFault in interface SaajImplementation

getFaultActor

public String getFaultActor(SOAPFault fault)
Description copied from interface: SaajImplementation
Returns the actor for the given fault.

Specified by:
getFaultActor in interface SaajImplementation

setFaultActor

public void setFaultActor(SOAPFault fault,
                          String actorOrRole)
                   throws SOAPException
Description copied from interface: SaajImplementation
Sets the actor for the given fault.

Specified by:
setFaultActor in interface SaajImplementation
Throws:
SOAPException

getFaultString

public String getFaultString(SOAPFault fault)
Description copied from interface: SaajImplementation
Returns the fault string for the given fault.

Specified by:
getFaultString in interface SaajImplementation

getFaultStringLocale

public Locale getFaultStringLocale(SOAPFault fault)
Description copied from interface: SaajImplementation
Returns the fault string language for the given fault.

Specified by:
getFaultStringLocale in interface SaajImplementation

getFaultDetail

public Detail getFaultDetail(SOAPFault fault)
Description copied from interface: SaajImplementation
Returns the fault detail for the given fault.

Specified by:
getFaultDetail in interface SaajImplementation

addFaultDetail

public Detail addFaultDetail(SOAPFault fault)
                      throws SOAPException
Description copied from interface: SaajImplementation
Adds a fault detail for the given fault.

Specified by:
addFaultDetail in interface SaajImplementation
Throws:
SOAPException

addTextNode

public void addTextNode(DetailEntry detailEntry,
                        String text)
                 throws SOAPException
Specified by:
addTextNode in interface SaajImplementation
Throws:
SOAPException

getDetailEntries

public Iterator getDetailEntries(Detail detail)
Description copied from interface: SaajImplementation
Returns an iteration over all detail entries.

Specified by:
getDetailEntries in interface SaajImplementation

getFirstBodyElement

public SOAPElement getFirstBodyElement(SOAPBody body)
Description copied from interface: SaajImplementation
Returns the first child element of the given body.

Specified by:
getFirstBodyElement in interface SaajImplementation

removeContents

public void removeContents(SOAPElement element)
Description copied from interface: SaajImplementation
Removes the contents (i.e. children) of the element.

Specified by:
removeContents in interface SaajImplementation

writeTo

public void writeTo(SOAPMessage message,
                    OutputStream outputStream)
             throws SOAPException,
                    IOException
Description copied from interface: SaajImplementation
Writes the given message to the given stream.

Specified by:
writeTo in interface SaajImplementation
Throws:
SOAPException
IOException

getMimeHeaders

public MimeHeaders getMimeHeaders(SOAPMessage message)
Description copied from interface: SaajImplementation
Returns the MIME headers of the message.

Specified by:
getMimeHeaders in interface SaajImplementation

getAttachments

public Iterator getAttachments(SOAPMessage message)
Description copied from interface: SaajImplementation
Returns an iteration over all attachments in the message.

Specified by:
getAttachments in interface SaajImplementation

getAttachment

public Iterator getAttachment(SOAPMessage message,
                              MimeHeaders mimeHeaders)
Description copied from interface: SaajImplementation
Returns an iteration over all attachments in the message with the given headers.

Specified by:
getAttachment in interface SaajImplementation

addAttachmentPart

public AttachmentPart addAttachmentPart(SOAPMessage message,
                                        DataHandler dataHandler)
Description copied from interface: SaajImplementation
Adds an attachment to the given message.

Specified by:
addAttachmentPart in interface SaajImplementation

Spring Web Services Framework

Copyright � 2005-2008 The Spring Web Services Framework. All Rights Reserved.