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 classSAAJConverterImpl.NameCreatorA 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 voidaddAttributes(SAAJConverterImpl.NameCreator nc, SOAPElement element, XMLStreamReader reader)add attributesprotected SOAPElementbuildSOAPTree(SAAJConverterImpl.NameCreator nc, SOAPElement root, SOAPElement parent, XMLStreamReader reader, boolean quitAtBody)Build SOAPTree Either the root or the parent is null.protected SOAPElementcreateElement(SOAPElement parent, QName qName)Create child SOAPElementprotected SOAPElementcreateElementFromTag(SAAJConverterImpl.NameCreator nc, SOAPElement parent, XMLStreamReader reader)Create SOAPElement from the current tag dataMessageFactorycreateMessageFactory(String namespace)Creates a MessageFactory that can support the SOAP version identified by the specified envelope namespace.org.apache.axiom.om.OMElementtoOM(SOAPElement soapElement)Convert SOAPElement into an OMElementorg.apache.axiom.soap.SOAPEnvelopetoOM(SOAPEnvelope saajEnvelope)Convert SAAJ SOAPEnvelope to OM SOAPEnvelopeorg.apache.axiom.soap.SOAPEnvelopetoOM(SOAPEnvelope saajEnvelope, org.apache.axiom.attachments.Attachments attachments)Convert SAAJ SOAPEnvelope to OM SOAPEnvelopeSOAPElementtoSAAJ(org.apache.axiom.om.OMElement omElement, SOAPElement parent)Convert omElement into a SOAPElement and add it to the parent SOAPElement.SOAPElementtoSAAJ(org.apache.axiom.om.OMElement omElement, SOAPElement parent, SOAPFactory sf)Convert omElement into a SOAPElement and add it to the parent SOAPElement.SOAPEnvelopetoSAAJ(org.apache.axiom.soap.SOAPEnvelope omEnvelope)Convert OM SOAPEnvleope to SAAJ SOAPEnvelopeprotected voidupdateTagData(SAAJConverterImpl.NameCreator nc, SOAPElement element, XMLStreamReader reader, boolean newElement)update the tag data of the SOAPElement
-
-
-
Method Detail
-
toSAAJ
public SOAPEnvelope toSAAJ(org.apache.axiom.soap.SOAPEnvelope omEnvelope) throws WebServiceException
Description copied from interface:SAAJConverterConvert OM SOAPEnvleope to SAAJ SOAPEnvelope- Specified by:
toSAAJin interfaceSAAJConverter- Returns:
- SOAPEnvelope
- Throws:
WebServiceException
-
toOM
public org.apache.axiom.soap.SOAPEnvelope toOM(SOAPEnvelope saajEnvelope)
Description copied from interface:SAAJConverterConvert SAAJ SOAPEnvelope to OM SOAPEnvelope- Specified by:
toOMin interfaceSAAJConverter- Returns:
- OM Envelope
-
toOM
public org.apache.axiom.soap.SOAPEnvelope toOM(SOAPEnvelope saajEnvelope, org.apache.axiom.attachments.Attachments attachments) throws WebServiceException
Description copied from interface:SAAJConverterConvert SAAJ SOAPEnvelope to OM SOAPEnvelope- Specified by:
toOMin interfaceSAAJConverter- Returns:
- OM Envelope
- Throws:
WebServiceException
-
toOM
public org.apache.axiom.om.OMElement toOM(SOAPElement soapElement) throws WebServiceException
Description copied from interface:SAAJConverterConvert SOAPElement into an OMElement- Specified by:
toOMin interfaceSAAJConverter- Returns:
- OMElement
- Throws:
WebServiceException
-
toSAAJ
public SOAPElement toSAAJ(org.apache.axiom.om.OMElement omElement, SOAPElement parent) throws WebServiceException
Description copied from interface:SAAJConverterConvert 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:
toSAAJin interfaceSAAJConverterparent- 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(org.apache.axiom.om.OMElement omElement, SOAPElement parent, SOAPFactory sf) throws WebServiceException
Description copied from interface:SAAJConverterConvert omElement into a SOAPElement and add it to the parent SOAPElement.- Specified by:
toSAAJin interfaceSAAJConverterparent- 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:SAAJConverterCreates a MessageFactory that can support the SOAP version identified by the specified envelope namespace.- Specified by:
createMessageFactoryin 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
-
-