Package org.apache.axiom.soap
Interface SOAPFactory
-
-
Method Summary
-
Methods inherited from interface org.apache.axiom.om.OMFactory
createOMAttribute, createOMComment, createOMDocType, createOMDocument, createOMElement, createOMElement, createOMElement, createOMElement, createOMElement, createOMElement, createOMElement, createOMElement, createOMEntityReference, createOMNamespace, createOMProcessingInstruction, createOMText, createOMText, createOMText, createOMText, createOMText, createOMText, createOMText, createOMText, createOMText, createOMText, createOMText, createOMText, createOMText, getMetaFactory, importInformationItem
-
-
-
-
Method Detail
-
getSoapVersionURI
String getSoapVersionURI()
-
getSOAPVersion
SOAPVersion getSOAPVersion()
-
createSOAPMessage
SOAPMessage createSOAPMessage()
-
createSOAPEnvelope
SOAPEnvelope createSOAPEnvelope() throws SOAPProcessingException
Create a SOAP envelope. The returned element will have the namespace URI specified by the SOAP version that this factory represents. It will have the prefix given bySOAPConstants.SOAP_DEFAULT_NAMESPACE_PREFIX
. It will also have a corresponding namespace declaration.- Returns:
- the SOAP envelope
- Throws:
SOAPProcessingException
-
createSOAPEnvelope
SOAPEnvelope createSOAPEnvelope(OMNamespace ns)
Create a SOAP envelope with the given namespace. This method can be used to create a SOAP envelope with a custom namespace prefix.- Parameters:
ns
- the namespace information for the SOAP envelope- Returns:
- the SOAP envelope
-
createSOAPHeader
SOAPHeader createSOAPHeader(SOAPEnvelope envelope) throws SOAPProcessingException
Create aSOAPHeader
as a child of the givenSOAPEnvelope
.Note that for most use cases, it is preferable to use
SOAPEnvelope.getOrCreateHeader()
instead of this method.- Parameters:
envelope
- the parent of theSOAPHeader
- Returns:
- the newly created
SOAPHeader
- Throws:
SOAPProcessingException
-
createSOAPHeader
SOAPHeader createSOAPHeader() throws SOAPProcessingException
- Throws:
SOAPProcessingException
-
createSOAPHeaderBlock
SOAPHeaderBlock createSOAPHeaderBlock(String localName, OMNamespace ns, SOAPHeader parent) throws SOAPProcessingException
- Parameters:
localName
-ns
-- Returns:
- Returns SOAPHeaderBlock.
- Throws:
SOAPProcessingException
-
createSOAPHeaderBlock
SOAPHeaderBlock createSOAPHeaderBlock(String localName, OMNamespace ns) throws SOAPProcessingException
- Throws:
SOAPProcessingException
-
createSOAPHeaderBlock
SOAPHeaderBlock createSOAPHeaderBlock(OMDataSource source)
Create aSOAPHeaderBlock
from anOMDataSource
. The semantics of the method parameters are the same as forOMFactory.createOMElement(OMDataSource)
.- Parameters:
source
- the data source; must not benull
- Returns:
- the newly created header block
-
createSOAPHeaderBlock
SOAPHeaderBlock createSOAPHeaderBlock(String localName, OMNamespace ns, OMDataSource source) throws SOAPProcessingException
Create aSOAPHeaderBlock
from anOMDataSource
with a known local name and namespace URI. The semantics of the method parameters are the same as forOMFactory.createOMElement(OMDataSource, String, OMNamespace)
.- Parameters:
localName
- the local part of the name of the element produced by the data source; must not benull
ns
- the namespace of the element produced by the data source, ornull
if the element has no namespacesource
- the data source; must not benull
- Returns:
- the newly created header block
- Throws:
SOAPProcessingException
-
createSOAPHeaderBlock
SOAPHeaderBlock createSOAPHeaderBlock(OMElement element)
Create a newSOAPHeaderBlock
with the same content as the given element.- Parameters:
element
- the element to import as a header block- Returns:
- the header block
-
createSOAPFault
SOAPFault createSOAPFault(SOAPBody parent, Exception e) throws SOAPProcessingException
- Parameters:
parent
-e
-- Returns:
- Returns SOAPFault.
- Throws:
SOAPProcessingException
-
createSOAPFault
SOAPFault createSOAPFault(SOAPBody parent) throws SOAPProcessingException
- Throws:
SOAPProcessingException
-
createSOAPFault
SOAPFault createSOAPFault() throws SOAPProcessingException
- Throws:
SOAPProcessingException
-
createSOAPBody
SOAPBody createSOAPBody(SOAPEnvelope envelope) throws SOAPProcessingException
- Parameters:
envelope
-- Returns:
- Returns SOAPBody.
- Throws:
SOAPProcessingException
-
createSOAPBody
SOAPBody createSOAPBody() throws SOAPProcessingException
- Throws:
SOAPProcessingException
-
createSOAPFaultCode
SOAPFaultCode createSOAPFaultCode(SOAPFault parent) throws SOAPProcessingException
Code eii under SOAPFault (parent)- Parameters:
parent
-- Returns:
- Returns SOAPFaultCode.
- Throws:
SOAPProcessingException
-
createSOAPFaultCode
SOAPFaultCode createSOAPFaultCode() throws SOAPProcessingException
- Throws:
SOAPProcessingException
-
createSOAPFaultValue
SOAPFaultValue createSOAPFaultValue(SOAPFaultCode parent) throws SOAPProcessingException
Value eii under Code (parent)- Parameters:
parent
-- Returns:
- Returns SOAPFaultValue.
- Throws:
SOAPProcessingException
-
createSOAPFaultValue
SOAPFaultValue createSOAPFaultValue() throws SOAPProcessingException
- Throws:
SOAPProcessingException
-
createSOAPFaultValue
SOAPFaultValue createSOAPFaultValue(SOAPFaultSubCode parent) throws SOAPProcessingException
SubCode eii under Value (parent)- Parameters:
parent
-- Returns:
- Returns SOAPFaultValue.
- Throws:
SOAPProcessingException
-
createSOAPFaultSubCode
SOAPFaultSubCode createSOAPFaultSubCode(SOAPFaultCode parent) throws SOAPProcessingException
- Throws:
SOAPProcessingException
-
createSOAPFaultSubCode
SOAPFaultSubCode createSOAPFaultSubCode() throws SOAPProcessingException
- Throws:
SOAPProcessingException
-
createSOAPFaultSubCode
SOAPFaultSubCode createSOAPFaultSubCode(SOAPFaultSubCode parent) throws SOAPProcessingException
SubCode eii under SubCode (parent)- Parameters:
parent
-- Returns:
- Returns SOAPFaultSubCode.
- Throws:
SOAPProcessingException
-
createSOAPFaultReason
SOAPFaultReason createSOAPFaultReason(SOAPFault parent) throws SOAPProcessingException
Reason eii under SOAPFault (parent)- Parameters:
parent
-- Returns:
- Returns SOAPFaultReason.
- Throws:
SOAPProcessingException
-
createSOAPFaultReason
SOAPFaultReason createSOAPFaultReason() throws SOAPProcessingException
- Throws:
SOAPProcessingException
-
createSOAPFaultText
SOAPFaultText createSOAPFaultText(SOAPFaultReason parent) throws SOAPProcessingException
SubCode eii under SubCode (parent)- Parameters:
parent
-- Returns:
- Returns SOAPFaultText.
- Throws:
SOAPProcessingException
-
createSOAPFaultText
SOAPFaultText createSOAPFaultText() throws SOAPProcessingException
- Throws:
SOAPProcessingException
-
createSOAPFaultNode
SOAPFaultNode createSOAPFaultNode(SOAPFault parent) throws SOAPProcessingException
Node eii under SOAPFault (parent)- Parameters:
parent
-- Returns:
- Returns SOAPFaultNode.
- Throws:
SOAPProcessingException
-
createSOAPFaultNode
SOAPFaultNode createSOAPFaultNode() throws SOAPProcessingException
- Throws:
SOAPProcessingException
-
createSOAPFaultRole
SOAPFaultRole createSOAPFaultRole(SOAPFault parent) throws SOAPProcessingException
Role eii under SOAPFault (parent)- Parameters:
parent
-- Returns:
- Returns SOAPFaultRole.
- Throws:
SOAPProcessingException
-
createSOAPFaultRole
SOAPFaultRole createSOAPFaultRole() throws SOAPProcessingException
- Throws:
SOAPProcessingException
-
createSOAPFaultDetail
SOAPFaultDetail createSOAPFaultDetail(SOAPFault parent) throws SOAPProcessingException
Detail eii under SOAPFault (parent)- Parameters:
parent
-- Returns:
- Returns SOAPFaultDetail.
- Throws:
SOAPProcessingException
-
createSOAPFaultDetail
SOAPFaultDetail createSOAPFaultDetail() throws SOAPProcessingException
- Throws:
SOAPProcessingException
-
getDefaultEnvelope
SOAPEnvelope getDefaultEnvelope() throws SOAPProcessingException
Create a default SOAP envelope with an empty header and an empty body. Note that the method will not create an associatedSOAPMessage
orOMDocument
instance and the parent of the returnedSOAPEnvelope
isnull
.Note: This method is typically used in conjunction with
SOAPEnvelope.getHeader()
. In order to avoid generating unnecessary empty SOAP headers, you should consider usingcreateDefaultSOAPMessage()
together withSOAPEnvelope.getOrCreateHeader()
instead. This method may be deprecated and/or removed in future Axiom versions.- Returns:
- the default SOAP envelope
- Throws:
SOAPProcessingException
-
createDefaultSOAPMessage
SOAPMessage createDefaultSOAPMessage()
Create a default SOAP message with an envelope with an empty body.Since no SOAP header is added to the envelope, this method should be used in conjunction with
SOAPEnvelope.getOrCreateHeader()
(if SOAP header blocks need to be added).- Returns:
- the default SOAP envelope
-
getDefaultFaultEnvelope
SOAPEnvelope getDefaultFaultEnvelope() throws SOAPProcessingException
- Throws:
SOAPProcessingException
-
getNamespace
OMNamespace getNamespace()
Get the envelope namespace for the SOAP version used by this factory. The returnedOMNamespace
instance has the following properties:- The prefix is set to
SOAPConstants.SOAP_DEFAULT_NAMESPACE_PREFIX
(which is the same as the prefix used by methods such ascreateSOAPEnvelope()
). - The namespace URI is the same as returned by
getSoapVersionURI()
.
- Returns:
- the envelope namespace for the SOAP version used by this factory
- The prefix is set to
-
-