Report2Web Web Services
ICatalog
CreateFolder
You create a Process Definition of type RedwoodScript with the following parameters and source:
Parameter | Description | Example Value |
---|---|---|
ServiceURL | The URL to the WebService | http://archive.example.com:8080/archive-server/services/ICatalog |
Username | The username for authentication | systemsuperadmin |
Password | The password of the user. Set the Password property of this parameter to hide its value in the user interface |
|
Catalog | The catalog to use | Production |
ParentFolder | The parent folder where you want to create the folder |
|
FolderName | The name of the folder to create |
|
Example Process Definition Source
Copy
package custom.ws;
import java.net.*;
import java.io.*;
import com.redwood.scheduler.api.soap.SOAP;
import com.redwood.scheduler.api.soap.SOAPRequest;
public class SOAP_ICatalog_createFolder
extends SOAP_ICatalog_createFolderStub
{
public void execute()
throws Exception
{
String message = "<SOAP-ENV:Envelope xmlns:tns1=\"http://faults.webservice.wachabe.redwood\" xmlns:apachesoap=\"http://xml.apache.org/xml-soap\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:SOAP-ENC=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:wsdlsoap=\"http://schemas.xmlsoap.org/wsdl/soap/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:wsdl=\"http://schemas.xmlsoap.org/wsdl/\" xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:intf=\"urn:webservice.wachabe.redwood\" xmlns:tns2=\"http://types.webservice.wachabe.redwood\" SOAP-ENV:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\">\n"
+ " <SOAP-ENV:Header>\n"
+ " </SOAP-ENV:Header>\n"
+ " <SOAP-ENV:Body>\n"
+ "<intf:createFolder SOAP-ENV:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\">\n"
+ " <in0>" + SOAP.escapeXML10(Username) + "</in0>\n"
+ " <in1>" + SOAP.escapeXML10(Password) + "</in1>\n"
+ " <in2>" + SOAP.escapeXML10(Catalog) + "</in2>\n"
+ " <in3>" + SOAP.escapeXML10(ParentFolder) + "</in3>\n"
+ " <in4>" + SOAP.escapeXML10(FolderName) + "</in4>\n"
+ "</intf:createFolder>"
+ " </SOAP-ENV:Body>\n"
+ "</SOAP-ENV:Envelope>\n"
+ "";
String answer = null;
try
{
SOAPRequest req = SOAP.createSOAPRequestFromJob();
StringBuffer sb = new StringBuffer();
sb.append(message);
req.setURL(ServiceURL);
req.setSOAPAction("\"\"");
jcsErrLog.debug(sb.toString());
req.setRequest(sb.toString());
req.send();
answer = req.getResponseXML();
if (answer != null)
{
answer = SOAP.formatXML(req.getResponseXML());
jcsErrLog.debug(answer);
}
else
{
answer = "There is no response for this request.";
jcsErrLog.debug(answer);
}
}
catch (Exception e)
{
jcsErr.println("Request: " + message);
jcsErr.println(e.getMessage());
throw e;
}
jcsOut.println("Request:");
jcsOut.println(message);
jcsOut.println("Response:");
jcsOut.println(answer);
}
private static String getArrayValues(final String tag, final String[] __pArr)
{
final StringBuffer buffer = new StringBuffer();
for (int i = 0; i < __pArr.length; i++)
{
buffer.append('<').append(tag).append('>');
if (__pArr[i] != null)
{
buffer.append(SOAP.escapeXML10(__pArr[i]));
}
buffer.append('<').append('/').append(tag).append('>').append('\n');
}
return buffer.toString();
}
}
Example SOAP envelope:
Copy
<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:intf="urn:webservice.wachabe.redwood">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<urn:createFolder SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<in0 xsi:type="xsd:string">admin</in0>
<in1 xsi:type="xsd:string">admin</in1>
<in2 xsi:type="xsd:string">Enterprise</in2>
<in3 xsi:type="xsd:string">/</in3>
<in4 xsi:type="xsd:string">Test</in4>
</urn:createFolder>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
deleteWorkArea
Parameter | Description | Example Value |
---|---|---|
ServiceURL | The URL to the WebService | http://archive.example.com:8080/archive-server/services/ICatalog |
Username | The username for authentication | systemsuperadmin |
Password | The password of the user. Set the Password property of this parameter to hide its value in the user interface |
|
Catalog | The catalog to use | Production |
WorkAreaId | The ID of the work area | 0 |
Example SOAP envelope:
Copy
<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:intf="urn:webservice.wachabe.redwood">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<urn:deleteWorkArea SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<in0 xsi:type="xsd:string">admin</in0>
<in1 xsi:type="xsd:string">admin</in1>
<in2 xsi:type="xsd:string">Enterprise</in2>
<in3 xsi:type="xsd:int">0</in3>
</urn:deleteWorkArea>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
getCatalogList
Example SOAP envelope:
Copy
<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:intf="urn:webservice.wachabe.redwood">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<urn:getCatalogList SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
getCatalogListForUser
Parameter | Description | Example Value |
---|---|---|
ServiceURL | The URL to the WebService | http://archive.example.com:8080/archive-server/services/ICatalog |
Username | The catalog list list to retrieve for user | systemsuperadmin |
Example SOAP envelope:
Copy
<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:intf="urn:webservice.wachabe.redwood">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<urn:getCatalogListForUser SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<username xsi:type="xsd:string">admin</username>
</urn:getCatalogListForUser>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
getFile
Parameter | Description | Example Value |
---|---|---|
ServiceURL | The URL to the WebService | http://archive.example.com:8080/archive-server/services/ICatalog |
Username | The username for authentication | systemsuperadmin |
Password | The password of the user. Set the Password property of this parameter to hide its value in the user interface |
|
Catalog | The catalog to use | Production |
FilePath | The path of the file | /Production/System Reports/System Reports for Enterprise.pdf |
Targetlocation | the target location of the file. | /Production/System Reports |
getFolder
This web service is used to test access to a folder.
Parameter | Description | Example Value |
---|---|---|
username | The username for authentication | systemsuperadmin |
password | The password of the user. Set the Password property of this parameter to hide its value in the user interface |
|
catalog | The catalog to use | Production |
folderpath | The path to the folder | / or /Processes |
Example SOAP envelope:
Copy
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:webservice.wachabe.redwood">
<soapenv:Header/>
<soapenv:Body>
<urn:getFolder soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<username xsi:type="xsd:string">?</username>
<password xsi:type="xsd:string">?</password>
<catalog xsi:type="xsd:string">?</catalog>
<folderpath xsi:type="xsd:string">?</folderpath>
</urn:getFolder>
</soapenv:Body>
</soapenv:Envelope>
getFormats
Parameter | Description | Example Value |
---|---|---|
in0 | The username for authentication | systemsuperadmin |
in1 | The password of the user. Set the Password property of this parameter to hide its value in the user interface |
|
in2 | The catalog to use | Production |
Example SOAP envelope:
Copy
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:webservice.wachabe.redwood">
<soapenv:Header/>
<soapenv:Body>
<urn:getFormats soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<in0 xsi:type="xsd:string">?</in0>
<in1 xsi:type="xsd:string">?</in1>
<in2 xsi:type="xsd:string">?</in2>
</urn:getFormats>
</soapenv:Body>
</soapenv:Envelope>
getSubFolderList
Parameter | Description | Example Value |
---|---|---|
in0 | The username for authentication | systemsuperadmin |
in1 | The password of the user. Set the Password property of this parameter to hide its value in the user interface |
|
in2 | The catalog to use | Production |
in3 | The path to the folder | / or /Processes |
Example SOAP envelope:
Copy
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:webservice.wachabe.redwood">
<soapenv:Header/>
<soapenv:Body>
<urn:getSubFolderList soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<in0 xsi:type="xsd:string">?</in0>
<in1 xsi:type="xsd:string">?</in1>
<in2 xsi:type="xsd:string">?</in2>
<in3 xsi:type="xsd:string">?</in3>
</urn:getSubFolderList>
</soapenv:Body>
</soapenv:Envelope>
getWorkArea
Parameter | Description | Example Value |
---|---|---|
ServiceURL | The URL to the WebService | http://archive.example.com:8080/archive-server/services/ICatalog |
Username | The username for authentication | systemsuperadmin |
Password | The password of the user. Set the Password property of this parameter to hide its value in the user interface |
|
Catalog | The catalog to use | Production |
Description | The description of the work area | Publish Finance Reports |
Example Process Definition Source:
Copy
package custom.ws;
import java.net.*;
import java.io.*;
import com.redwood.scheduler.api.soap.SOAP;
import com.redwood.scheduler.api.soap.SOAPRequest;
public class SOAP_ICatalog_getWorkArea
extends SOAP_ICatalog_getWorkAreaStub
{
public void execute()
throws Exception
{
String message = "<SOAP-ENV:Envelope xmlns:tns1=\"http://faults.webservice.wachabe.redwood\" xmlns:apachesoap=\"http://xml.apache.org/xml-soap\"
xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:SOAP-ENC=\"http://schemas.xmlsoap.org/soap/encoding/\"
xmlns:wsdlsoap=\"http://schemas.xmlsoap.org/wsdl/soap/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"
xmlns:wsdl=\"http://schemas.xmlsoap.org/wsdl/\" xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\"
xmlns:intf=\"urn:webservice.wachabe.redwood\" xmlns:tns2=\"http://types.webservice.wachabe.redwood\"
SOAP-ENV:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\">\n"
+ " <SOAP-ENV:Header>\n"
+ " </SOAP-ENV:Header>\n"
+ " <SOAP-ENV:Body>\n"
+ "<intf:getWorkArea SOAP-ENV:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\">\n"
+ " <in0>" + SOAP.escapeXML10(Username) + "</in0>\n"
+ " <in1>" + SOAP.escapeXML10(Password) + "</in1>\n"
+ " <in2>" + SOAP.escapeXML10(Catalog) + "</in2>\n"
+ " <in3>" + SOAP.escapeXML10(Description) + "</in3>\n"
+ "</intf:getWorkArea>"
+ " </SOAP-ENV:Body>\n"
+ "</SOAP-ENV:Envelope>\n"
+ "";
String answer = null;
try
{
SOAPRequest req = SOAP.createSOAPRequestFromJob();
StringBuffer sb = new StringBuffer();
sb.append(message);
req.setURL(ServiceURL);
req.setSOAPAction("\"\"");
jcsErrLog.debug(sb.toString());
req.setRequest(sb.toString());
req.send();
answer = req.getResponseXML();
if (answer != null)
{
answer = SOAP.formatXML(req.getResponseXML());
jcsErrLog.info(answer);
req.populateNamespacesFromResponse();
getWorkAreaReturnOut = req.getStringByXPath("//" + req.getNSPrefixForURI("urn:webservice.wachabe.redwood") + ":getWorkAreaReturn");
if (getWorkAreaReturnOut == null || getWorkAreaReturnOut.trim().length() == 0)
{
getWorkAreaReturnOut = req.getStringByXPath("//" + "getWorkAreaReturn");
}
}
else
{
answer = "There is no response for this request.";
jcsErrLog.debug(answer);
}
}
catch (Exception e)
{
jcsErr.println("Request: " + message);
jcsErr.println(e.getMessage());
throw e;
}
jcsOut.println("Request:");
jcsOut.println(message);
jcsOut.println("Response:");
jcsOut.println(answer);
}
private static String getArrayValues(final String tag, final String[] __pArr)
{
final StringBuffer buffer = new StringBuffer();
for (int i = 0; i < __pArr.length; i++)
{
buffer.append('<').append(tag).append('>');
if (__pArr[i] != null)
{
buffer.append(SOAP.escapeXML10(__pArr[i]));
}
buffer.append('<').append('/').append(tag).append('>').append('\n');
}
return buffer.toString();
}
}
webservice