@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 |
---|---|
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. |
String |
getWsdl(String moduleName,
String wsdlName)
Returns wsdl file for the name.
|
WsRequestHandler |
getWsRequestHandler(long id)
Retrieves
WsRequestHandler object with given id from persistent storage |
String |
getXsd(String moduleName,
String name)
Returns xsd file for the name.
|
void |
markTimedOut(long id)
Mark
WsRequestHandler object with given id as timed out. |
RestRequestHandlingInfo |
selectRestRequestHandler(String resourcePath,
String method)
Selects a REST resource request handler for the request.
|
void |
sendRequest(long wsRequestHandlerId,
String request,
StringProperties requestHeaders)
Sends web service request.
|
void |
sendRestRequest(long requestHandlerId,
String content,
String responseContentType,
Map<String,String> requestHeaders,
Map<String,String> requestParams,
Map<String,String> pathParams)
Sends a REST web service request.
|
boolean |
waitingRestRequestHandlerExists(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, 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 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 String getWsdl(String moduleName, String wsdlName)
WsService
@RightsAllowed(value="Webservice:Invoke") public String getXsd(String moduleName, String name)
WsService
public RestRequestHandlingInfo selectRestRequestHandler(String resourcePath, String method)
WsServiceLocal
selectRestRequestHandler
in interface WsServiceLocal
resourcePath
- the resource pathmethod
- the HTTP method usednull
.public boolean waitingRestRequestHandlerExists(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, String content, String responseContentType, Map<String,String> requestHeaders, Map<String,String> requestParams, Map<String,String> pathParams) throws RestRequestHandlerNotFoundException
WsServiceLocal
sendRestRequest
in interface WsServiceLocal
responseContentType
- the content type of the responseRestRequestHandlerNotFoundException
Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.