|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.http.message.AbstractHttpMessage org.apache.http.message.BasicHttpResponse communication.HSV3Response
public class HSV3Response
Holds an instance of an HTTP response which contains an SOAP Envelope as its HTTP Entity. This Envelope contains an HL7V3Message. A HTTP Response is comprised of three parts, the HTTPResponse itself, a SoapMessage, and a HL7V3Response payload. This class can create a response by being presented a HL7V3Message or by being given a raw HTTPResponse. All SOAP messages are created/parsed using the SOAP 1.2 Protocol. All HTTP messages are encoded using the HTTP 1_1 protocol and are generated with an OK HTTP Status.
Field Summary | |
---|---|
protected javax.xml.soap.MessageFactory |
mf
|
protected javax.xml.soap.SOAPMessage |
smessage
|
protected gov.nist.healthcare.core.message.v3.HL7V3Message |
v3payload
|
Fields inherited from class org.apache.http.message.AbstractHttpMessage |
---|
headergroup, params |
Constructor Summary | |
---|---|
HSV3Response()
Creates an empty response. |
|
HSV3Response(org.apache.http.message.BasicHttpResponse r)
Extracts the HL7V3Message from a BassicHttpResponse whose entity is SOAP enclosed HL7V3Message. |
|
HSV3Response(gov.nist.healthcare.core.message.v3.HL7V3Message m)
Creates a response with the specified HL7V3Message as its payload |
Method Summary | |
---|---|
String |
getStringRepresentation()
Builds the string representation of this HTTP Response. |
gov.nist.healthcare.core.message.v3.HL7V3Message |
getV3payload()
Returns the current content of this containers HL7V3Message |
boolean |
isWSAValid()
Checks the soap header for this message to determine if it adheres to the following standards: Web Services Addressing 1.0 - Core, ITI TF-2x Appendix V This function is not complete and as of now only checks for cardinality constraints as indicated by the standards and for the required presence of various mustUnderstand attributes. |
void |
setWSAHeaderValues(String to,
String from,
String replyto,
String action)
Sets the values of the required WSA header elements |
Methods inherited from class org.apache.http.message.BasicHttpResponse |
---|
getEntity, getLocale, getProtocolVersion, getReason, getStatusLine, setEntity, setLocale, setReasonPhrase, setStatusCode, setStatusLine, setStatusLine, setStatusLine |
Methods inherited from class org.apache.http.message.AbstractHttpMessage |
---|
addHeader, addHeader, containsHeader, getAllHeaders, getFirstHeader, getHeaders, getLastHeader, getParams, headerIterator, headerIterator, removeHeader, removeHeaders, setHeader, setHeader, setHeaders, setParams |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.http.HttpMessage |
---|
addHeader, addHeader, containsHeader, getAllHeaders, getFirstHeader, getHeaders, getLastHeader, getParams, headerIterator, headerIterator, removeHeader, removeHeaders, setHeader, setHeader, setHeaders, setParams |
Field Detail |
---|
protected gov.nist.healthcare.core.message.v3.HL7V3Message v3payload
protected final javax.xml.soap.MessageFactory mf
protected javax.xml.soap.SOAPMessage smessage
Constructor Detail |
---|
public HSV3Response() throws javax.xml.soap.SOAPException
javax.xml.soap.SOAPException
- in the event the Message factory could not be created or the
SOAPMessage could not be createdpublic HSV3Response(gov.nist.healthcare.core.message.v3.HL7V3Message m) throws javax.xml.soap.SOAPException, SAXException, IOException, ParserConfigurationException
m
- the HL7V3Messasge that is to be the payload of this response
javax.xml.soap.SOAPException
- in the event the Message factory could not be created or the
SOAPMessage could not be created
SAXException
IOException
ParserConfigurationException
public HSV3Response(org.apache.http.message.BasicHttpResponse r) throws IOException, org.apache.http.HttpException, javax.xml.soap.SOAPException, org.apache.xmlbeans.XmlException, gov.nist.healthcare.core.MalformedMessageException
r
- contains the response message.
IOException
org.apache.http.HttpException
javax.xml.soap.SOAPException
org.apache.xmlbeans.XmlException
gov.nist.healthcare.core.MalformedMessageException
Method Detail |
---|
public String getStringRepresentation() throws javax.xml.soap.SOAPException, IOException, SAXException, ParserConfigurationException
getStringRepresentation
in interface HTTPSoapV3Container
javax.xml.soap.SOAPException
- this container was unable to process the contents of its
SOAPMessage
IOException
SAXException
ParserConfigurationException
public gov.nist.healthcare.core.message.v3.HL7V3Message getV3payload()
HTTPSoapV3Container
getV3payload
in interface HTTPSoapV3Container
public boolean isWSAValid() throws DOMException, javax.xml.soap.SOAPException, WSAException
isWSAValid
in interface HTTPSoapV3Container
DOMException
- if the header is not well formed XML
javax.xml.soap.SOAPException
- if the header cannot be retrieved
WSAException
- when a violation of the cardinality rules is detectedpublic void setWSAHeaderValues(String to, String from, String replyto, String action) throws javax.xml.soap.SOAPException
to
- from
- action
-
javax.xml.soap.SOAPException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |