Class MessageProcessor
- java.lang.Object
-
- com.sun.identity.liberty.ws.soapbinding.MessageProcessor
-
public class MessageProcessor extends Object
The classMessageProcessoris used to process theSOAPMessagefor the JSR 196 providers. This API will be used by both the client and server providers for securing and validating the request/responses between the web services applications.
-
-
Constructor Summary
Constructors Constructor Description MessageProcessor(SOAPProviderConfig config)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description jakarta.xml.soap.SOAPMessagesecureRequest(ResourceOffering offering, List credentials, String serviceType, jakarta.xml.soap.SOAPMessage soapMessage, Map sharedData)Secures the request by getting the credential from the discovery service.jakarta.xml.soap.SOAPMessagesecureResponse(jakarta.xml.soap.SOAPMessage soapMessage, Map sharedData)Secures the SOAP Message response by adding necessary headers to the given SOAP Message and also signs the message if it is required.ObjectvalidateRequest(jakarta.xml.soap.SOAPMessage soapMessage, Subject subject, Map sharedData, jakarta.servlet.http.HttpServletRequest httpRequest)This method is used to validate the SOAP Message Request by the processing rules of Liberty SOAPBinding specifications.jakarta.xml.soap.SOAPMessagevalidateResponse(jakarta.xml.soap.SOAPMessage soapMessage, Map sharedData)Validates the SOAP Response from the service and verifies the signature if needed.
-
-
-
Constructor Detail
-
MessageProcessor
public MessageProcessor(SOAPProviderConfig config)
Constructor- Parameters:
config- SOAPConfiguration that will be used to validate the SOAPMessage.
-
-
Method Detail
-
validateRequest
public Object validateRequest(jakarta.xml.soap.SOAPMessage soapMessage, Subject subject, Map sharedData, jakarta.servlet.http.HttpServletRequest httpRequest) throws SOAPBindingException
This method is used to validate the SOAP Message Request by the processing rules of Liberty SOAPBinding specifications.- Parameters:
soapMessage- SOAPMessage that needs to be validated.subject- Subject that may be used to populate the authenticated entity/user principal and any other credential information.sharedData- that may be used to store any data needed between the request and response.httpRequest- HttpServletRequest associated with this SOAP Message request.- Returns:
- Object Credential object after successful validation.
- Throws:
SOAPBindingException- for any error occured during validation.
-
secureResponse
public jakarta.xml.soap.SOAPMessage secureResponse(jakarta.xml.soap.SOAPMessage soapMessage, Map sharedData) throws SOAPBindingExceptionSecures the SOAP Message response by adding necessary headers to the given SOAP Message and also signs the message if it is required.- Parameters:
soapMessage- SOAP Message that needs to be secured.sharedData- Any shared data that may be needed between the request and response.- Returns:
- SOAPMessage Secured SOAP Message by adding liberty headers and also signs the message if configured.
- Throws:
SOAPBindingException- for any failure.
-
secureRequest
public jakarta.xml.soap.SOAPMessage secureRequest(ResourceOffering offering, List credentials, String serviceType, jakarta.xml.soap.SOAPMessage soapMessage, Map sharedData) throws SOAPBindingException
Secures the request by getting the credential from the discovery service.- Parameters:
offering- Resource Offering of the discovery service.credentials- List of credentials that are required to access the discovery service.serviceType- Service Type that the discovery service should need to look for.soapMessage- SOAPMessage that needs to be secured.sharedData- Any shared data that may be used between the request and the response.- Returns:
- SOAPMessage Secured SOAP Message.
- Throws:
SOAPBindingException- for any failure.
-
validateResponse
public jakarta.xml.soap.SOAPMessage validateResponse(jakarta.xml.soap.SOAPMessage soapMessage, Map sharedData) throws SOAPBindingExceptionValidates the SOAP Response from the service and verifies the signature if needed.- Parameters:
soapMessage- SOAPMessage that needs to be validated.sharedData- Any shared data that may be required between the request and the response.- Returns:
- SOAPMessage Validated SOAP Response.
- Throws:
SOAPBindingException- for any failure.
-
-