Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Call Server in Custom_instantiation.cfg
satchk
Hi All,
Will call server work with custom_instantiation.cfg? if so, how?
Thanks in advance,
Find more posts tagged with
Comments
Adam Stoller
Hi All,
Will call server work with custom_instantiation.cfg? if so, how?
Thanks in advance,
I believe it works the same way it does with FormsPublisher DCTs - why - what's you're issue?
Firenze
Unfortunately, not all of Form API works in custom instantition form. CallServer did not work for us in 6.7.1 SP1. So, we had to do more with JavaScript.
I would touch base with Support and Release Docs to see if it has been fixed.
The DataSource Java code solution looks pretty good although there are not a lot of samples out there yet.
catorarn
Solution Stack: TS672/Solaris10
We have a callServer call to a perl script in one custom_instantiation.cfg file. Here is the code:
[html]
/** Two functions to populate users / groups reviewer */
/** Check if the file and directory name follow the naming convention */
function initUsersGroupsSelect()
{
var params = new Object();
params.branch = deducedBranch;
var filelist = top.document.getElementsByName('workflow.wfm.files');
if(filelist.length>0)
{ params.files = filelist[0].value; }
else
{
var filelist2 = top.document.getElementsByName('workflow.iwwfmFiles');
/* parse the string to remove the server name and add | */
var sListFile = filelist2[0].value;
/* 1. add the | */
sListFile = sListFile.replace(/;/ig,";|");
/* 2. get the servername */
var sServerName = sListFile.substring(0,sListFile.indexOf('/default'));
/* 3. remove the servername */
sListFile = sListFile.replace(new RegExp(sServerName.replace(/\//ig,"\\/"),"ig"),"");
/* 4. remove the last | */
if(sListFile.lastIndexOf(";|") != -1 ) sListFile = sListFile.substring(0,sListFile.length);
params.files = sListFile;
}
IWDatacapture.callServer("/iw-bin/swift/workflow_getgroups.ipl", params, false);
}
[/html]
Could I extend this thread into a discussion on how to setup a callServer to a servlet or jsp?
Using the UI toolkit, I have set up the following:
a. custom web.xml with this section:
[html]
authentication
InlineDispatcherServlet
InlineDispatcherServlet
com.wf.InlineDispatcherServlet
InlineDispatcherServlet
/servlets/InlineDispatcherServlet
[/html]
2. instantiation.cfg:
[html]
/** Function that loads all modified books from jsp uhb_wf_inline.jsp to user when the user selects Publish modified files */
function setModifiedFolders(item)
{
var myOptions = item.getOptions();
IWDatacapture.displayMessage("Retrieving Modified Books " + myOptions[parseInt(item.getValue())].text + "....");
top.hiddenFrameRunning = true;
var callserver = IWDatacapture.callServer(dnsServer + "/iw-cc/servlets/InlineDispatcherServlet");
IWDatacapture.callServer(callserver);
}
[/html]
The callserver is calling the URL:
http://servername/iw-cc/command/undefined/servlets/InlineDispatcherServlet
3. I tried to add this dummy call to ui_custom.xml to create an id on the URL, but without success. This action menu actually does bring up the servlet ok):
[html]
operationID="sc.ccpro.action_menu.startuhbpub.op" label="Inline Dispatcher" description="Inline Dispatcher" url="/servlets/InlineDispatcherServlet" windowFeatures="width=0,height=0,scrollbars=1,menubar=0,titlebar=1,resizable=1,status=1,center=true,dependent=false" target="_blank"/>
[/html]
The main aim of this exercise is to get rid of Perl callServer FormAPI calls and use a servlet instead.
I think I am doing something wrong in the configuration. Never hurts to apply the four-eye principle here...
catorarn
The error that I am getting is the following:
Error in an Internet Explorer popup:
Command undefined not found in the command descriptors.
http://servername/iw-cc/command
is being called, while in the customer_sample_src UI toolkit examples the CustomServlet1 is not using that /iw-cc/command piece.
I have used the CustomServlet1 setup for my servlet.
If I use the URL
http://servername/iw-cc/servlets/InlineDispatcherServlet
, then the URL returns fine.
Question here is: Where is it defined in the UI toolkit to go to /iw-cc/command?
catorarn
I got over this problem by using the hardcoded URL
[html]
/** Function that loads all modified books from jsp uhb_wf_inline.jsp to user when the user selects Publish modified files */
function setModifiedFolders(item)
{
var myOptions = item.getOptions();
IWDatacapture.displayMessage("Retrieving Modified Books " + myOptions[parseInt(item.getValue())].text + "....");
top.hiddenFrameRunning = true;
var callserver = IWDatacapture.callServer(
http://servername/iw-cc/servlets/InlineDispatcherServlet
");
IWDatacapture.callServer(callserver);
}
[/html]
The functionality seems to be working, mission accomplished
catorarn
Even better without hard coding the serverpath and protocol:
[html]
var callserver = IWDatacapture.callServer("/iw-cc/servlets/InlineDispatcherServlet");
IWDatacapture.callServer(callserver, params, true);
[/html]