This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to escape slashes in JRSFlowInvoke command construction?

Anybody is aware, how to avoid call REST errors, when passed value contains slash? E.g. in below line, the call will fail with an error: "path not found" . Note: I replaced all vars by fake values :).

 

java -jar "C:\Program Files\Hewlett-Packard\Operations Orchestration\Studio\tools\JRSFlowInvoke.jar " -u USER -ep ENCRPTPASS "">SERVER:PORT/.../FLOWUUID

 

Anybody knows? Thanks.

 

Parents Reply
  • 0 in reply to 

    Here is our sample java code that calls JRSFlowInvoke.jar

     

    //sending a parameter that contains url info

    URL = "/folder/attachments/filename.txt";

    sURL = sURL.replaceAll("/folder/attachments", "">http://url_path/attachments");
    sURL = sURL.replaceAll("\\", "\\\\");

     

    //sending a parameter

    fieldvalue = "\\parameter_value";

    fieldvalue = fieldvalue.replaceAll("\\\\", "\\\\\\\\");

     

     

Children
  • 0 in reply to 

    It does not matter how many backslashes I put in - result is the same...
    Below is what I do:

    (note: I use just cmd to simplify)


    H:\>java -jar "C:\Program Files\Hewlett-Packard\Operations Orchestration\Studio\
    tools\JRSFlowInvoke.jar " -u UID -ep PASS "SERVER:8443/.../e03ab740-fb34-4257-8d9b-fdc4ca9d8a7e
    =lab001&command=df -k \\\\\/mnt"

    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <title>Error 404 request=/PAS/services/rest/run/e03ab740-fb34-4257-8d9b-fdc4ca9d8a7e?host
    =lab001&command=df -k \\\\\/mnt, error=path not found: '/e03ab740-fb34-4257-8d9b-fdc4ca9d8a7e?host=
    lab001&command=df -k \\\\\/mnt', host=xxx.xxx.xxx.xxx</title>
    </head>
    <body><h2>HTTP ERROR: 404</h2><pre>request=/PAS/services/rest/run/e03ab740-fb34-4257-8d9b-fdc4ca9d8a7e?host
    =lab001&command=df -k \\\\\/mnt, error=path not found: '/e03ab740-fb34-4257-8d9b-fdc4ca9d8a7e?host=
    lab001&command=df -k \\\\\/mnt', host=xxx.xxx.xxx.xxx</pre>
    <p>RequestURI=/PAS/services/rest/run/e03ab740-fb34-4257-8d9b-fdc4ca9d8a7e?host
    =lab001&command=df -k \\\\\/mnt</p><p><i><small><a href="http://jetty.mortbay.org/">Powered by Jetty://</a></small></i></p><br/></body>
    </html>

     

    I did play with \, \\, \\\, \\\\, \\\\\, etc. the same result "path not found"