Package com.sun.xml.wss.impl
Class SecurableSoapMessage
java.lang.Object
jakarta.xml.soap.SOAPMessage
com.sun.xml.wss.impl.SecurableSoapMessage
-
Field Summary
Fields inherited from class jakarta.xml.soap.SOAPMessage
CHARACTER_SET_ENCODING, WRITE_XML_DECLARATION -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAttachmentPart(AttachmentPart AttachmentPart) intcreateAttachmentPart(jakarta.activation.DataHandler dataHandler) createAttachmentPart(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) getAttachment(SOAPElement element) getAttachmentPart(String uri) getAttachments(MimeHeaders headers) getElementById(String id) static StringgetMessageParts(Target target) getProperty(String property) inthashCode()voidinit(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(MimeHeaders hdrs) voidMake Security Header Non-MustUnderstandvoidbooleanvoidsetContentDescription(String description) voidsetDoNotSetMU(boolean doNotSetMU) voidsetOptimized(boolean optimized) voidsetProperty(String property, Object value) voidsetSOAPMessage(SOAPMessage soapMsg) toString()voidwriteTo(OutputStream out)
-
Constructor Details
-
SecurableSoapMessage
public SecurableSoapMessage() -
SecurableSoapMessage
- Throws:
XWSSecurityException
-
-
Method Details
-
init
-
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
- Specified by:
getSOAPPartin classSOAPMessage
-
getSOAPBody
- Overrides:
getSOAPBodyin classSOAPMessage- Throws:
SOAPException
-
getSOAPMessage
-
setSOAPMessage
- Throws:
XWSSecurityException
-
addAttachmentPart
- Specified by:
addAttachmentPartin classSOAPMessage
-
countAttachments
public int countAttachments()- Specified by:
countAttachmentsin classSOAPMessage
-
createAttachmentPart
- Specified by:
createAttachmentPartin classSOAPMessage
-
createAttachmentPart
- Overrides:
createAttachmentPartin classSOAPMessage
-
createAttachmentPart
- Overrides:
createAttachmentPartin classSOAPMessage
-
equals
-
getAttachments
- Specified by:
getAttachmentsin classSOAPMessage
-
getAttachments
- Specified by:
getAttachmentsin classSOAPMessage
-
getContentDescription
- Specified by:
getContentDescriptionin classSOAPMessage
-
getMimeHeaders
- Specified by:
getMimeHeadersin classSOAPMessage
-
getProperty
- Overrides:
getPropertyin classSOAPMessage- Throws:
SOAPException
-
getSOAPHeader
- Overrides:
getSOAPHeaderin classSOAPMessage- Throws:
SOAPException
-
hashCode
public int hashCode() -
removeAllAttachments
public void removeAllAttachments()- Specified by:
removeAllAttachmentsin classSOAPMessage
-
saveRequired
public boolean saveRequired()- Specified by:
saveRequiredin classSOAPMessage
-
setContentDescription
- Specified by:
setContentDescriptionin classSOAPMessage
-
setProperty
- Overrides:
setPropertyin classSOAPMessage- Throws:
SOAPException
-
toString
-
writeTo
- Specified by:
writeToin classSOAPMessage- Throws:
SOAPExceptionIOException
-
saveChanges
- Specified by:
saveChangesin classSOAPMessage- Throws:
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
- Specified by:
getAttachmentin classSOAPMessage- Throws:
SOAPException
-
removeAttachments
- Specified by:
removeAttachmentsin classSOAPMessage
-
isOptimized
public boolean isOptimized() -
setOptimized
public void setOptimized(boolean optimized) -
setDoNotSetMU
public void setDoNotSetMU(boolean doNotSetMU)
-