Author Message
deepak.garg.cinbell.com
Joined: Apr 19, 2018
Messages: 18
Offline
Hi,

we are looking information to configure/access web service using Windows/basic Authentication on Avaya Aura Orchestration Designer (OD 7.2.3.0.0803). Earlier there was no authentication method used when IVR accessing web services but now due to security mandates we need to implement Windows/Basic authentication for those webservices. OD provides “Web Service Operation Editor” feature which is having Basic/Digest authentication method (Refer below screenshot). We tried it by providing web service information, input, output parameters and user id, password for authentication but no success.

Can you please suggest if we need to add Headers as well or if we are missing any part which causing us to prevent accessing web services. Appreciate your quick response/support. Would be appreciate if a working app or example can be explained.

Environment details:
Eclipse Version : 2019-03 (4.11.0)
OD version : 7.2.3.803
Application server - Apache Tomcat/9.0.33
EPM version - 7.2.3

Thank you.
Deepak

  • [Thumb - OD Web Service Operation Editor.jpg]
[Disk] Download
massimo__croci
Joined: Jan 31, 2020
Messages: 518
Offline
Hi. Please, take a look at:

- Using Web Services in Dialog Designer Applications tutorial (at the bottom there's a PDF file to download): https://www.devconnectprogram.com/site/global/products_resources/avaya_aura_orchestration_designer/educational_resources/sample_applications/using_web_services/index.gsp#

- Orchestration Designer FAQ Web Services: https://www.devconnectprogram.com/site/global/products_resources/avaya_aura_orchestration_designer/support/faqs/web_services.gsp

- AAOD 7.2.3 Developer's Guide, Chapter 21 - Web Services, starting from page 346: https://www.devconnectprogram.com/fileMedia/download/9c0211d0-407a-4a36-9a59-c232693547ac

deepak.garg.cinbell.com
Joined: Apr 19, 2018
Messages: 18
Offline
Thanks massimo for looking and responding.

Let me go through with the given info and will update here.

Thanks,
deepak
deepak.garg.cinbell.com
Joined: Apr 19, 2018
Messages: 18
Offline
Hi Massimo,

Hope you are doing well.

I have gone through with your suggested links but didn't get enough help to resolve my query. Following I'm sharing our OD IVR code which is using service stub client to send web service endpoint url. Can you pls have a look and help, how I can pass user id and pwd in the same code...

IVR CODE:

String ep = (String)mySession.getVariable(IProjectVariables.ENDPOINT).getSimpleVariable().getObjectValue();
LoggerUtil.writeTrace(mySession, ITraceInfo.TRACE_LEVEL_DEBUG, track + "WS Endpoint: " + ep);

ServiceStub ss = new ServiceStub();
// Set WS Timeout
Options timeout_option = new Options();
timeout_option.setTimeOutInMilliSeconds(timeout_value);
ss._getServiceClient().setOptions(timeout_option);
// Set WS Endpoint
EndpointReference epr = new EndpointReference();
epr.setAddress(ep);
ss._getServiceClient().setTargetEPR(epr);

LoggerUtil.writeTrace(mySession, ITraceInfo.TRACE_LEVEL_DEBUG, track + "WS Endpoint: " + ep);
LoggerUtil.writeTrace(mySession, ITraceInfo.TRACE_LEVEL_DEBUG, track + "WS Timeout: " + timeout_value);
PerformOperationRequest por = new PerformOperationRequest();
ArrayOfKeyValueOfstringstring strArr = new ArrayOfKeyValueOfstringstring();
por.setRequestType(WSOperation);
//PerformOperationResponse PoRs;
PerformOperationResponse PoRs = new PerformOperationResponse();
ArrayOfKeyValueOfstringstring results;
KeyValueOfstringstring_type0[] resStr;
KeyValueOfstringstring_type0 key1 = new KeyValueOfstringstring_type0();
KeyValueOfstringstring_type0 key2 = new KeyValueOfstringstring_type0();

Thanks,
Deepak
WilsonYu
Joined: Nov 6, 2013
Messages: 3950
Offline
Here is some sample code you can base on for basic authentication

Authenticator auth = new Authenticator();
if (userName != null && userName.length() > 0) {
auth.setUsername(userName);
}
if (password != null && password.length() > 0) {
auth.setPassword(password);
}

operationClient.getOptions().setProperty(org.apache.axis2.transport.http.HTTPConstants.AUTHENTICATE, auth);

You override the configureAuthentication method in the wsop java class and add the above code to it.
deepak.garg.cinbell.com
Joined: Apr 19, 2018
Messages: 18
Offline
Hi Wilson,

Hope this post finds you safe and well.

Thanks for looking into my query and respond. Post adding the suggestion you shared, still there are few error remains. The very first one is "type Authenticator issue". Even importing the required package, issue occurs. and due to that "undefined class setUserName" and "undefined class setPassword" errors are there.

Herewith attaching the ServiceStub.java and Servlet_WSCall.java file. Please have a look and suggest.

Note: Attaching java file with extension .txt. Pls remove .txt and add .java from the same..
Filename Servlet_WSCall.txt [Disk] Download
Filename Error Snippets.docx [Disk] Download
Filename ServiceStub.txt [Disk] Download
Go to:   
Mobile view