Please login or register to access secure site features.

Note: By continuing to use DevConnect Program Services you agree to our latest Registered Member Terms.

Sign in using DevConnect ID

Forgot password?

Trouble logging in?

Submit a ticket for Registration Support.

I have an SSO ID

?
sign in

Don't have a DevConnect or SSO ID ?

Create a DevConnect account or join the program.

register now
^
New DevConnect members must have forum permissions in order to post messages.
If the Reply and New Post buttons are not available to you, please request access using a General Support request ticket.
Forum Index » Avaya Orchestration Designer » How to use basic authentication method to access wsdl web service in Orchestration Designer   XML
 
Author Message
deepak.garg.cinbell.com



Joined: 19/04/2018 04:46:13
Messages: 6
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]
 Filename OD Web Service Operation Editor.jpg [Disk] Download
 Description OD Web Service Operation Editor
 Filesize 153 Kbytes
 Downloaded:  63 time(s)

massimo__croci



Joined: 31/01/2020 10:42:28
Messages: 103
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: 19/04/2018 04:46:13
Messages: 6
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: 19/04/2018 04:46:13
Messages: 6
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: 06/11/2013 14:29:24
Messages: 3881
Online

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: 19/04/2018 04:46:13
Messages: 6
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
 Description Servlet_WSCall file
 Filesize 12 Kbytes
 Downloaded:  49 time(s)

 Filename Error Snippets.docx [Disk] Download
 Description No description given
 Filesize 222 Kbytes
 Downloaded:  49 time(s)

 Filename ServiceStub.txt [Disk] Download
 Description ServiceStub file
 Filesize 572 Kbytes
 Downloaded:  48 time(s)

This message was edited 1 time. Last update was at 04/10/2021 04:20:55

 
 
Go to: