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!