Package com.sun.xml.wss.impl
Class SecurableSoapMessage
java.lang.Object
jakarta.xml.soap.SOAPMessage
com.sun.xml.wss.impl.SecurableSoapMessage
public final class SecurableSoapMessage
extends jakarta.xml.soap.SOAPMessage
-
Field Summary
Fields inherited from class jakarta.xml.soap.SOAPMessage
CHARACTER_SET_ENCODING, WRITE_XML_DECLARATION -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAttachmentPart(jakarta.xml.soap.AttachmentPart AttachmentPart) intjakarta.xml.soap.AttachmentPartjakarta.xml.soap.AttachmentPartcreateAttachmentPart(jakarta.activation.DataHandler dataHandler) jakarta.xml.soap.AttachmentPartcreateAttachmentPart(Object content, String contentType) voidDelete security headerbooleanFinds or creates wsse:Security HeaderFinds wsse:Security HeaderfindWsseSecurityHeaderBlock(boolean doCreate, boolean mustUnderstand) Finds wsse:Security Header Block.voidvoidgenerateSecurityHeaderException(String exceptionMessage) Create and initialize a SecurityHeaderException, and throw a fault based on it.voidgenerateWsuId(Element element) voidgenerateWsuId(Element element, String id) jakarta.xml.soap.AttachmentPartgetAttachment(jakarta.xml.soap.SOAPElement element) jakarta.xml.soap.AttachmentPartgetAttachmentPart(String uri) getAttachments(jakarta.xml.soap.MimeHeaders headers) getElementById(String id) jakarta.xml.soap.SOAPElementjakarta.xml.soap.SOAPEnvelopestatic StringgetMessageParts(Target target) jakarta.xml.soap.MimeHeadersgetProperty(String property) jakarta.xml.soap.SOAPBodyjakarta.xml.soap.SOAPHeaderjakarta.xml.soap.SOAPMessagejakarta.xml.soap.SOAPPartinthashCode()voidinit(jakarta.xml.soap.SOAPMessage soapMessage) booleanstatic WssSoapFaultExceptionnewSOAPFaultException(String faultstring, Throwable th) Create and initialize a WssSoapFaultException.static WssSoapFaultExceptionnewSOAPFaultException(QName faultCode, String faultstring, Throwable th) Create and initialize a WssSoapFaultException.voidvoidremoveAttachments(jakarta.xml.soap.MimeHeaders hdrs) voidMake Security Header Non-MustUnderstandvoidbooleanvoidsetContentDescription(String description) voidsetDoNotSetMU(boolean doNotSetMU) voidsetOptimized(boolean optimized) voidsetProperty(String property, Object value) voidsetSOAPMessage(jakarta.xml.soap.SOAPMessage soapMsg) toString()voidwriteTo(OutputStream out)
-
Constructor Details
-
SecurableSoapMessage
public SecurableSoapMessage() -
SecurableSoapMessage
- Throws:
XWSSecurityException
-
-
Method Details
-
init
public void init(jakarta.xml.soap.SOAPMessage soapMessage) -
getEnvelope
- Throws:
XWSSecurityException
-
findWsseSecurityHeaderBlock
public SecurityHeader findWsseSecurityHeaderBlock(boolean doCreate, boolean mustUnderstand) throws XWSSecurityException Finds wsse:Security Header Block.- Parameters:
doCreate- create one if none exists- Returns:
- wsse:Security header
- Throws:
XWSSecurityException
-
findSecurityHeader
Finds wsse:Security Header- Returns:
- returns null if wsse:Security header not found
- Throws:
XWSSecurityException
-
findOrCreateSecurityHeader
Finds or creates wsse:Security Header- Returns:
- wsse:Security header
- Throws:
XWSSecurityException
-
deleteSecurityHeader
public void deleteSecurityHeader()Delete security header -
resetMustUnderstandOnSecHeader
public void resetMustUnderstandOnSecHeader()Make Security Header Non-MustUnderstand -
generateSecurityHeaderException
Create and initialize a SecurityHeaderException, and throw a fault based on it. The faultstring for this exception is wsse:InvalidSecurity as per section 12 on Error Handling of the wss SOAPMessageSecurity spec (draft 17). This fault stands for An error was discovered processing the wsse:Security header.- Throws:
XWSSecurityException
-
newSOAPFaultException
Create and initialize a WssSoapFaultException. This method is used in conjunction with generateClientFault. -
newSOAPFaultException
public static WssSoapFaultException newSOAPFaultException(QName faultCode, String faultstring, Throwable th) Create and initialize a WssSoapFaultException. This method is used in conjunction with generateClientFault. -
generateFault
- Throws:
XWSSecurityException
-
getSOAPPart
public jakarta.xml.soap.SOAPPart getSOAPPart()- Specified by:
getSOAPPartin classjakarta.xml.soap.SOAPMessage
-
getSOAPBody
public jakarta.xml.soap.SOAPBody getSOAPBody() throws jakarta.xml.soap.SOAPException- Overrides:
getSOAPBodyin classjakarta.xml.soap.SOAPMessage- Throws:
jakarta.xml.soap.SOAPException
-
getSOAPMessage
public jakarta.xml.soap.SOAPMessage getSOAPMessage() -
setSOAPMessage
- Throws:
XWSSecurityException
-
addAttachmentPart
public void addAttachmentPart(jakarta.xml.soap.AttachmentPart AttachmentPart) - Specified by:
addAttachmentPartin classjakarta.xml.soap.SOAPMessage
-
countAttachments
public int countAttachments()- Specified by:
countAttachmentsin classjakarta.xml.soap.SOAPMessage
-
createAttachmentPart
public jakarta.xml.soap.AttachmentPart createAttachmentPart()- Specified by:
createAttachmentPartin classjakarta.xml.soap.SOAPMessage
-
createAttachmentPart
- Overrides:
createAttachmentPartin classjakarta.xml.soap.SOAPMessage
-
createAttachmentPart
public jakarta.xml.soap.AttachmentPart createAttachmentPart(jakarta.activation.DataHandler dataHandler) - Overrides:
createAttachmentPartin classjakarta.xml.soap.SOAPMessage
-
equals
-
getAttachments
- Specified by:
getAttachmentsin classjakarta.xml.soap.SOAPMessage
-
getAttachments
- Specified by:
getAttachmentsin classjakarta.xml.soap.SOAPMessage
-
getContentDescription
- Specified by:
getContentDescriptionin classjakarta.xml.soap.SOAPMessage
-
getMimeHeaders
public jakarta.xml.soap.MimeHeaders getMimeHeaders()- Specified by:
getMimeHeadersin classjakarta.xml.soap.SOAPMessage
-
getProperty
- Overrides:
getPropertyin classjakarta.xml.soap.SOAPMessage- Throws:
jakarta.xml.soap.SOAPException
-
getSOAPHeader
public jakarta.xml.soap.SOAPHeader getSOAPHeader() throws jakarta.xml.soap.SOAPException- Overrides:
getSOAPHeaderin classjakarta.xml.soap.SOAPMessage- Throws:
jakarta.xml.soap.SOAPException
-
hashCode
public int hashCode() -
removeAllAttachments
public void removeAllAttachments()- Specified by:
removeAllAttachmentsin classjakarta.xml.soap.SOAPMessage
-
saveRequired
public boolean saveRequired()- Specified by:
saveRequiredin classjakarta.xml.soap.SOAPMessage
-
setContentDescription
- Specified by:
setContentDescriptionin classjakarta.xml.soap.SOAPMessage
-
setProperty
- Overrides:
setPropertyin classjakarta.xml.soap.SOAPMessage- Throws:
jakarta.xml.soap.SOAPException
-
toString
-
writeTo
- Specified by:
writeToin classjakarta.xml.soap.SOAPMessage- Throws:
jakarta.xml.soap.SOAPExceptionIOException
-
saveChanges
public void saveChanges() throws jakarta.xml.soap.SOAPException- Specified by:
saveChangesin classjakarta.xml.soap.SOAPMessage- Throws:
jakarta.xml.soap.SOAPException
-
getNamespaceContext
- Throws:
XWSSecurityException
-
generateId
- Returns:
- an ID unique w.r.t this SOAPMessage
-
generateWsuId
- Throws:
XWSSecurityException
-
generateWsuId
- Parameters:
id- ID specified should be unique in the message.
-
getElementByWsuId
- Throws:
XWSSecurityException
-
getElementById
- Throws:
XWSSecurityException
-
getAttachmentPart
- Throws:
XWSSecurityException
-
getIdFromFragmentRef
-
getMessageParts
- Throws:
XWSSecurityException
-
getAttachment
public jakarta.xml.soap.AttachmentPart getAttachment(jakarta.xml.soap.SOAPElement element) throws jakarta.xml.soap.SOAPException - Specified by:
getAttachmentin classjakarta.xml.soap.SOAPMessage- Throws:
jakarta.xml.soap.SOAPException
-
removeAttachments
public void removeAttachments(jakarta.xml.soap.MimeHeaders hdrs) - Specified by:
removeAttachmentsin classjakarta.xml.soap.SOAPMessage
-
isOptimized
public boolean isOptimized() -
setOptimized
public void setOptimized(boolean optimized) -
setDoNotSetMU
public void setDoNotSetMU(boolean doNotSetMU)
-