@PermitAll public class WsServiceBean extends com.whitestein.lsps.common.SecureAndLoggingService implements WsServiceLocal, WsServiceRemote
WsService
interface.Constructor and Description |
---|
WsServiceBean()
Creates new instance.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Long |
addWsRequestHandler(WsRequestHandler handler)
Adds new
WsRequestHandler object to persistent storage and returns its id. |
WsRequestHandlerList |
findWsRequestHandlers(WsRequestHandlerCriteria criteria)
Finds all
WsRequestHandler objects which conforms the search criteria. |
java.lang.String |
getWsdl(java.lang.String moduleName,
java.lang.String wsdlName)
Returns wsdl file for the name.
|
WsRequestHandler |
getWsRequestHandler(long id)
Retrieves
WsRequestHandler object with given id from persistent storage |
java.lang.String |
getXsd(java.lang.String moduleName,
java.lang.String name)
Returns xsd file for the name.
|
void |
markTimedOut(long id)
Mark
WsRequestHandler object with given id as timed out. |
RestRequestHandlingInfo |
selectRestRequestHandler(java.lang.String resourcePath,
java.lang.String method)
Selects a REST resource request handler for the request.
|
void |
sendRequest(long wsRequestHandlerId,
java.lang.String request,
StringProperties requestHeaders)
Sends web service request.
|
void |
sendRestRequest(long requestHandlerId,
java.lang.String content,
java.lang.String responseContentType,
java.util.Map<java.lang.String,java.lang.String> requestHeaders,
java.util.Map<java.lang.String,java.lang.String> requestParams,
java.util.Map<java.lang.String,java.lang.String> pathParams)
Sends a REST web service request.
|
boolean |
waitingRestRequestHandlerExists(java.lang.String path)
Tells whether or not a rest resource handler exists for the path regardless
of the HTTP method.
|
@RightsAllowed(value={"Webservice:Read","Webservice:Invoke"}) public WsRequestHandlerList findWsRequestHandlers(WsRequestHandlerCriteria criteria)
WsService
WsRequestHandler
objects which conforms the search criteria. Returned
waiting points doesn't have filled identifier, response and request fieldsfindWsRequestHandlers
in interface WsService
criteria
- search criteria@RightsAllowed(value="Webservice:Read") public WsRequestHandler getWsRequestHandler(long id)
WsService
WsRequestHandler
object with given id from persistent storagegetWsRequestHandler
in interface WsService
id
- id of object to be retrievedWsRequestHandler
object with given id from persistence storage@RightsAllowed(value="Webservice:Invoke") public void sendRequest(long wsRequestHandlerId, java.lang.String request, StringProperties requestHeaders) throws WsRequestHandlerNotFoundException
WsServiceLocal
sendRequest
in interface WsServiceLocal
request
- request that should be set as field valuerequestHeaders
- headers sent with requestWsRequestHandlerNotFoundException
@RightsAllowed(value="Webservice:Invoke") public void markTimedOut(long id) throws WsRequestHandlerNotFoundException
WsService
WsRequestHandler
object with given id as timed out.markTimedOut
in interface WsService
id
- id of target objectWsRequestHandlerNotFoundException
@RightsAllowed(value="Webservice:Invoke") public java.lang.Long addWsRequestHandler(WsRequestHandler handler)
WsService
WsRequestHandler
object to persistent storage and returns its id.addWsRequestHandler
in interface WsService
handler
- new object@RightsAllowed(value="Webservice:Invoke") public java.lang.String getWsdl(java.lang.String moduleName, java.lang.String wsdlName)
WsService
@RightsAllowed(value="Webservice:Invoke") public java.lang.String getXsd(java.lang.String moduleName, java.lang.String name)
WsService
public RestRequestHandlingInfo selectRestRequestHandler(java.lang.String resourcePath, java.lang.String method)
WsServiceLocal
selectRestRequestHandler
in interface WsServiceLocal
resourcePath
- the resource pathmethod
- the HTTP method usednull
.public boolean waitingRestRequestHandlerExists(java.lang.String path)
WsServiceLocal
waitingRestRequestHandlerExists
in interface WsServiceLocal
path
- the path to checktrue
if there is a resource handler for the path;
false
otherwise.public void sendRestRequest(long requestHandlerId, java.lang.String content, java.lang.String responseContentType, java.util.Map<java.lang.String,java.lang.String> requestHeaders, java.util.Map<java.lang.String,java.lang.String> requestParams, java.util.Map<java.lang.String,java.lang.String> pathParams) throws RestRequestHandlerNotFoundException
WsServiceLocal
sendRestRequest
in interface WsServiceLocal
responseContentType
- the content type of the responseRestRequestHandlerNotFoundException
Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.