DSXchange: DataStage and IBM Websphere Data Integration Forum
View next topic
View previous topic
Add To Favorites
Author Message
KadetG
Participant



Joined: 06 Nov 2006
Posts: 30

Points: 347

Post Posted: Thu Aug 30, 2018 7:34 am Reply with quote    Back to top    

DataStage® Release: 11x
Job Type: Parallel
OS: Unix
How to call RESTful webservice with BASIC auth from DataStage?

I tried to do it - specify BASIC auth in DataStage Hierarchical Stage but it does not send the header. I see in webservice log following:
Code:
Starting testGet method...
host = x.x.x.x:8080
connection = Keep-Alive
user-agent = HTTP Step


I tryed the same in Pentaho and it works well:
Code:
Starting testGet method...                 
authorization = Basic c2Rmc2Q6YXNkYXNk     
user-agent = Jakarta Commons-HttpClient/3.1
host = x.x.x.x:8080 


So "authorization": "Basic Qy1ORUhQOD ......" is missed.

Any links or troubleshooting info?

_________________
Alex
eostic

Premium Poster



Group memberships:
Premium Members

Joined: 17 Oct 2005
Posts: 3788

Points: 30468

Post Posted: Thu Aug 30, 2018 1:08 pm Reply with quote    Back to top    

...that output looks like a trace of some kind. Please describe what you are doing inside the REST Step, the options you chose, etc.

Ernie

_________________
Ernie Ostic

blogit!
Open IGC is Here!
Rate this response:  
Not yet rated
KadetG
Participant



Joined: 06 Nov 2006
Posts: 30

Points: 347

Post Posted: Fri Aug 31, 2018 1:48 am Reply with quote    Back to top    

That is very simple job:
Hierarchical stage -> Peek

I didn't change any option of Hierarchical stage
On Assemble:
Overview - nothing to set here
Input Step - nothing to set here
REST Step
General tab
HTTP Method - Get
Reusable connection - not used
URL - my URL in form http://x.x.x.x:8080/UserManagement/rest/UserService/testGet
HTTP version - HTTP 1.1
Use proxy server - unchecked
Abort job on error - checked
Security tab
Authentication: Basic
Realm is empty
User name: UserName
Password: Password
Authentication encoding type: UTF-8
Request tab
No changes (Load the outgoing body unchecked)
Headers/Cookies not filled
Response tab
Pass the received body to Cheched
A text node name body in the Output schema chosen
Content type: application/json
Headers/Cookies not filled
Mapping tab
As default: top - RESTRequest-GetRequest

Output Step:
Mapping:
I have two field which mapped to get StatusCode and body

When I run job it passing without error. And I getting following in log
Peek_3,0: a:200 b:{"response":[{"host":"x.x.x.x:8080"},{"connection":"Keep-Alive"},{"user-agent":"HTTP Step"}]}

But on Webservice log I see that Datastage doesn't send the header with basic authentication information.

Any idea?

_________________
Alex
Rate this response:  
Not yet rated
Display posts from previous:       

Add To Favorites
View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2002 phpBB Group
Theme & Graphics by Daz :: Portal by Smartor
All times are GMT - 6 Hours