Hierarchical stage: Calling RESTful service with BASIC auth

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
KadetG
Participant
Posts: 30
Joined: Mon Nov 06, 2006 12:43 pm

Hierarchical stage: Calling RESTful service with BASIC auth

Post by KadetG »

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: Select all

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: Select all

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 Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

...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!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
KadetG
Participant
Posts: 30
Joined: Mon Nov 06, 2006 12:43 pm

Post by KadetG »

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 ... ce/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
Post Reply