Class SAAJConverterImpl
java.lang.Object
org.apache.axis2.jaxws.message.util.impl.SAAJConverterImpl
- All Implemented Interfaces:
SAAJConverter
SAAJConverterImpl Provides an conversion methods between OM<->SAAJ
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classA 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
Modifier and TypeMethodDescriptionprotected voidaddAttributes(SAAJConverterImpl.NameCreator nc, jakarta.xml.soap.SOAPElement element, XMLStreamReader reader) add attributesprotected jakarta.xml.soap.SOAPElementbuildSOAPTree(SAAJConverterImpl.NameCreator nc, jakarta.xml.soap.SOAPElement root, jakarta.xml.soap.SOAPElement parent, XMLStreamReader reader, boolean quitAtBody) Build SOAPTree Either the root or the parent is null.protected jakarta.xml.soap.SOAPElementcreateElement(jakarta.xml.soap.SOAPElement parent, QName qName) Create child SOAPElementprotected jakarta.xml.soap.SOAPElementcreateElementFromTag(SAAJConverterImpl.NameCreator nc, jakarta.xml.soap.SOAPElement parent, XMLStreamReader reader) Create SOAPElement from the current tag datajakarta.xml.soap.MessageFactorycreateMessageFactory(String namespace) Creates a MessageFactory that can support the SOAP version identified by the specified envelope namespace.org.apache.axiom.om.OMElementtoOM(jakarta.xml.soap.SOAPElement soapElement) Convert SOAPElement into an OMElementorg.apache.axiom.soap.SOAPEnvelopetoOM(jakarta.xml.soap.SOAPEnvelope saajEnvelope) Convert SAAJ SOAPEnvelope to OM SOAPEnvelopeorg.apache.axiom.soap.SOAPEnvelopetoOM(jakarta.xml.soap.SOAPEnvelope saajEnvelope, org.apache.axiom.attachments.Attachments attachments) Convert SAAJ SOAPEnvelope to OM SOAPEnvelopejakarta.xml.soap.SOAPElementtoSAAJ(org.apache.axiom.om.OMElement omElement, jakarta.xml.soap.SOAPElement parent) Convert omElement into a SOAPElement and add it to the parent SOAPElement.jakarta.xml.soap.SOAPElementtoSAAJ(org.apache.axiom.om.OMElement omElement, jakarta.xml.soap.SOAPElement parent, jakarta.xml.soap.SOAPFactory sf) Convert omElement into a SOAPElement and add it to the parent SOAPElement.jakarta.xml.soap.SOAPEnvelopetoSAAJ(org.apache.axiom.soap.SOAPEnvelope omEnvelope) Convert OM SOAPEnvleope to SAAJ SOAPEnvelopeprotected voidupdateTagData(SAAJConverterImpl.NameCreator nc, jakarta.xml.soap.SOAPElement element, XMLStreamReader reader, boolean newElement) update the tag data of the SOAPElement
-
Method Details
-
toSAAJ
public jakarta.xml.soap.SOAPEnvelope toSAAJ(org.apache.axiom.soap.SOAPEnvelope omEnvelope) throws jakarta.xml.ws.WebServiceException Description copied from interface:SAAJConverterConvert OM SOAPEnvleope to SAAJ SOAPEnvelope- Specified by:
toSAAJin interfaceSAAJConverter- Returns:
- SOAPEnvelope
- Throws:
jakarta.xml.ws.WebServiceException
-
toOM
public org.apache.axiom.soap.SOAPEnvelope toOM(jakarta.xml.soap.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(jakarta.xml.soap.SOAPEnvelope saajEnvelope, org.apache.axiom.attachments.Attachments attachments) throws jakarta.xml.ws.WebServiceException Description copied from interface:SAAJConverterConvert SAAJ SOAPEnvelope to OM SOAPEnvelope- Specified by:
toOMin interfaceSAAJConverter- Returns:
- OM Envelope
- Throws:
jakarta.xml.ws.WebServiceException
-
toOM
public org.apache.axiom.om.OMElement toOM(jakarta.xml.soap.SOAPElement soapElement) throws jakarta.xml.ws.WebServiceException Description copied from interface:SAAJConverterConvert SOAPElement into an OMElement- Specified by:
toOMin interfaceSAAJConverter- Returns:
- OMElement
- Throws:
jakarta.xml.ws.WebServiceException
-
toSAAJ
public jakarta.xml.soap.SOAPElement toSAAJ(org.apache.axiom.om.OMElement omElement, jakarta.xml.soap.SOAPElement parent) throws jakarta.xml.ws.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:
jakarta.xml.ws.WebServiceException- See Also:
-
toSAAJ
public jakarta.xml.soap.SOAPElement toSAAJ(org.apache.axiom.om.OMElement omElement, jakarta.xml.soap.SOAPElement parent, jakarta.xml.soap.SOAPFactory sf) throws jakarta.xml.ws.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:
jakarta.xml.ws.WebServiceException- * @see toSAAJ(OMElement, SOAPElement)
-
buildSOAPTree
protected jakarta.xml.soap.SOAPElement buildSOAPTree(SAAJConverterImpl.NameCreator nc, jakarta.xml.soap.SOAPElement root, jakarta.xml.soap.SOAPElement parent, XMLStreamReader reader, boolean quitAtBody) throws jakarta.xml.ws.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:
jakarta.xml.ws.WebServiceException
-
createElementFromTag
protected jakarta.xml.soap.SOAPElement createElementFromTag(SAAJConverterImpl.NameCreator nc, jakarta.xml.soap.SOAPElement parent, XMLStreamReader reader) throws jakarta.xml.soap.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:
jakarta.xml.soap.SOAPException
-
createElement
protected jakarta.xml.soap.SOAPElement createElement(jakarta.xml.soap.SOAPElement parent, QName qName) throws jakarta.xml.soap.SOAPException Create child SOAPElement- Parameters:
parent- SOAPElementname- Name- Returns:
- Throws:
jakarta.xml.soap.SOAPException
-
updateTagData
protected void updateTagData(SAAJConverterImpl.NameCreator nc, jakarta.xml.soap.SOAPElement element, XMLStreamReader reader, boolean newElement) throws jakarta.xml.soap.SOAPException update the tag data of the SOAPElement- Parameters:
NameCreator- ncelement- SOAPElementreader- XMLStreamReader whose cursor is at START_ELEMENT- Throws:
jakarta.xml.soap.SOAPException
-
addAttributes
protected void addAttributes(SAAJConverterImpl.NameCreator nc, jakarta.xml.soap.SOAPElement element, XMLStreamReader reader) throws jakarta.xml.soap.SOAPException add attributes- Parameters:
NameCreator- ncelement- SOAPElement which is the target of the new attributesreader- XMLStreamReader whose cursor is at START_ELEMENT- Throws:
jakarta.xml.soap.SOAPException
-
createMessageFactory
public jakarta.xml.soap.MessageFactory createMessageFactory(String namespace) throws jakarta.xml.soap.SOAPException, jakarta.xml.ws.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:
jakarta.xml.ws.WebServiceException- if the namespace is SOAP 1.2 and the SAAJ does not support SOAP 1.2 or the namespace is unknown.jakarta.xml.soap.SOAPException
-