Hello ARIS Community,

I am working on retrieving data from a web service.  I have created a jar file that will allow me to retrieve this data.  Following some advice on this site on how to make a jar file available to ARIS script, I placed the jar file in the \server\lib directory.

This works great for report script and functions as I expected.  When I try to use in a macro, however, it does not work.  I tried importing the jar file in script Common files and then go into the properties of the macro and checked to import the jar file.  This got me a little further, but now I get a message about "class com.test.webservices.Authenticate do not have a property of the name {http://webservices.test.com}Login".  Can someone explain why this error is coming up?  I am not using the method Authenticate in my script.

// Import the webservice jar file has to be in \server\lib directory
var imp = JavaImporter(Packages.webserviceconsumer);

// Call main otherwise nothing will happen

// Main function
function main() {

    // Obtain result of searching by email...testing hard-coded email address search
    var result = imp.WebserviceConsumer.searchByEmail("Allen@test.com");
    // Get object that holds basic info
    var identite = result.getIdentite();
    // Get object that holds contact info
    var coordonnee = result.getCoordonnee();
    // Create string to display some info
    var msg = "First name:     " + identite.getFirstName() + "\n" +
              "Last name:     " + identite.getLastName() + "\n" +
              "Tel:          " + coordonnee.getTel() + "\n" +
              "Email:        " + coordonnee.getMail();
    // Display message box with personnel info              
    Dialogs.MsgBox(msg, Constants.MSGBOX_BTN_OK, "Contact Info");

Thanks for your response.



by Francois Du Toit
Posted on Mon, 04/02/2012 - 09:38

Hi Allen,

You should look at putting the jar file on the client's machine as any macro runs on the client and not on the server... Just a thought, have not done something like this myself... :)



by Allen V. Author
Posted on Tue, 04/03/2012 - 16:15

Thanks for the suggestion, Francois.  I tried putting the jar file on the client machine and set the PATH.  Running the macro gives the same error. 

I thought that importing in the macro itself would make the jar file available at runtime?





Featured achievement

Say hello to the ARIS Community! Personalize your community experience by following forums or tags, liking a post or uploading a profile picture.
Recent Unlocks
  • SS
  • MZ
  • Profile picture for user kbiront
  • Profile picture for user Tony Iliev
  • Profile picture for user amandeep.7.singh
  • PacMan


icon-arrow-down icon-arrow-cerulean-left icon-arrow-cerulean-right icon-arrow-down icon-arrow-left icon-arrow-right icon-arrow icon-back icon-close icon-comments icon-correct-answer icon-tick icon-download icon-facebook icon-flag icon-google-plus icon-hamburger icon-in icon-info icon-instagram icon-login-true icon-login icon-mail-notification icon-mail icon-mortarboard icon-newsletter icon-notification icon-pinterest icon-plus icon-rss icon-search icon-share icon-shield icon-snapchat icon-star icon-tutorials icon-twitter icon-universities icon-videos icon-views icon-whatsapp icon-xing icon-youtube icon-jobs icon-heart icon-heart2 aris-express bpm-glossary help-intro help-design Process_Mining_Icon help-publishing help-administration help-dashboarding help-archive help-risk icon-knowledge icon-question icon-events icon-message icon-more icon-pencil forum-icon icon-lock