Javax.xml.soap.MessageFactory Class



Introduction

The javax.xml.soap.MessageFactory class is a factory for creating SOAPMessage objects.

Class declaration

Following is the declaration for javax.xml.soap.MessageFactory class −

public abstract class MessageFactory
   extends Object

Class constructors

S.N. Constructor & Description
1 MessageFactory()

Single Constructor.

Class methods

S.N. Method & Description
1 abstract SOAPMessage createMessage()

This method creates a new SOAPMessage object with the default SOAPPart, SOAPEnvelope, SOAPBody, and SOAPHeader objects.

2

abstract SOAPMessage createMessage(MimeHeaders headers, InputStream in)

This method internalizes the contents of the given InputStream object into a new SOAPMessage object and returns the SOAPMessage object.

3 static MessageFactory newInstance()

This method creates a new MessageFactory object that is an instance of the default implementation (SOAP 1.1), This method uses the following ordered lookup procedure to determine the MessageFactory implementation class to load: Use the javax.xml.soap.MessageFactory system property.

4 static MessageFactory newInstance(String protocol)

This method creates a new MessageFactory object that is an instance of the specified implementation.

Methods inherited

This class inherits methods from the following classes −

java.lang.Object

Advertisements