- Javax.xml.bind classes
- Home
- Binder
- DatatypeConverter
- JAXB
- JAXBContext
- JAXBElement
- JAXBElement.GlobalScope
- JAXBIntrospector
- Marshaller.Listener
- SchemaOutputResolver
- Unmarshaller.Listener
- Javax.xml.bind.util classes
- JAXBResult
- JAXBSource
- ValidationEventCollector
- Javax.xml.parsers classes
- DocumentBuilder
- DocumentBuilderFactory
- SAXParser
- SAXParserFactory
- Javax.xml.soap classes
- AttachmentPart
- MessageFactory
- MimeHeader
- MimeHeaders
- SAAJMetaFactory
- SOAPConnection
- SOAPConnectionFactory
- SOAPFactory
- SOAPMessage
- SOAPPart
- Javax.xml.validation classes
- Schema
- SchemaFactory
- TypeInfoProvider
- Validator
- ValidatorHandler
- Javax.xml.xpath classes
- XPathConstants
- XPathFactory
- Java Useful Resources
- Java - Quick Guide
- Java - Useful Resources
Javax.xml.soap.SOAPMessage Class
Introduction
The javax.xml.soap.SOAPMessage class is the root class for all SOAP messages.A SOAP message is an XML document or a MIME message whose first body part is an XML/SOAP document.
Class declaration
Following is the declaration for javax.xml.soap.SOAPMessage class:
public abstract class SOAPMessage extends Object
Field
Following are the fields for javax.xml.soap.SOAPMessage class −
static String CHARACTER_SET_ENCODING − This specifies the character type encoding for the SOAP Message.
static String WRITE_XML_DECLARATION − This specifies whether the SOAP Message will contain an XML declaration when it is sent.
Class constructors
S.N. | Constructor & Description |
---|---|
1 | SOAPMessage()
Single Constructor. |
Class methods
S.N. | Method & Description |
---|---|
1 |
abstract void addAttachmentPart(AttachmentPart AttachmentPart) This method adds the given AttachmentPart object to this SOAPMessage object. |
2 |
abstract int countAttachments() This method gets a count of the number of attachments in this message. |
3 |
abstract AttachmentPart createAttachmentPart() This method creates a new empty AttachmentPart object. |
4 |
AttachmentPart createAttachmentPart(DataHandler dataHandler) This method creates an AttachmentPart object and populates it using the given DataHandler object. |
5 |
AttachmentPart createAttachmentPart(Object content, String contentType) This method creates an AttachmentPart object and populates it with the specified data of the specified content type. |
6 |
abstract AttachmentPart getAttachment(SOAPElement element) This method returns an AttachmentPart object that is associated with an attachment that is referenced by this SOAPElement or null if no such attachment exists. |
7 |
abstract Iterator getAttachments() This method retrieves all the AttachmentPart objects that are part of this SOAPMessage object. |
8 |
abstract Iterator getAttachments(MimeHeaders headers) This method retrieves all the AttachmentPart objects that have header entries that match the specified headers. |
9 |
abstract String getContentDescription() This method retrieves a description of this SOAPMessage object's content. |
10 |
abstract MimeHeaders getMimeHeaders() This method returns all the transport-specific MIME headers for this SOAPMessage object in a transport-independent fashion. |
11 |
Object getProperty(String property) This method retrieves value of the specified property. |
12 |
SOAPBody getSOAPBody() This method gets the SOAP Body contained in this SOAPMessage object. |
13 |
SOAPHeader getSOAPHeader() This method gets the SOAP Header contained in this SOAPMessage object. |
14 |
abstract SOAPPart getSOAPPart() This method gets the SOAP part of this SOAPMessage object. |
15 |
abstract void removeAllAttachments() This method removes all AttachmentPart objects that have been added to this SOAPMessage object. |
16 |
abstract void removeAttachments(MimeHeaders headers) This method removes all the AttachmentPart objects that have header entries that match the specified headers. |
17 |
abstract void saveChanges() This method updates this SOAPMessage object with all the changes that have been made to it. |
18 |
abstract boolean saveRequired() This method indicates whether this SOAPMessage object needs to have the method saveChanges called on it. |
19 |
abstract void setContentDescription(String description) This method sets the description of this SOAPMessage object's content with the given description. |
20 |
void setProperty(String property, Object value) This method associates the specified value with the specified property. |
21 |
abstract void writeTo(OutputStream out) This method writes this SOAPMessage object to the given output stream. |
Methods inherited
This class inherits methods from the following classes −
javax.xml.Object