Execution
The following methods are available for manipulating the execution entity using the Entity API Service.
• editExecution
Note: The following imports are required for all of the Java code examples on this page.
import java.rmi.RemoteException;
import javax.xml.rpc.ServiceException;
import com.pervasive.datasolutions.api.service.EntityAPIServiceLocator;
import com.pervasive.datasolutions.api.service.EntityAPIService;
import com.pervasive.datasolutions.api.crud.CloudAPIException;
import com.pervasive.datasolutions.api.crud.InvalidSessionException;
import com.pervasive.datasolutions.api.entity.*;
import com.pervasive.datasolutions.api.crud.*;
Tip... Use the
login method to start a session and obtain the sessionId parameter. See
Login and Logout.
startExecution
Start an execution referenced by ID.
Parameters
Example
SOAP Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:crud="http://datasolutions.pervasive.com/api/crud">
<soapenv:Header/>
<soapenv:Body>
<crud:startExecution>
<id>3dc247c2-1abb-47be-a698-788bf37339e4</id>
<sessionId>125003101223.B2F3.63B7.6FA8.469B.9FDE.30AA</sessionId>
</crud:startExecution>
</soapenv:Body>
</soapenv:Envelope>
SOAP Response
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:startExecutionResponse xmlns:ns2="http://datasolutions.pervasive.com/api/crud" xmlns:ns3="http://datasolutions.pervasive.com/api/entity"/>
</S:Body>
</S:Envelope>
Java Code Sample
final Long id = "3dc247c2-1abb-47be-a698-788bf37339e4";
final String sessionId = "125003101223.B2F3.63B7.6FA8.469B.9FDE.30AA";
EntityAPIServiceLocator service = new EntityAPIServiceLocator();
EntityAPIService stub = service.getEntityAPIPort();
stub.startExecution(id, sessionId);
listExecutions
List the executions associated with the current user and specified provisioning.
Parameters
Returns
Example
SOAP Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:crud="http://datasolutions.pervasive.com/api/crud">
<soapenv:Header/>
<soapenv:Body>
<crud:listExecutions>
<firstResult>0</firstResult>
<maxResults>110</maxResults>
<provisioningId>13172</provisioningId>
<sessionId>125003101223.B2F3.63B7.6FA8.469B.9FDE.30AA</sessionId>
</crud:listExecutions>
</soapenv:Body>
</soapenv:Envelope>
SOAP Response
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:listExecutionsResponse xmlns:ns2="http://datasolutions.pervasive.com/api/crud" xmlns:ns3="http://datasolutions.pervasive.com/api/entity">
<return id="99abc2c6-bd8e-4559-b23e-5a3fd1fd8ebb">
<owner id="171">testuser</owner>
<finishTime>2010-12-01T11:12:18.906-05:00</finishTime>
<logFile>provisioning/13172/log/99abc2c6-bd8e-4559-b23e-5a3fd1fd8ebb</logFile>
<parameters>
<parameter key="pathInfo">GetProducts</parameter>
<parameter key="rundate"/>
<parameter key="sessionID">125003101201.5CED.3CBB.B74A.46D1.976F.C27D</parameter>
<parameter key="ipp.realmID">183431896</parameter>
</parameters>
<scheduledTime>2010-12-01T11:12:10.746-05:00</scheduledTime>
<server>domU-12-31-39-0B-2A-41.compute-1.internal</server>
<startTime>2010-12-01T11:12:10.860-05:00</startTime>
</return>
<return id="88bac02f-b89c-4f1e-addf-2f3e6c5c3b14">
<owner id="171">testuser</owner>
<finishTime>2010-12-01T10:51:04.899-05:00</finishTime>
<logFile>provisioning/13172/log/88bac02f-b89c-4f1e-addf-2f3e6c5c3b14</logFile>
<parameters>
<parameter key="pathInfo">GetProducts</parameter>
<parameter key="rundate"/>
<parameter key="sessionID">125003101201.5CED.3CBB.B74A.46D1.976F.C27D</parameter>
<parameter key="ipp.realmID">183431896</parameter>
</parameters>
<scheduledTime>2010-12-01T10:50:55.408-05:00</scheduledTime>
<server>domU-12-31-39-0B-2A-41.compute-1.internal</server>
<startTime>2010-12-01T10:50:55.401-05:00</startTime>
</return>
</ns2:listExecutionsResponse>
</S:Body>
</S:Envelope>
Java Code Sample
final int firstResult = 0;
final int maxResults = 100;
final Long provisioningId = 12086;
final String sessionId = "125003101227.4253.DC58.5A73.4AC1.AED2.5687";
import java.util.List;
EntityAPIServiceLocator service = new EntityAPIServiceLocator();
EntityAPIService stub = service.getEntityAPIPort();
List<Execution> exec = stub.listExecutions(firstResult, maxResults, provisioningId, sessionId);
listExecutionsByGroup
List the executions associated with the specified group.
Parameters
Returns
Example
SOAP Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:crud="http://datasolutions.pervasive.com/api/crud">
<soapenv:Header/>
<soapenv:Body>
<crud:listExecutionsByGroup>
<firstResult>0</firstResult>
<maxResults>10</maxResults>
<id>2</id>
<sessionId>82f379ab-44e4-4d04-b0da-7c11404cfd99</sessionId>
</crud:listExecutionsByGroup>
</soapenv:Body>
</soapenv:Envelope>
SOAP Response
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:listExecutionsByGroupResponse xmlns:ns2="http://datasolutions.pervasive.com/api/crud" xmlns:ns3="http://datasolutions.pervasive.com/api/entity"/>
</S:Body>
</S:Envelope>
Java Code Sample
final int firstResult = 0;
final int maxResults = 100;
final Long id = 2;
final String sessionId = "125003101227.4253.DC58.5A73.4AC1.AED2.5687";
import java.util.List;
EntityAPIServiceLocator service = new EntityAPIServiceLocator();
EntityAPIService stub = service.getEntityAPIPort();
List<Execution> exec = stub.listExecutionsByGroup(firstResult, maxResults, id, sessionId);
findExecution
Return an execution by ID.
Parameters
Returns
Example
SOAP Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:crud="http://datasolutions.pervasive.com/api/crud">
<soapenv:Header/>
<soapenv:Body>
<crud:findExecution>
<id>3dc247c2-1abb-47be-a698-788bf37339e4</id>
<sessionId>125003101223.B2F3.63B7.6FA8.469B.9FDE.30AA</sessionId>
</crud:findExecution>
</soapenv:Body>
</soapenv:Envelope>
SOAP Response
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:findExecutionResponse xmlns:ns2="http://datasolutions.pervasive.com/api/crud" xmlns:ns3="http://datasolutions.pervasive.com/api/entity">
<return id="3dc247c2-1abb-47be-a698-788bf37339e4">
<owner id="171">testuser</owner>
<finishTime>2011-06-30T00:00:00-04:00</finishTime>
<logFile>executionlogfile_test</logFile>
<parameters>
<parameter key="testparameter">testparametervalue</parameter>
</parameters>
<scheduledTime>2010-05-14T00:00:00-04:00</scheduledTime>
<server>domU-12-31-39-0B-2A-41.compute-1.internal</server>
<startTime>2010-05-14T00:00:00-04:00</startTime>
</return>
</ns2:findExecutionResponse>
</S:Body>
</S:Envelope>
Java Code Sample
final String id = "3dc247c2-1abb-47be-a698-788bf37339e4";
final String sessionId = "125003101229.F1BE.46B1.1DA3.4544.A25F.69E8";
EntityAPIServiceLocator service = new EntityAPIServiceLocator();
EntityAPIService stub = service.getEntityAPIPort();
Execution e = stub.findExecution(id, sessionId);
createExecution
Create an execution object in preparation for job execution.
Parameters
Returns
Example
SOAP Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:crud="http://datasolutions.pervasive.com/api/crud">
<soapenv:Header/>
<soapenv:Body>
<crud:createExecution>
<execution id="40">
<owner id="171">testuser</owner>
<account>100</account>
<currentTime>2011-11-1</currentTime>
<finishTime>2011-1-1</finishTime>
<group>2</group>
<logFile>fd.log</logFile>
<parameters>
<!--Zero or more repetitions:-->
<parameter key="key1" secure="no">value1</parameter>
</parameters>
<provisioning>testprovisionig</provisioning>
<returncode>0</returncode>
<scheduledTime>0</scheduledTime>
<server>b71cf2d8-a5e8-4563-89a7-4bacdcc9c72f</server>
<startTime>2011-11-1</startTime>
<state>active</state>
</execution>
<provisioningId>12624</provisioningId>
<sessionId>6b1b4e5e-6a9a-43f0-8e19-3e569efa0dec</sessionId>
</crud:createExecution>
</soapenv:Body>
</soapenv:Envelope>
SOAP Response
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:createExecutionResponse xmlns:ns2="http://datasolutions.pervasive.com/api/crud" xmlns:ns3="http://datasolutions.pervasive.com/api/entity">
<return id="40">
<owner id="171">testuser</owner>
<account>1</account>
<currentTime>2011-11-01T12:24:00.535Z</currentTime>
<logFile>fd.log</logFile>
<parameters>
<parameter key="key1">value1</parameter>
</parameters>
<provisioning>12624</provisioning>
<returncode>0</returncode>
<scheduledTime>2011-11-01T12:24:00.503Z</scheduledTime>
<server>b71cf2d8-a5e8-4563-89a7-4bacdcc9c72f</server>
<state>active</state>
</return>
</ns2:createExecutionResponse>
</S:Body>
</S:Envelope>
Java Code Sample
final String provisioningId = 12086;
final String sessionId = "125003101229.F1BE.46B1.1DA3.4544.A25F.69E8";
import java.text.SimpleDateFormat;
EntityAPIServiceLocator service = new EntityAPIServiceLocator();
EntityAPIService stub = service.getEntityAPIPort();
Execution newExecution =new Execution();
Calendar currentTime=Calendar.getInstance();
Calendar finishTime=Calendar.getInstance();
newExecution.setCurrentTime(currentTime);
newExecution.setFinishTime(finishTime);
newExecution.setId("101");
newExecution.setLogFile("ExecutionLog.log");
newExecution.setGroup(2);
ExecutionParameter[] eparameter=new ExecutionParameter[5];
eparameter[0].setKey("Executionkey");
eparameter[0].set_value("ExecutionkeyValue");
eparameter[0].setSecure(true);
newExecution.setParameters(eparameter);
UserInfo uf=new UserInfo();
uf.setId(172);
uf.set_value("testuser");
newExecution.setOwner(uf);
newExecution.setProvisioning((long) 13172);
newExecution.setReturncode("0");
Calendar scheduledTime=Calendar.getInstance();
Calendar startTime=Calendar.getInstance();
Calendar startTime=Calendar.getInstance();
newExecution.setScheduledTime(scheduledTime);
newExecution.setServer("domU-12-31-39-0B-2A-41.compute-1.internal");
newExecution.setStartTime(startTime);
newExecution.setState("active");
newExecution.setZkNode("zknod");
Execution e = stub.createExecution(newExecution, provisioningId, sessionId);
editExecution
Edit an execution object that has not yet been started.
Parameters
Example
SOAP Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:crud="http://datasolutions.pervasive.com/api/crud">
<soapenv:Header/>
<soapenv:Body>
<crud:editExecution>
<execution id="40">
<owner id="171">testuser</owner>
<account>100</account>
<currentTime>2011-11-1</currentTime>
<finishTime>2011-1-1</finishTime>
<group>2</group>
<logFile>fd.log</logFile>
<parameters>
<!--Zero or more repetitions:-->
<parameter key="myExecParamKey" secure="no">myExecParamValue</parameter>
</parameters>
<provisioning>testprovisionig</provisioning>
<returncode>0</returncode>
<scheduledTime>0</scheduledTime>
<server>b71cf2d8-a5e8-4563-89a7-4bacdcc9c72f</server>
<startTime>2011-11-1</startTime>
<state>active</state>
</execution>
<sessionId>82f379ab-44e4-4d04-b0da-7c11404cfd99</sessionId>
</crud:editExecution>
</soapenv:Body>
</soapenv:Envelope>
SOAP Response
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:editExecutionResponse xmlns:ns2="http://datasolutions.pervasive.com/api/crud" xmlns:ns3="http://datasolutions.pervasive.com/api/entity"/>
</S:Body>
</S:Envelope>
Java Code Sample
final String sessionId = "125003110103.42D1.3564.C437.4893.9EEB.686A";
EntityAPIServiceLocator service = new EntityAPIServiceLocator();
com.pervasive.datasolutions.api.crud.EntityAPIService stub = service.getEntityAPIPort();
Execution editedExec = new Execution();
Calendar currentTime = Calendar.getInstance();
Calendar finishTime = Calendar.getInstance();
editedExec.setCurrentTime(currentTime);
editedExec.setFinishTime(finishTime);
editedExec.setId("101");
editedExec.setLogFile("ExecutionLog.log");
e.setGroup(2);
ExecutionParameter[] eparameter=new ExecutionParameter[5];
eparameter[0].setKey("Executionkey");
eparameter[0].set_value("ExecutionkeyValue");
eparameter[0].setSecure(true);
editedExec.setParameters(eparameter);
UserInfo uf=new UserInfo();
uf.setId(172);
uf.set_value("testuser");
editedExec.setOwner(uf);
editedExec.setProvisioning((long) 13172);
editedExec.setReturncode("0");
Calendar scheduledTime=Calendar.getInstance();
Calendar startTime=Calendar.getInstance();
Calendar startTi,me=Calendar.getInstance();
editedExec.setScheduledTime(scheduledTime);
editedExec.setServer("domU-12-31-39-0B-2A-41.compute-1.internal");
editedExec.setStartTime(startTime);
editedExec.setState("active");
editedExec.setZkNode("zknod");
stub.editExecution(editedExec, sessionId);
deleteExecution
Delete an execution specified by ID.
Note: Executions can only be deleted if they have not yet been started.
Parameters
Example
SOAP Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:crud="http://datasolutions.pervasive.com/api/crud">
<soapenv:Header/>
<soapenv:Body>
<crud:deleteExecution>
<id>3dc247c2-1abb-47be-a698-788bf37339e4</id>
<sessionId>125003101227.4253.DC58.5A73.4AC1.AED2.5687</sessionId>
</crud:deleteExecution>
</soapenv:Body>
</soapenv:Envelope>
SOAP Response
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:deleteExecutionResponse xmlns:ns2="http://datasolutions.pervasive.com/api/crud" xmlns:ns3="http://datasolutions.pervasive.com/api/entity"/>
</S:Body>
</S:Envelope>
Java Code Sample
final String id = "3dc247c2-1abb-47be-a698-788bf37339e4";
final String sessionId = "125003101227.4253.DC58.5A73.4AC1.AED2.5687";
EntityAPIServiceLocator service = new EntityAPIServiceLocator();
EntityAPIService stub = service.getEntityAPIPort();
stub.deleteExecution(id, sessionId);
getExecutionCount
Count the executions associated with the current user and specified provisioning.
Parameters
Returns
Example
SOAP Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:crud="http://datasolutions.pervasive.com/api/crud">
<soapenv:Header/>
<soapenv:Body>
<crud:getExecutionCount>
<provisioningId>12086</provisioningId>
<sessionId>125003101222.7BEA.3DC4.0FDA.41CC.93F0.B130</sessionId>
</crud:getExecutionCount>
</soapenv:Body>
</soapenv:Envelope>
SOAP Response
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:getExecutionCountResponse xmlns:ns2="http://datasolutions.pervasive.com/api/crud" xmlns:ns3="http://datasolutions.pervasive.com/api/entity">
<return>5</return>
</ns2:getExecutionCountResponse>
</S:Body>
</S:Envelope>
Java Code Sample
final Long provisioningId = 12086;
final String sessionId = "125003101222.7BEA.3DC4.0FDA.41CC.93F0.B130";
EntityAPIServiceLocator service = new EntityAPIServiceLocator();
EntityAPIService stub = service.getEntityAPIPort();
Long Count=stub.getExecutionCount(provisioningId, sessionId);
getExecutionParameter
Return the value of a parameter associated with a specified execution.
Parameters
Returns
Example
SOAP Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:crud="http://datasolutions.pervasive.com/api/crud">
<soapenv:Header/>
<soapenv:Body>
<crud:getExecutionParameter>
<id>3dc247c2-1abb-47be-a698-788bf37339e4</id>
<key>ParameterKey</key>
<sessionId>125003101223.B2F3.63B7.6FA8.469B.9FDE.30AA</sessionId>
</crud:getExecutionParameter>
</soapenv:Body>
</soapenv:Envelope>
SOAP Response
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:getExecutionParameterResponse xmlns:ns2="http://datasolutions.pervasive.com/api/crud" xmlns:ns3="http://datasolutions.pervasive.com/api/entity">
<return>Execution Parameter Value</return>
</ns2:getExecutionParameterResponse>
</S:Body>
</S:Envelope>
Java Code Sample
final String id = "3dc247c2-1abb-47be-a698-788bf37339e4";
final String key = "Key";
final String sessionId = "125003101223.B2F3.63B7.6FA8.469B.9FDE.30AA";
EntityAPIServiceLocator service = new EntityAPIServiceLocator();
EntityAPIService stub = service.getEntityAPIPort();
String ParameterValue=stub.getExecutionParameter(id, key, sessionId);
putExecutionParameter
Store a key/pair value associated with a specified execution.
Parameters
Returns
Example
SOAP Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:crud="http://datasolutions.pervasive.com/api/crud">
<soapenv:Header/>
<soapenv:Body>
<crud:putExecutionParameter>
<id>3dc247c2-1abb-47be-a698-788bf37339e4</id>
<key>Execution Parameter Key</key>
<value>Execution Parameter Value</value>
<sessionId>125003101223.B2F3.63B7.6FA8.469B.9FDE.30AA</sessionId>
</crud:putExecutionParameter>
</soapenv:Body>
</soapenv:Envelope>
SOAP Response
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:putExecutionParameterResponse xmlns:ns2="http://datasolutions.pervasive.com/api/crud" xmlns:ns3="http://datasolutions.pervasive.com/api/entity"/>
</S:Body>
</S:Envelope>
Java Code Sample
final String id = "3dc247c2-1abb-47be-a698-788bf37339e4";
final String key = "Key";
final String value = "Value";
final String sessionId = "125003101223.B2F3.63B7.6FA8.469B.9FDE.30AA";
EntityAPIServiceLocator service = new EntityAPIServiceLocator();
EntityAPIService stub = service.getEntityAPIPort();
String ExecutionParameter=stub.putExecutionParameter(id, key, value, sessionId);
removeExecutionParameter
Remove a parameter from a specified execution.
Parameters
Returns
Example
SOAP Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:crud="http://datasolutions.pervasive.com/api/crud">
<soapenv:Header/>
<soapenv:Body>
<crud:removeExecutionParameter>
<id>3dc247c2-1abb-47be-a698-788bf37339e4</id>
<key>Execution Parameter Key</key>
<sessionId>125003101223.B2F3.63B7.6FA8.469B.9FDE.30AA</sessionId>
</crud:removeExecutionParameter>
</soapenv:Body>
</soapenv:Envelope>
SOAP Response
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:removeExecutionParameterResponse xmlns:ns2="http://datasolutions.pervasive.com/api/crud" xmlns:ns3="http://datasolutions.pervasive.com/api/entity">
<return>Execution Parameter Value</return>
</ns2:removeExecutionParameterResponse>
</S:Body>
</S:Envelope>
Java Code Sample
final String id = "3dc247c2-1abb-47be-a698-788bf37339e4";
final String key = "Key";
final String sessionId = "125003101223.B2F3.63B7.6FA8.469B.9FDE.30AA";
EntityAPIServiceLocator service = new EntityAPIServiceLocator();
EntityAPIService stub = service.getEntityAPIPort();
String ExecutionParameter=stub.removeExecutionParameter(id, key, sessionId);
listExecutionFiles
List files associated with a specified execution.
Parameters
Returns
Example
SOAP Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:crud="http://datasolutions.pervasive.com/api/crud">
<soapenv:Header/>
<soapenv:Body>
<crud:listExecutionFiles>
<executionId>3dc247c2-1abb-47be-a698-788bf37339e4</executionId>
<sessionId>125003101223.B2F3.63B7.6FA8.469B.9FDE.30AA</sessionId>
</crud:listExecutionFiles>
</soapenv:Body>
</soapenv:Envelope>
SOAP Response
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:listExecutionFilesResponse xmlns:ns2="http://datasolutions.pervasive.com/api/crud" xmlns:ns3="http://datasolutions.pervasive.com/api/entity">
<return>TestExecutionFile1</return>
<return>TestExecutionFile2</return>
</ns2:listExecutionFilesResponse>
</S:Body>
</S:Envelope>
Java Code Sample
final String executionId = "3dc247c2-1abb-47be-a698-788bf37339e4";
final String sessionId = "125003101223.B2F3.63B7.6FA8.469B.9FDE.30AA";
import java.util.List;
EntityAPIServiceLocator service = new EntityAPIServiceLocator();
EntityAPIService stub = service.getEntityAPIPort();
List <String> ExecutionFiles=stub.listExecutionFiles(executionId, sessionId);
getExecutionFile
Download a file associated with an execution.
Parameters
Returns
Example
SOAP Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:crud="http://datasolutions.pervasive.com/api/crud">
<soapenv:Header/>
<soapenv:Body>
<crud:getExecutionFile>
<executionId>3dc247c2-1abb-47be-a698-788bf37339e4</executionId>
<filename>TestExecutionFile</filename>
<sessionId>125003101223.B2F3.63B7.6FA8.469B.9FDE.30AA</sessionId>
</crud:getExecutionFile>
</soapenv:Body>
</soapenv:Envelope>
SOAP Response
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:getExecutionFileResponse xmlns:ns2="http://datasolutions.pervasive.com/api/crud" xmlns:ns3="http://datasolutions.pervasive.com/api/entity">
<return>cid630100221</return>
</ns2:getExecutionFileResponse>
</S:Body>
</S:Envelope>
Java Code Sample
final String executionId = "3dc247c2-1abb-47be-a698-788bf37339e4";
final String filename = "TestExecutionFile";
final String sessionId = "125003101223.B2F3.63B7.6FA8.469B.9FDE.30AA";
import javax.activation.DataHandler;
EntityAPIServiceLocator service = new EntityAPIServiceLocator();
EntityAPIService stub = service.getEntityAPIPort();
DataHandler fileHandlr = null;
fileHandlr = stub.getExecutionFile(executionId, filename, sesisonId);
putExecutionFile
Upload a file associated with an execution.
Parameters
Returns
Example
SOAP Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:crud="http://datasolutions.pervasive.com/api/crud">
<soapenv:Header/>
<soapenv:Body>
<crud:putExecutionFile>
<executionId>3dc247c2-1abb-47be-a698-788bf37339e4</executionId>
<filename>TestExecutionFile</filename>
<data>cid:630100221060</data>
<sessionId>125003101223.B2F3.63B7.6FA8.469B.9FDE.30AA</sessionId>
</crud:putExecutionFile>
</soapenv:Body>
</soapenv:Envelope>
SOAP Response
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:putExecutionFileResponse xmlns:ns2="http://datasolutions.pervasive.com/api/crud" xmlns:ns3="http://datasolutions.pervasive.com/api/entity">
<return>9</return>
</ns2:putExecutionFileResponse>
</S:Body>
</S:Envelope>
Java Code Sample
final String executionId = "3dc247c2-1abb-47be-a698-788bf37339e4";
final String filename = "TestExecutionFile";
final String sessionId = "125003101223.B2F3.63B7.6FA8.469B.9FDE.30AA";
import javax.activation.DataHandler;
import javax.activation.DataSource;
EntityAPIServiceLocator service = new EntityAPIServiceLocator();
EntityAPIService stub = service.getEntityAPIPort();
Long size = 0L;
InputStream in= new FileInputStream("InputStreamToFile.txt");
DataSource dataSource = new DataSource() {
@Override
public InputStream getInputStream() throws IOException {
return in;
}
@Override
public OutputStream getOutputStream() throws IOException {
return null;
}
@Override
public String getContentType() {
return "application/octet-stream";
}
@Override
public String getName() {
return filename;
}
};
DataHandler dataHandler = new DataHandler(dataSource);
size = stub.putExecutionFile(executionId, filename, dataHandler, sessionId);
deleteExecutionFile
Delete a file associated with an execution.
Parameters
Returns
Example
SOAP Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:crud="http://datasolutions.pervasive.com/api/crud">
<soapenv:Header/>
<soapenv:Body>
<crud:deleteExecutionFile>
<executionId>3dc247c2-1abb-47be-a698-788bf37339e4</executionId>
<filename>TestExecutionFile</filename>
<sessionId>125003101223.B2F3.63B7.6FA8.469B.9FDE.30AA</sessionId>
</crud:deleteExecutionFile>
</soapenv:Body>
</soapenv:Envelope>
SOAP Response
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:deleteExecutionFileResponse xmlns:ns2="http://datasolutions.pervasive.com/api/crud" xmlns:ns3="http://datasolutions.pervasive.com/api/entity">
<return>10</return>
</ns2:deleteExecutionFileResponse>
</S:Body>
</S:Envelope>
Java Code Sample
final String executionId = "3dc247c2-1abb-47be-a698-788bf37339e4";
final String filename = "TestExecutionFile";
final String sessionId = "125003101223.B2F3.63B7.6FA8.469B.9FDE.30AA";
EntityAPIServiceLocator service = new EntityAPIServiceLocator();
EntityAPIService stub = service.getEntityAPIPort();
Long deletedbytes=stub.deleteExecutionFile(executionId, filename, sessionId);