Class SAAJConverterImpl
- java.lang.Object
-
- org.apache.axis2.jaxws.message.util.impl.SAAJConverterImpl
-
- All Implemented Interfaces:
SAAJConverter
public class SAAJConverterImpl extends Object implements SAAJConverter
SAAJConverterImpl Provides an conversion methods between OM<->SAAJ
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
SAAJConverterImpl.NameCreator
A Name can be created from either a SOAPEnvelope or SOAPFactory.
-
Field Summary
-
Fields inherited from interface org.apache.axis2.jaxws.message.util.SAAJConverter
OM_ATTRIBUTE_KEY
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addAttributes(SAAJConverterImpl.NameCreator nc, SOAPElement element, XMLStreamReader reader)
add attributesprotected SOAPElement
buildSOAPTree(SAAJConverterImpl.NameCreator nc, SOAPElement root, SOAPElement parent, XMLStreamReader reader, boolean quitAtBody)
Build SOAPTree Either the root or the parent is null.protected SOAPElement
createElement(SOAPElement parent, QName qName)
Create child SOAPElementprotected SOAPElement
createElementFromTag(SAAJConverterImpl.NameCreator nc, SOAPElement parent, XMLStreamReader reader)
Create SOAPElement from the current tag dataMessageFactory
createMessageFactory(String namespace)
Creates a MessageFactory that can support the SOAP version identified by the specified envelope namespace.OMElement
toOM(SOAPElement soapElement)
Convert SOAPElement into an OMElementSOAPEnvelope
toOM(SOAPEnvelope saajEnvelope)
Convert SAAJ SOAPEnvelope to OM SOAPEnvelopeSOAPEnvelope
toOM(SOAPEnvelope saajEnvelope, Attachments attachments)
Convert SAAJ SOAPEnvelope to OM SOAPEnvelopeSOAPElement
toSAAJ(OMElement omElement, SOAPElement parent)
Convert omElement into a SOAPElement and add it to the parent SOAPElement.SOAPElement
toSAAJ(OMElement omElement, SOAPElement parent, SOAPFactory sf)
Convert omElement into a SOAPElement and add it to the parent SOAPElement.SOAPEnvelope
toSAAJ(SOAPEnvelope omEnvelope)
Convert OM SOAPEnvleope to SAAJ SOAPEnvelopeprotected void
updateTagData(SAAJConverterImpl.NameCreator nc, SOAPElement element, XMLStreamReader reader, boolean newElement)
update the tag data of the SOAPElement
-
-
-
Method Detail
-
toSAAJ
public SOAPEnvelope toSAAJ(SOAPEnvelope omEnvelope) throws WebServiceException
Description copied from interface:SAAJConverter
Convert OM SOAPEnvleope to SAAJ SOAPEnvelope- Specified by:
toSAAJ
in interfaceSAAJConverter
- Returns:
- SOAPEnvelope
- Throws:
WebServiceException
-
toOM
public SOAPEnvelope toOM(SOAPEnvelope saajEnvelope)
Description copied from interface:SAAJConverter
Convert SAAJ SOAPEnvelope to OM SOAPEnvelope- Specified by:
toOM
in interfaceSAAJConverter
- Returns:
- OM Envelope
-
toOM
public SOAPEnvelope toOM(SOAPEnvelope saajEnvelope, Attachments attachments) throws WebServiceException
Description copied from interface:SAAJConverter
Convert SAAJ SOAPEnvelope to OM SOAPEnvelope- Specified by:
toOM
in interfaceSAAJConverter
- Returns:
- OM Envelope
- Throws:
WebServiceException
-
toOM
public OMElement toOM(SOAPElement soapElement) throws WebServiceException
Description copied from interface:SAAJConverter
Convert SOAPElement into an OMElement- Specified by:
toOM
in interfaceSAAJConverter
- Returns:
- OMElement
- Throws:
WebServiceException
-
toSAAJ
public SOAPElement toSAAJ(OMElement omElement, SOAPElement parent) throws WebServiceException
Description copied from interface:SAAJConverter
Convert omElement into a SOAPElement and add it to the parent SOAPElement. This method requires that the parent element have an ancestor that is a SOAPEnvelope. If this is not the case use the toSAAJ(OMElement, SOAPElement, SOAPFactory) method- Specified by:
toSAAJ
in interfaceSAAJConverter
parent
- SOAPElement- Returns:
- SOAPElement that was added to the parent.
- Throws:
WebServiceException
- See Also:
SAAJConverter.toSAAJ(org.apache.axiom.om.OMElement,javax.xml.soap.SOAPElement,javax.xml.soap.SOAPFactory)
-
toSAAJ
public SOAPElement toSAAJ(OMElement omElement, SOAPElement parent, SOAPFactory sf) throws WebServiceException
Description copied from interface:SAAJConverter
Convert omElement into a SOAPElement and add it to the parent SOAPElement.- Specified by:
toSAAJ
in interfaceSAAJConverter
parent
- SOAPElementsf
- SOAPFactory that is used to create Name objects- Returns:
- SOAPElement that was added to the parent.
- Throws:
WebServiceException
- * @see toSAAJ(OMElement, SOAPElement)
-
buildSOAPTree
protected SOAPElement buildSOAPTree(SAAJConverterImpl.NameCreator nc, SOAPElement root, SOAPElement parent, XMLStreamReader reader, boolean quitAtBody) throws WebServiceException
Build SOAPTree Either the root or the parent is null. If the root is null, a new element is created under the parent using information from the reader If the parent is null, the existing root is updated with the information from the reader- Parameters:
nc
- NameCreatorroot
- SOAPElement (the element that represents the data in the reader)parent
- (the parent of the element represented by the reader)reader
- XMLStreamReader. the first START_ELEMENT matches the rootquitAtBody
- - true if quit reading after the body START_ELEMENT- Throws:
WebServiceException
-
createElementFromTag
protected SOAPElement createElementFromTag(SAAJConverterImpl.NameCreator nc, SOAPElement parent, XMLStreamReader reader) throws SOAPException
Create SOAPElement from the current tag data- Parameters:
nc
- NameCreatorparent
- SOAPElement for the new SOAPElementreader
- XMLStreamReader whose cursor is at the START_ELEMENT- Returns:
- Throws:
SOAPException
-
createElement
protected SOAPElement createElement(SOAPElement parent, QName qName) throws SOAPException
Create child SOAPElement- Parameters:
parent
- SOAPElementname
- Name- Returns:
- Throws:
SOAPException
-
updateTagData
protected void updateTagData(SAAJConverterImpl.NameCreator nc, SOAPElement element, XMLStreamReader reader, boolean newElement) throws SOAPException
update the tag data of the SOAPElement- Parameters:
NameCreator
- ncelement
- SOAPElementreader
- XMLStreamReader whose cursor is at START_ELEMENT- Throws:
SOAPException
-
addAttributes
protected void addAttributes(SAAJConverterImpl.NameCreator nc, SOAPElement element, XMLStreamReader reader) throws SOAPException
add attributes- Parameters:
NameCreator
- ncelement
- SOAPElement which is the target of the new attributesreader
- XMLStreamReader whose cursor is at START_ELEMENT- Throws:
SOAPException
-
createMessageFactory
public MessageFactory createMessageFactory(String namespace) throws SOAPException, WebServiceException
Description copied from interface:SAAJConverter
Creates a MessageFactory that can support the SOAP version identified by the specified envelope namespace.- Specified by:
createMessageFactory
in interfaceSAAJConverter
- Returns:
- Throws:
WebServiceException
- if the namespace is SOAP 1.2 and the SAAJ does not support SOAP 1.2 or the namespace is unknown.SOAPException
-
-