|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.infoengine.soap.RPCHandler
this class should be used by Info*Engine SOAP services in a standard request/response situation (HTTP or similar)
Nested Class Summary | |
(package private) class |
RPCHandler.XEchoSpaceTimer
|
(package private) class |
RPCHandler.XEchoSpaceTimerTask
|
Field Summary | |
static String |
CLIMBER
|
private static String |
CONTENT_TYPE
|
private static byte[] |
CRLF
|
static long |
DEFAULT_XECHO_INTERVAL
|
private String |
defaultDomain
|
static String |
GROUP_IN
|
private static String |
GROUP_OUT_NAME
|
static String |
GROUP_VDB
|
private TrustedHostValidator |
hostValidator
|
private KeyStore |
localKeyStore
|
private static byte[] |
ONE_BYTE_CHUNK
|
private static boolean |
PROXY_CHECKED
|
private static InetAddress[] |
PROXY_IPS
|
private String |
remoteHost
|
static String |
RENDER_META
|
private static String |
RESOURCE
|
static String |
RETURN_UNTUNNELLED
|
private static String |
SERVLET_PROXY
|
private static byte |
SPACE
|
static String |
TUNNELLED_CLIENT_XHEADER
|
static String |
WILDFIRE
|
static String |
WILDFIRE_XECHO_PROPERTY
|
static String |
XECHO_HEADER
|
Constructor Summary | |
RPCHandler()
|
Method Summary | |
private boolean |
_useSAX(Hashtable headers)
|
private static void |
addParameter(Element e,
IeCollection vdb,
String name,
Object o)
|
private static void |
checkProxySetup()
|
static Timer |
finishTimer(Timer timer)
|
private String |
getDomain(String cls)
get the domain associated with a class |
private KeyStore |
getLocalKeyStore()
|
private static String |
getProperty(Properties props,
String propName)
|
private static String |
getProperty(Properties props,
String propName,
String dflt)
|
private Vector |
getReferenceList(javax.xml.soap.SOAPElement signature,
javax.xml.soap.SOAPEnvelope env)
|
static String |
getServletProxy()
|
private Task |
getTask(Hashtable headers)
build a factory task with an @SERVER group that reflects the contents of headers |
static String |
getTasks(String cls)
where are the tasks associated with a class? |
private long |
getXechoSpaceInterval(Hashtable headers)
Checks HTTP headers for a wildfire User-Agent or the presense of an X header (X-Echo-space-interval, value of seconds) signalling that spaces should be echoed for long running requests. |
RPCHandler.XEchoSpaceTimer |
getXEchoSpaceTimer(Hashtable headers,
javax.servlet.http.HttpServletResponse response)
Checks HTTP headers for a wildfire User-Agent or the presense of an X header (X-Echo-space-interval, value of seconds) signalling that spaces should be echoed for long running requests. |
RPCHandler.XEchoSpaceTimer |
getXEchoSpaceTimer(Hashtable headers,
OutputStream os)
Checks HTTP headers for a wildfire User-Agent or the presense of an X header (X-Echo-space-interval, value of seconds) signalling that spaces should be echoed for long running requests. |
static boolean |
isProxyHost(String host)
|
static void |
parseSoapBody(javax.xml.soap.SOAPBody body,
javax.xml.soap.SOAPMessage message,
Group formGroup,
IeCollection vdb,
StringBuffer methodName)
populate @FORM with the parameters for this method call |
javax.xml.soap.SOAPMessage |
postProcess(javax.xml.soap.SOAPMessage soapRequest,
String className,
String methodName,
Hashtable headers,
OutputStream errorStream)
handle a "preProcessed" SOAP request using the standard Info*Engine process and serialize a SOAP response. |
javax.xml.soap.SOAPMessage |
postProcess(javax.xml.soap.SOAPMessage soapRequest,
String className,
String methodName,
Hashtable headers,
OutputStream errorStream,
OutputStream streamMessageTo,
Timer timer)
|
private javax.xml.soap.SOAPMessage |
postProcess(String className,
String methodName,
Hashtable headers,
Group formGroup,
IeCollection vdb,
SOAPAttachmentInputStream attachIS,
OutputStream errorStream,
OutputStream streamMessageTo,
Timer timer)
|
javax.xml.soap.SOAPMessage |
preProcess(Hashtable headers,
InputStream is,
OutputStream errorStream)
get the SOAPMessage off of the stream, write a fault to os on failure |
javax.xml.soap.SOAPMessage |
preProcess(Hashtable headers,
javax.xml.soap.SOAPMessage soapRequest,
OutputStream errorStream)
|
void |
process(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
handle an incoming SOAP request using the standard Info*Engine process and serialize a SOAP response. |
javax.xml.soap.SOAPMessage |
process(javax.xml.soap.SOAPMessage request)
This is innefficient but sufficient for a POC |
javax.xml.soap.SOAPMessage |
process(String className,
String methodName,
Hashtable headers,
InputStream is,
OutputStream errorStream,
OutputStream streamMessageTo,
Timer timer)
handle an incoming SOAP request using the standard Info*Engine process and serialize a SOAP response. |
static void |
processHeader(javax.xml.soap.SOAPHeader header,
Hashtable headers)
copy headers from SOAPHeader into hashtable for easier manipulation |
static void |
processHeader(javax.xml.soap.SOAPHeader header,
Hashtable headers,
boolean signed)
copy headers from SOAPHeader into hashtable for easier manipulation |
static boolean |
ranOnce(Timer timer)
|
static boolean |
renderMeta(String cls)
output metadata for this class? |
void |
setDefaultDomain(String dflt)
the default domain to use when domain is undefined |
void |
setHostValidator(TrustedHostValidator validator)
TrustedHostValidator to use to make sure the incoming request can be trusted and doesn't need to be signed, etc. |
void |
setRemoteHost(String host)
hostname of client |
boolean |
signed(javax.xml.soap.SOAPMessage request)
|
private void |
validSignature(javax.xml.soap.SOAPMessage request,
String soapSigElementName,
String sigElementName)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String TUNNELLED_CLIENT_XHEADER
public static final String GROUP_IN
public static final String GROUP_VDB
public static final String CLIMBER
public static final String RENDER_META
public static final String RETURN_UNTUNNELLED
public static final String WILDFIRE
public static final String WILDFIRE_XECHO_PROPERTY
public static final String XECHO_HEADER
public static final long DEFAULT_XECHO_INTERVAL
private static final byte SPACE
private static final byte[] ONE_BYTE_CHUNK
private static final byte[] CRLF
private static final String RESOURCE
private static final String GROUP_OUT_NAME
private static final String CONTENT_TYPE
private String defaultDomain
private KeyStore localKeyStore
private TrustedHostValidator hostValidator
private String remoteHost
private static boolean PROXY_CHECKED
private static String SERVLET_PROXY
private static InetAddress[] PROXY_IPS
Constructor Detail |
public RPCHandler()
Method Detail |
public void setHostValidator(TrustedHostValidator validator)
public void setRemoteHost(String host)
public void setDefaultDomain(String dflt)
private String getDomain(String cls)
public static String getTasks(String cls)
public static boolean renderMeta(String cls)
private Task getTask(Hashtable headers)
public static void parseSoapBody(javax.xml.soap.SOAPBody body, javax.xml.soap.SOAPMessage message, Group formGroup, IeCollection vdb, StringBuffer methodName) throws javax.xml.soap.SOAPException
javax.xml.soap.SOAPException
private static void addParameter(Element e, IeCollection vdb, String name, Object o)
private long getXechoSpaceInterval(Hashtable headers)
headers
- The HTTP headers.
public RPCHandler.XEchoSpaceTimer getXEchoSpaceTimer(Hashtable headers, OutputStream os)
headers
- The HTTP headers.os
- The OutputStream to write spaces to.
public RPCHandler.XEchoSpaceTimer getXEchoSpaceTimer(Hashtable headers, javax.servlet.http.HttpServletResponse response) throws IOException
headers
- The HTTP headers.response
- The HttpServletResponse to write spaces to.
IOException
public static Timer finishTimer(Timer timer)
public static boolean ranOnce(Timer timer)
public void process(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException
request
- - incoming request to a servletresponse
- - outgoing response to SOAP client
IOException
- if there is an error retrieving servlet streamspublic static void processHeader(javax.xml.soap.SOAPHeader header, Hashtable headers)
header
- the soap headerheaders
- the hashtable to store values inpublic static void processHeader(javax.xml.soap.SOAPHeader header, Hashtable headers, boolean signed)
header
- the soap headerheaders
- the hashtable to store values insigned
- whether or not the message was signed (auth-user will not persist if false)private boolean _useSAX(Hashtable headers)
public javax.xml.soap.SOAPMessage preProcess(Hashtable headers, InputStream is, OutputStream errorStream)
headers
- MIME headersis
- stream to read message from
public javax.xml.soap.SOAPMessage preProcess(Hashtable headers, javax.xml.soap.SOAPMessage soapRequest, OutputStream errorStream)
public javax.xml.soap.SOAPMessage process(javax.xml.soap.SOAPMessage request) throws javax.xml.soap.SOAPException, IOException
javax.xml.soap.SOAPException
IOException
public javax.xml.soap.SOAPMessage process(String className, String methodName, Hashtable headers, InputStream is, OutputStream errorStream, OutputStream streamMessageTo, Timer timer)
className
- the class defined containing task delegates.
May be null, if not supplied will look for a SOAPAction header
to derive this from.methodName
- the method defined within the class, supplied by
className, to be called. May be null, if not supplied will
look for a SOAPAction header and then within the request body itself.headers
- a list of HTTP headers associated with this request. these
will be passed along to the task delegate in @SERVER;is
- InputStream to read the request fromerrorStream
- OutputStream to serialize a fault to.public javax.xml.soap.SOAPMessage postProcess(javax.xml.soap.SOAPMessage soapRequest, String className, String methodName, Hashtable headers, OutputStream errorStream)
className
- the class defined containing task delegates.
May be null, if not supplied will look for a SOAPAction header
to derive this from.methodName
- the method defined within the class, supplied by
className, to be called. May be null, if not supplied will
look for a SOAPAction header and then within the request body itself.headers
- a list of HTTP headers associated with this request. these
will be passed along to the task delegate in @SERVER;errorStream
- OutputStream to serialize a fault to.public javax.xml.soap.SOAPMessage postProcess(javax.xml.soap.SOAPMessage soapRequest, String className, String methodName, Hashtable headers, OutputStream errorStream, OutputStream streamMessageTo, Timer timer)
private javax.xml.soap.SOAPMessage postProcess(String className, String methodName, Hashtable headers, Group formGroup, IeCollection vdb, SOAPAttachmentInputStream attachIS, OutputStream errorStream, OutputStream streamMessageTo, Timer timer)
public boolean signed(javax.xml.soap.SOAPMessage request) throws Exception
Exception
private Vector getReferenceList(javax.xml.soap.SOAPElement signature, javax.xml.soap.SOAPEnvelope env) throws javax.xml.soap.SOAPException
javax.xml.soap.SOAPException
private void validSignature(javax.xml.soap.SOAPMessage request, String soapSigElementName, String sigElementName) throws Exception
Exception
private KeyStore getLocalKeyStore() throws Exception
Exception
private static void checkProxySetup()
public static boolean isProxyHost(String host)
public static String getServletProxy()
private static String getProperty(Properties props, String propName)
private static String getProperty(Properties props, String propName, String dflt)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |