Package com.sun.xml.ws.api.message.saaj
Class SAAJFactory
java.lang.Object
com.sun.xml.ws.api.message.saaj.SAAJFactory
Factory SPI for SAAJ implementations
- Since:
- 2.2.6
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static voidaddAttachmentsToSOAPMessage(SOAPMessage msg, Message message) static Messagecreate(SOAPMessage saaj) Creates Message from SOAPMessagecreateMessage(SOAPMessage saaj) Creates Message from SOAPMessagecreateMessageFactory(String protocol) Creates a newMessageFactoryobject that is an instance of the specified implementation.createSOAPFactory(String protocol) Creates a newSOAPFactoryobject that is an instance of the specified implementation, this method uses the SAAJMetaFactory to locate the implementation class and create the SOAPFactory instance.static MessageFactorygetMessageFactory(String protocol) Creates a newMessageFactoryobject that is an instance of the specified implementation.static SOAPFactorygetSOAPFactory(String protocol) Creates a newSOAPFactoryobject that is an instance of the specified implementation, this method uses the SAAJMetaFactory to locate the implementation class and create the SOAPFactory instance.static SAAJMessageReads the message within the Packet to a SAAJMessage.static SOAPMessageread(SOAPVersion soapVersion, Message message) Reads Message as SOAPMessage.static SOAPMessageread(SOAPVersion soapVersion, Message message, Packet packet) Reads Message as SOAPMessage.readAsSAAJ(Packet packet) Reads the message within the Packet to a SAAJMessage.readAsSOAPMessage(SOAPVersion soapVersion, Message message) Reads Message as SOAPMessage.readAsSOAPMessage(SOAPVersion soapVersion, Message message, Packet packet) Reads Message as SOAPMessage.readAsSOAPMessageSax2Dom(SOAPVersion soapVersion, Message message)
-
Constructor Details
-
SAAJFactory
public SAAJFactory()Default constructor.
-
-
Method Details
-
getMessageFactory
Creates a newMessageFactoryobject that is an instance of the specified implementation. May be a dynamic message factory, a SOAP 1.1 message factory, or a SOAP 1.2 message factory. A dynamic message factory creates messages based on the MIME headers specified as arguments to thecreateMessagemethod. This method uses the SAAJMetaFactory to locate the implementation class and create the MessageFactory instance.- Parameters:
protocol- a string constant representing the class of the specified message factory implementation. May be eitherDYNAMIC_SOAP_PROTOCOL,DEFAULT_SOAP_PROTOCOL(which is the same as)SOAP_1_1_PROTOCOL, orSOAP_1_2_PROTOCOL.- Returns:
- a new instance of a
MessageFactory - Throws:
SOAPException- if there was an error in creating the specified implementation ofMessageFactory.- See Also:
-
getSOAPFactory
Creates a newSOAPFactoryobject that is an instance of the specified implementation, this method uses the SAAJMetaFactory to locate the implementation class and create the SOAPFactory instance.- Parameters:
protocol- a string constant representing the protocol of the specified SOAP factory implementation. May be eitherDYNAMIC_SOAP_PROTOCOL,DEFAULT_SOAP_PROTOCOL(which is the same as)SOAP_1_1_PROTOCOL, orSOAP_1_2_PROTOCOL.- Returns:
- a new instance of a
SOAPFactory - Throws:
SOAPException- if there was an error creating the specifiedSOAPFactory- See Also:
-
create
Creates Message from SOAPMessage- Parameters:
saaj- SOAPMessage- Returns:
- created Message
-
read
Reads Message as SOAPMessage. After this call message is consumed.- Parameters:
soapVersion- SOAP versionmessage- Message- Returns:
- Created SOAPMessage
- Throws:
SOAPException- if SAAJ processing fails
-
read
public static SOAPMessage read(SOAPVersion soapVersion, Message message, Packet packet) throws SOAPException Reads Message as SOAPMessage. After this call message is consumed.- Parameters:
soapVersion- SOAP versionmessage- Messagepacket- The packet that owns the Message- Returns:
- Created SOAPMessage
- Throws:
SOAPException- if SAAJ processing fails
-
read
Reads the message within the Packet to a SAAJMessage. After this call message is consumed.- Parameters:
packet- Packet- Returns:
- Created SAAJPMessage
- Throws:
SOAPException- if SAAJ processing fails
-
readAsSAAJ
Reads the message within the Packet to a SAAJMessage. After this call message is consumed.- Parameters:
packet- Packet- Returns:
- Created SAAJPMessage
- Throws:
SOAPException- if SAAJ processing fails
-
createMessageFactory
Creates a newMessageFactoryobject that is an instance of the specified implementation. May be a dynamic message factory, a SOAP 1.1 message factory, or a SOAP 1.2 message factory. A dynamic message factory creates messages based on the MIME headers specified as arguments to thecreateMessagemethod. This method uses the SAAJMetaFactory to locate the implementation class and create the MessageFactory instance.- Parameters:
protocol- a string constant representing the class of the specified message factory implementation. May be eitherDYNAMIC_SOAP_PROTOCOL,DEFAULT_SOAP_PROTOCOL(which is the same as)SOAP_1_1_PROTOCOL, orSOAP_1_2_PROTOCOL.- Returns:
- a new instance of a
MessageFactory - Throws:
SOAPException- if there was an error in creating the specified implementation ofMessageFactory.- See Also:
-
createSOAPFactory
Creates a newSOAPFactoryobject that is an instance of the specified implementation, this method uses the SAAJMetaFactory to locate the implementation class and create the SOAPFactory instance.- Parameters:
protocol- a string constant representing the protocol of the specified SOAP factory implementation. May be eitherDYNAMIC_SOAP_PROTOCOL,DEFAULT_SOAP_PROTOCOL(which is the same as)SOAP_1_1_PROTOCOL, orSOAP_1_2_PROTOCOL.- Returns:
- a new instance of a
SOAPFactory - Throws:
SOAPException- if there was an error creating the specifiedSOAPFactory- See Also:
-
createMessage
Creates Message from SOAPMessage- Parameters:
saaj- SOAPMessage- Returns:
- created Message
-
readAsSOAPMessage
Reads Message as SOAPMessage. After this call message is consumed.- Parameters:
soapVersion- SOAP versionmessage- Message- Returns:
- Created SOAPMessage
- Throws:
SOAPException- if SAAJ processing fails
-
readAsSOAPMessageSax2Dom
public SOAPMessage readAsSOAPMessageSax2Dom(SOAPVersion soapVersion, Message message) throws SOAPException - Throws:
SOAPException
-
addAttachmentsToSOAPMessage
-
readAsSOAPMessage
public SOAPMessage readAsSOAPMessage(SOAPVersion soapVersion, Message message, Packet packet) throws SOAPException Reads Message as SOAPMessage. After this call message is consumed. The implementation in this class simply calls readAsSOAPMessage(SOAPVersion, Message), and ignores the other parameters Subclasses can override and choose to base SOAPMessage creation on Packet properties if needed- Parameters:
soapVersion- SOAP versionmessage- Message- Returns:
- Created SOAPMessage
- Throws:
SOAPException- if SAAJ processing fails
-