|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opensaml.ws.soap.client.http.HttpSOAPClient
@ThreadSafe public class HttpSOAPClient
SOAP client that uses HTTP as the underlying transport and POST as the binding.
NOTE this client does not provide access to a InTransport or
OutTransport. Therefore any SecurityPolicy which operates on these object
can not be used with this client.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.opensaml.ws.soap.client.SOAPClient |
|---|
SOAPClient.SOAPRequestParameters |
| Field Summary | |
|---|---|
private org.apache.commons.httpclient.HttpClient |
httpClient
HTTP client used to send requests and receive responses. |
private org.slf4j.Logger |
log
Class logger. |
private ParserPool |
parserPool
Pool of XML parsers used to parser incoming responses. |
| Constructor Summary | |
|---|---|
HttpSOAPClient(org.apache.commons.httpclient.HttpClient client,
ParserPool parser)
Constructor. |
|
| Method Summary | |
|---|---|
protected org.apache.commons.httpclient.methods.PostMethod |
createPostMethod(String endpoint,
HttpSOAPRequestParameters requestParams,
Envelope message)
Creates the post method used to send the SOAP request. |
protected org.apache.commons.httpclient.methods.RequestEntity |
createRequestEntity(Envelope message,
Charset charset)
Creates the request entity that makes up the POST message body. |
protected void |
evaluateSecurityPolicy(SOAPMessageContext messageContext)
Evaluates the security policy associated with the given message context. |
protected void |
processFaultResponse(org.apache.commons.httpclient.methods.PostMethod httpMethod,
SOAPMessageContext messageContext)
Processes a SOAP fault, as determined by an HTTP 500 status code, response. |
protected void |
processSuccessfulResponse(org.apache.commons.httpclient.methods.PostMethod httpMethod,
SOAPMessageContext messageContext)
Processes a successful, as determined by an HTTP 200 status code, response. |
void |
send(String endpoint,
SOAPMessageContext messageContext)
Sends a message and waits for a response. |
protected Envelope |
unmarshallResponse(InputStream responseStream)
Unmarshalls the incoming response from a POST request. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private final org.slf4j.Logger log
private org.apache.commons.httpclient.HttpClient httpClient
private ParserPool parserPool
| Constructor Detail |
|---|
public HttpSOAPClient(org.apache.commons.httpclient.HttpClient client,
ParserPool parser)
client - Client used to make outbound HTTP requests. This client SHOULD employ a
MultiThreadedHttpConnectionManager and may be shared with other
objects.parser - pool of XML parsers used to parse incoming responses| Method Detail |
|---|
public void send(String endpoint,
SOAPMessageContext messageContext)
throws SOAPException,
SecurityException
send in interface SOAPClientendpoint - the endpoint to which to send the messagemessageContext - the message context containing the outbound SOAP message
SOAPClientException - thrown if there is a problem sending the message or receiving the response or if the
response is a SOAP fault
SecurityException - thrown if the response does not meet any security policy associated with the message
context
SOAPException
protected org.apache.commons.httpclient.methods.PostMethod createPostMethod(String endpoint,
HttpSOAPRequestParameters requestParams,
Envelope message)
throws SOAPClientException
endpoint - endpoint to which the message is sentrequestParams - HTTP request parametersmessage - message to be sent
SOAPClientException - thrown if the message could not be marshalled
protected org.apache.commons.httpclient.methods.RequestEntity createRequestEntity(Envelope message,
Charset charset)
throws SOAPClientException
message - message to be sentcharset - character set used for the message
SOAPClientException - thrown if the message could not be marshalled
protected void processSuccessfulResponse(org.apache.commons.httpclient.methods.PostMethod httpMethod,
SOAPMessageContext messageContext)
throws SOAPClientException
httpMethod - the HTTP method used to send the request and receive the responsemessageContext - current messages context
SOAPClientException - thrown if there is a problem reading the response from the PostMethod
protected void processFaultResponse(org.apache.commons.httpclient.methods.PostMethod httpMethod,
SOAPMessageContext messageContext)
throws SOAPClientException,
SOAPFaultException
httpMethod - the HTTP method used to send the request and receive the responsemessageContext - current messages context
SOAPClientException - thrown if the response can not be read from the PostMethod
SOAPFaultException - an exception containing the SOAP fault
protected Envelope unmarshallResponse(InputStream responseStream)
throws SOAPClientException
responseStream - input stream bearing the response
SOAPClientException - thrown if the incoming response can not be unmarshalled into an Envelope
protected void evaluateSecurityPolicy(SOAPMessageContext messageContext)
throws SOAPClientException
messageContext - current message context
SOAPClientException - thrown if there is a problem resolving or evaluating a security policy
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||