Web Service Call with basic HTTPS authentication

One Star

Web Service Call with basic HTTPS authentication

How can I set up user id and pwd for a WS call that is using just Basic Authentication via HTTPS? I tried many different ways with no luck. The "Need Authentication?" doesn't work - I guess that feature uses SOAP auth, correct?
I have tWebService working for WS that do not require authentication, and it works just fine.
Any help is greatly appreciated.
Thanks
Cat
Community Manager

Re: Web Service Call with basic HTTPS authentication

Hi
Which version of TOS did you use?
Have a look to this 2401.
Best regards
shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: Web Service Call with basic HTTPS authentication

I am running 2.3.0 M2 (r7640-V2.3.0M2) - I have just downloaded it a few days ago. I did exactly what is on the bug tracker description (using Need Authentication and passing user id and password). However, I still get 401 - because the authentication of the WS is not happening via SOAP, but rather the resource is being protected via web application security (on the web.xml). I can't change the WS, since it is a third party application.

Thanks
Cat
Community Manager

Re: Web Service Call with basic HTTPS authentication

Hi
First, make sure you get the correct user id and password. Second, tWebServiceInput component currently only support the soap authentication.
Best regards
shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: Web Service Call with basic HTTPS authentication

Not too sure if this helps but you can use the following piece of code in the advanced section of the WebServiceInput component to use basic auth.
routines.StagingServiceLocator serviceLocator = new routines.StagingServiceLocator();

serviceLocator.setStagingServiceSoapEndpointAddress(context.notify_webservice_url);
routines.StagingServiceSoap_PortType stagingSoap = serviceLocator.getStagingServiceSoap();
((javax.xml.rpc.Stub) stagingSoap)._setProperty(javax.xml.rpc.Stub.USERNAME_PROPERTY, context.notify_username);
((javax.xml.rpc.Stub) stagingSoap)._setProperty(javax.xml.rpc.Stub.PASSWORD_PROPERTY, context.notify_password);
One Star

Re: Web Service Call with basic HTTPS authentication

Not too sure if this helps but you can use the following piece of code in the advanced section of the WebServiceInput component to use basic auth.
routines.StagingServiceLocator serviceLocator = new routines.StagingServiceLocator();

serviceLocator.setStagingServiceSoapEndpointAddress(context.notify_webservice_url);
routines.StagingServiceSoap_PortType stagingSoap = serviceLocator.getStagingServiceSoap();
((javax.xml.rpc.Stub) stagingSoap)._setProperty(javax.xml.rpc.Stub.USERNAME_PROPERTY, context.notify_username);
((javax.xml.rpc.Stub) stagingSoap)._setProperty(javax.xml.rpc.Stub.PASSWORD_PROPERTY, context.notify_password);

Hello,
I'm new to Talend and authenticating to SOAP using Basic Auth is exactly what i need.
The above suggestion doesn't seem to work, i get this error:
 
Any help is very appreciated!

15TH OCTOBER, COUNTY HALL, LONDON

Join us at the Community Lounge.

Register Now

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Downloads and Trials

Test drive Talend's enterprise products.

Downloads