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
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!
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
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.