BR

Hey everyone,

I'm trying to make ARIS communicate with a web service (SOAP api) in a script, but can't find any functions to connect to a server in the API.

Is there no way to do this in ARIS scripting?



Thanks in advance,

Bernardo

 

by Jens Heylmann
Posted on Tue, 11/29/2011 - 19:09

Hi Bernardo,

have a look on this example:

var webservice = new WebServiceClass();
webservice.initWebservice("https://server.com/app/services/Service");
var sChangedData = webservice.getData();

//WEBSERVICE - *************************************
function WebServiceClass() {
        var m_strEndPointAdress = "";
        var m_Proxy = null;
        var m_Service = null;
        
        this.initWebservice = function(strEndPointAddress) {
            
            try {               
                //WebService Client erzeugen
                m_Proxy = new Packages.com.webservices.client.ServiceServiceLocator();           
                
                m_Proxy.setServiceEndpointAddress(strEndPointAddress);
                m_Service = m_Proxy.getService();
                m_Service.setTimeout(3600000);
            } catch(ex) {
                g_ERROR_LOGGER.log(LOG_ERR, "WebServiceClass.initWebservice Fail to init webservice '"+strEndPointAddress+"'" + ex, null);  
            }
        }    

        
        /***************************************************************           
            call method         
            @return: String
        ****************************************************************/
        this.getData = function() { 
            if(m_Service!=null) {          
                return m_Service.getData(); 
            }
            else {
                g_ERROR_LOGGER.log(LOG_ERR, "WebServiceClass.getData failed", null);     
                return null;
            }
        }
}

 

Best regards!

0
by Oleg Chebulaev
Posted on Thu, 05/31/2012 - 07:47

Hello Mr. Jens Heylmann

Could you tell me where i can see the documentation by  Packages.com.webservices.client.ServiceServiceLocator



I need to send data to a web service and get an answer

0
by Marcelo Assis
Posted on Thu, 02/27/2014 - 15:37

Hi Jens

Would you have an example like you posted in your previous message where I would also be able to specify the username and password to authenticate to the service? I already have a web service available to be consumed, but my middleware requires authentication before processing.

I am trying also to pass some values to the structure before the call. Is there a "set" command (instead of "get") that could be used to fill those fields?

Thanks in advance. 

Marcelo.

0

Featured achievement

Question Solver
Share your expertise and have your answer accepted as best reply.
Recent Unlocks
  • CR
  • BH
  • Profile picture for user Ivan.Ivanov.softwareag.com
  • Profile picture for user mscheid
  • MS
  • PacMan

Leaderboard

|
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