The following web services are used to manage the cache, which provides in-memory storage and management of data.
This web service removes a specified Geopack from the Geopack cache. Note, however, that it does not delete the Geopack from the server.
Request Parameters
The following parameters should be passed with this request:
Request Element | Data Type | Description |
---|---|---|
LoginId | String | An admin account to connect to Yellowfin web services. This can be the user ID or the email address, depending on the Logon ID method. This account must have the “web services” role enabled, and must belong to the default (i.e. primary) org. |
Password | String | Password of the above account. |
OrgId | Integer | Default (i.e. primary) organization ID within Yellowfin. Always set this to 1. |
Function | String | Web service function. Set this to "DELGEOPACK". |
OrgRef | String | This optional parameter can be used to specify a client org. ID |
Parameters | String | Use this to specify the UUID of the geopack to be deleted from the cache. |
Request Example
Below is a SOAP XML example for this request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://webservices.web.mi.hof.com/"> <soapenv:Header/> <soapenv:Body> <web:remoteAdministrationCall> <arg0> <loginId>admin@yellowfin.com.au</loginId> <password>test</password> <orgId>1</orgId> <function>DELGEOPACK</function> <parameters> <string>db1cf6f7-3561-45a0-b6bc-ff7b94117741</string> </parameters> </arg0> </web:remoteAdministrationCall> </soapenv:Body> </soapenv:Envelope>
Response Parameters
The returned response will contain these parameters:
Response Element | Data Type | Description |
---|---|---|
StatusCode | String | Status of the web service call. Possible values include:
|
Response Example
The service will return the below response, according to our SOAP example:
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <ns2:remoteAdministrationCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/"> <return> <errorCode>0</errorCode> <messages>Successfully Authenticated User: admin@yellowfin.com.au</messages> <messages>Web Service Request Complete</messages> <sessionId>9a3871407a758998334a2d780c44f9ae</sessionId> <statusCode>SUCCESS</statusCode> </return> </ns2:remoteAdministrationCallResponse> </S:Body> </S:Envelope>
Instructions
See below for step-by-step instructions on how to perform this call, using a Java example:
Define the request for this function, which includes logging in as the admin user and specifying the web service call to perform:
rsr.setLoginId("admin@yellowfin.com.au"); rsr.setPassword("test"); rsr.setOrgId(new Integer(1)); rsr.setFunction("DELGEOPACK");
Specify which geopack to remove from the cache, by providing its UUID through a Parameters element:
rsr.setParameters(new String[] { "db1cf6f7-3561-45a0-b6bc-ff7b94117741" } );
Once the request is configured, perform the call:
AdministrationServiceResponse rs = null; rs = rssbs.remoteAdministrationCall(rsr);
Initialize the Administration web service. Click here to learn how to do this.
The response will contain the following elements: StatusCode and ContentResource. (See details in the Response Parameters table above.)
Complete Example
Below is a full example of this web service call. To use it for yourself, carry out the following the steps:
- Copy the code and save it as ws_ delgeopack.jsp.
- Put the file in the root folder: Yellowfin/appserver/webapps/ROOT.
- Adjust the host, port, and admin user details according to your environment.
- Run http://<host>:<port>/ws_ delgeopack.jsp from your Internet browser.
<% /* ws_delgeopack.jsp */ %> <%@ page language="java" contentType="text/html; charset=UTF-8" %> <%@ page import="com.hof.util.*, java.util.*, java.text.*" %> <%@ page import="com.hof.web.form.*" %> <%@ page import="com.hof.mi.web.service.*" %> <% AdministrationServiceResponse rs = null; AdministrationServiceRequest rsr = new AdministrationServiceRequest(); AdministrationServiceService ts = new AdministrationServiceServiceLocator("localhost", 8080, "/services/AdministrationService", false); AdministrationServiceSoapBindingStub rssbs = (AdministrationServiceSoapBindingStub) ts.getAdministrationService(); rsr.setLoginId("admin@yellowfin.com.au"); rsr.setPassword("test"); rsr.setOrgId(new Integer(1)); rsr.setFunction("DELGEOPACK"); rsr.setParameters(new String[] { "db1cf6f7-3561-45a0-b6bc-ff7b94117741" } ); rs = rssbs.remoteAdministrationCall(rsr); if ("SUCCESS".equals(rs.getStatusCode())) { out.write("Success"); } else { out.write("Failure"); out.write(rs.toString()); }