10 Replies Latest reply on Jan 8, 2015 10:52 AM by Bill Robinson

    NSHScript job and file upload with webservices

    Narahari Lakshminarayana



      Happy 2015 to you all.


      My question involves NSHScriptJob and file upload with web services.


      I have a NSHScriptJob which takes about 24 parameters. (don’t ask why)


      It works well when exercised inside of the BLA console.


      I am trying to expose that thru a Jenkins interface.  Not all the parameters changes but for 2 or 3 at the most.


      I plan to take those 3 changeable params from the Jenkins interface and then make a WS call to the already existing NSHScriptJob and then it works on the rest.


      For that to work, I will have to reconstruct all the 24 params in a loop.


      Due to the reason I am getting the NPE for the following call “NSHScript getNSHParams”, I have to depend on the NSHScript namespace to get the Script params and determine the order from there.



      What I was looking for is to construct a file with the 24 params on the Webservices client side that looks like





      Once the file is constructed, I want to be able to send that to this NSHScriptJob which will then call the NSHScript.


      Inside the NSHScript I will do something like




      if [ -f “$PARAMS_FILE” ];


             echo “I have a file with the parameters defined, so let us instantiate that”

             chmod 755 $PARAMS_FILE

             . $PARAMS_FILE

              echo “Props file instantiated, all props should be now env variables”



              echo “First param is not a file, so expect the other params to be set explicitly”





      # Rest of the script continues here.



      What is the process of uploading a file for one of the jobs I have built ?