Topic
  • 9 replies
  • Latest Post - ‏2012-06-22T09:24:38Z by SystemAdmin
SystemAdmin
SystemAdmin
648 Posts

Pinned topic Problem while calling Invoker.jsp

‏2012-06-21T09:14:05Z |
Hi,

I'm trying to invoke a trigger script(Redirect) through invoker.jsp but it works only if I have a currently active session of PIM. But when I log out of the application and then try the invoker.jsp url it always redirects me to the login page. Any way where I can set the context with login details and go directly to the desired page?

Below is the URL.
http://myserver:19000/utils/invoker.jsp?company_code=trigo&bUserOutput=false&invoking_user=user1/trigo&script=Redirect

The Redirect script has got a .navigate operation in a javascript on page load which navoigates to a particulat item information page.

Thanks,
Abhijeet
Updated on 2012-06-22T09:24:38Z at 2012-06-22T09:24:38Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    648 Posts

    Re: Problem while calling Invoker.jsp

    ‏2012-06-21T09:16:56Z  
    Hi,

    Look the description of getLoginString function.
  • SystemAdmin
    SystemAdmin
    648 Posts

    Re: Problem while calling Invoker.jsp

    ‏2012-06-21T10:04:22Z  
    Hi,

    Look the description of getLoginString function.
    Hi,

    I have aleady tried that. Please see below code.

    var sProdCentUrl = getProductCenterURL();
    var sLoginString = "/utils/invoker.jsp?company_code=abc&bUserOutput=false&invoking_user=userid/abc&customParam=Abhijeet&script=Redirect";
    var expDate = getDateTimeInUserTimeZone();
    expDate = expDate.addDate("MONTH",3);

    var sURL = sProdCentUrl+getLoginString(sLoginString,expDate,"userid");
    out.writeln(sURL);

    The output which I'm getting is this- but it's still taking me to the login page.

    http://server.abc.com:19080/utils/invoker.jsp?company_code=abc&bUserOutput=false&invoking_user=userid/abc&customParam=Abhijeet&script=Redirect&trigo_login=57ah654f14d6h139e83a1376h70088b6d
  • SystemAdmin
    SystemAdmin
    648 Posts

    Re: Problem while calling Invoker.jsp

    ‏2012-06-21T10:10:01Z  
    Hi,

    I have aleady tried that. Please see below code.

    var sProdCentUrl = getProductCenterURL();
    var sLoginString = "/utils/invoker.jsp?company_code=abc&bUserOutput=false&invoking_user=userid/abc&customParam=Abhijeet&script=Redirect";
    var expDate = getDateTimeInUserTimeZone();
    expDate = expDate.addDate("MONTH",3);

    var sURL = sProdCentUrl+getLoginString(sLoginString,expDate,"userid");
    out.writeln(sURL);

    The output which I'm getting is this- but it's still taking me to the login page.

    http://server.abc.com:19080/utils/invoker.jsp?company_code=abc&bUserOutput=false&invoking_user=userid/abc&customParam=Abhijeet&script=Redirect&trigo_login=57ah654f14d6h139e83a1376h70088b6d
    Hi,

    Are you able to login into the system by userid via the login page?
  • SystemAdmin
    SystemAdmin
    648 Posts

    Re: Problem while calling Invoker.jsp

    ‏2012-06-21T10:18:14Z  
    Hi,

    Are you able to login into the system by userid via the login page?
    Yes. After giving the login credentials I'm able to login.

    ~Abhijeet
  • SystemAdmin
    SystemAdmin
    648 Posts

    Re: Problem while calling Invoker.jsp

    ‏2012-06-21T10:23:25Z  
    Yes. After giving the login credentials I'm able to login.

    ~Abhijeet
    at first, use secure_invoker
    at second, try remove from the url the following parameters company_code, userName
  • SystemAdmin
    SystemAdmin
    648 Posts

    Re: Problem while calling Invoker.jsp

    ‏2012-06-21T12:03:54Z  
    at first, use secure_invoker
    at second, try remove from the url the following parameters company_code, userName
    Perfect. Changing it to 'secure_invoker' only worked.
    But only when I'm using simple ASP/JSP like secure trigger scripts with some html tags and labels, it's coming up. But when I'm using a secure_trigger script having a navigate operation the target url is not coming up. Please see below my secure_trigger script.

    <HTML>
    <HEAD>
    <title>Testing Redirection Through Trigger Script</title>
    <script language=”javascript” type="text/javascript">

    function go(){
    window.navigate("classicornew.wpc?doit=modify_item_in_data_entry&catalog_id=3202&item_id=5018&version_id=999999999&ctg_version_id=0");
    }
    </script>
    </HEAD>

    <BODY onload="go()">
    </BODY>
    </HTML>
  • SystemAdmin
    SystemAdmin
    648 Posts

    Re: Problem while calling Invoker.jsp

    ‏2012-06-22T06:30:19Z  
    Perfect. Changing it to 'secure_invoker' only worked.
    But only when I'm using simple ASP/JSP like secure trigger scripts with some html tags and labels, it's coming up. But when I'm using a secure_trigger script having a navigate operation the target url is not coming up. Please see below my secure_trigger script.

    <HTML>
    <HEAD>
    <title>Testing Redirection Through Trigger Script</title>
    <script language=”javascript” type="text/javascript">

    function go(){
    window.navigate("classicornew.wpc?doit=modify_item_in_data_entry&catalog_id=3202&item_id=5018&version_id=999999999&ctg_version_id=0");
    }
    </script>
    </HEAD>

    <BODY onload="go()">
    </BODY>
    </HTML>
    I am using the following trick
    
    ... <script language=
    "JavaScript">top.location=
    '/utils/secure_invoker.jsp?company_code=<%=sCompany%>&script=ChangesLogging.List.UI&bUserOutput=false.......'</script> ...
    
  • SystemAdmin
    SystemAdmin
    648 Posts

    Re: Problem while calling Invoker.jsp

    ‏2012-06-22T08:39:02Z  
    I am using the following trick
    <pre class="jive-pre"> ... <script language= "JavaScript">top.location= '/utils/secure_invoker.jsp?company_code=<%=sCompany%>&script=ChangesLogging.List.UI&bUserOutput=false.......'</script> ... </pre>
    Hi Alexander,

    Below are the scenarios which I have found

    Not Working - http://myserver:19080/utils/invoker.jsp?company_code=mycompany&bUserOutput=false&invoking_user=myid/mycompany&script=Redirect
    Not Working - http://myserver:19080/utils/secure_invoker.jsp?company_code=mycompany&bUserOutput=false&invoking_user=myid/mycompany&script=Redirect
    Not Working - http://myserver:19080/utils/invoker.jsp?company_code=mycompany&bUserOutput=false&invoking_user=myid/mycompany&script=Redirect&trigo_login=57ah654f14d6h139ec6b2774h798fee66
    Working - http://myserver:19080/utils/secure_invoker.jsp?company_code=mycompany&bUserOutput=false&invoking_user=myid/mycompany&script=Redirect&trigo_login=57ah654f14d6h139ec738005h1bde2223

    And my Redirect script in Triggers as well as Secure Triggers folder under script is below. Any changes that I should make?

    <HTML>
    <HEAD>
    <title>Testing Redirection Through Trigger Script</title>
    <script language=”javascript” type="text/javascript">

    function go(){
    window.navigate("./classicornew.wpc?doit=modify_item_in_data_entry&catalog_id=3202&item_id=5018&version_id=999999999&ctg_version_id=0");
    }
    </script>
    </HEAD>

    <BODY onload="go()">
    </BODY>
    </HTML>
  • SystemAdmin
    SystemAdmin
    648 Posts

    Re: Problem while calling Invoker.jsp

    ‏2012-06-22T09:24:38Z  
    Hi Alexander,

    Below are the scenarios which I have found

    Not Working - http://myserver:19080/utils/invoker.jsp?company_code=mycompany&bUserOutput=false&invoking_user=myid/mycompany&script=Redirect
    Not Working - http://myserver:19080/utils/secure_invoker.jsp?company_code=mycompany&bUserOutput=false&invoking_user=myid/mycompany&script=Redirect
    Not Working - http://myserver:19080/utils/invoker.jsp?company_code=mycompany&bUserOutput=false&invoking_user=myid/mycompany&script=Redirect&trigo_login=57ah654f14d6h139ec6b2774h798fee66
    Working - http://myserver:19080/utils/secure_invoker.jsp?company_code=mycompany&bUserOutput=false&invoking_user=myid/mycompany&script=Redirect&trigo_login=57ah654f14d6h139ec738005h1bde2223

    And my Redirect script in Triggers as well as Secure Triggers folder under script is below. Any changes that I should make?

    <HTML>
    <HEAD>
    <title>Testing Redirection Through Trigger Script</title>
    <script language=”javascript” type="text/javascript">

    function go(){
    window.navigate("./classicornew.wpc?doit=modify_item_in_data_entry&catalog_id=3202&item_id=5018&version_id=999999999&ctg_version_id=0");
    }
    </script>
    </HEAD>

    <BODY onload="go()">
    </BODY>
    </HTML>
    try the following code for your Redirect ASP/JSP script
    
    <script language=
    "JavaScript">top.location=
    'classicornew.wpc?doit=modify_item_in_data_entry&catalog_id=3202&item_id=5018&version_id=999999999&ctg_version_id=0'</script> <% %>
    


    Also check if the URL is working if you enter them in a browser directly