|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.bowstreet.builders.webapp.methods.ServiceCallMethods
public class ServiceCallMethods
This is the LJO for the WebApp ServiceCall. To invoke the ServiceCall in the webapp (if the ServiceCall builder name is ws): webAppAccess.callMethod("ws.invoke"); Setters on the LJO populate the requestVariable object which is a ServiceCallMethodsData object that the builder regen set up. This is 'cos this LJO is created at regen time so one instance is shared by everyone so we cannot keep state in here. The reply populates the replyVariable and the replyStatusVariable. The developer should not know about the replyStatusVariable or the requestVariable, access to those objects should be through this LJO.
Field Summary | |
---|---|
static java.lang.String |
HTTP_REQUEST
|
static java.lang.String |
LOCAL_REQUEST
|
static java.lang.String |
SOAP_REQUEST
|
Constructor Summary | |
---|---|
ServiceCallMethods()
|
Method Summary | |
---|---|
java.util.List |
getCookies()
Return unparsed List of response cookie strings (unparsed meaning they may have the form "name=val; path=/; domain=foo") |
java.lang.String |
getCookieValue(WebAppAccess webAppAccess,
java.lang.String getCookieName)
|
java.lang.String |
getRequestEnvelope()
|
java.lang.String |
getResponseContentType(WebAppAccess webAppAccess)
|
java.lang.String |
getResponseEnvelope()
|
void |
init(WebAppAccess webapp,
java.lang.String dataVariableName,
java.lang.String replyVariableName,
java.lang.String replyHeadersVariableName)
Picks up the builder-specific data from the variables whose names are passed in, and populates the instance data in this ServiceCallMethods object. |
java.lang.Object |
invoke(WebAppAccess webapp)
Issues the service call based on the data in the instance variables. |
java.lang.Object |
invokeInternal(WebAppAccess webapp)
This method should never be called directly. |
void |
setAddHtmlDocumentWrapper(boolean b)
Overrides the indicator set in the builder inputs to add a htmlDocument wrapper element. |
void |
setForceStringReturnToIXML(boolean b)
Forces a xsd:string reply to be treated as XML. |
void |
setLogLevel(java.lang.String level)
Overrides the level set in the builder inputs. |
void |
setStubResult(java.lang.String s)
Overrides the indicator set in the builder inputs to set a dummy reply. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String HTTP_REQUEST
public static final java.lang.String LOCAL_REQUEST
public static final java.lang.String SOAP_REQUEST
Constructor Detail |
---|
public ServiceCallMethods()
Method Detail |
---|
public java.util.List getCookies()
public java.lang.String getCookieValue(WebAppAccess webAppAccess, java.lang.String getCookieName)
public java.lang.String getRequestEnvelope()
public java.lang.String getResponseContentType(WebAppAccess webAppAccess)
public java.lang.String getResponseEnvelope()
public void init(WebAppAccess webapp, java.lang.String dataVariableName, java.lang.String replyVariableName, java.lang.String replyHeadersVariableName)
webapp
- the WebApp instance we're associated withdataVariableName
- the name of the variable in the webapp that
holds a ServiceCallMethodsData object holding the builderinputsreplyVariableName
- the name of the variable into which we will
pass a reference to the data coming back from thereplyHeadersVariableName
- name of the var to save response hdrs in
invoke
method.public java.lang.Object invoke(WebAppAccess webapp) throws java.lang.ClassNotFoundException, java.net.MalformedURLException, java.net.UnknownHostException, com.bowstreet.util.parser.ParserException, java.io.IOException, java.lang.Exception
webapp
- the webapp instance from which we're being invoked
java.lang.ClassNotFoundException
- if the class specified for an
argument is invalid
java.net.MalformedURLException
- if the supplied URL is invalid
java.net.UnknownHostException
- if the supplied URL is invalid
com.bowstreet.util.parser.ParserException
- if the response HTML is malformed
java.io.IOException
- is the response HTML is invalid
java.lang.Exception
- if a SOAP failure occurredpublic java.lang.Object invokeInternal(WebAppAccess webapp)
webapp
- the webapp instance from which we're being invoked
public void setAddHtmlDocumentWrapper(boolean b)
b
- true/false indicator to enable/disable logging of the request
and response.public void setForceStringReturnToIXML(boolean b)
b
- true/false indicator to set/unset this behaviour.public void setLogLevel(java.lang.String level)
level
- public void setStubResult(java.lang.String s)
s
- the dummy response to return
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |