DSXchange: DataStage and IBM Websphere Data Integration Forum
View next topic
View previous topic
Add To Favorites
This topic has been marked "Resolved."
Author Message
pbttbis



Group memberships:
Premium Members

Joined: 11 Dec 2014
Posts: 35
Location: South Africa
Points: 515

Post Posted: Fri Dec 18, 2015 5:19 am Reply with quote    Back to top    

DataStage® Release: 11x
Job Type: Parallel
OS: Unix
Hi,

I have created a job with both input and output ISD stages. Job compiles fine (enable for webservices and mutliple instances options set).

In Information Server Console I create a new application, service and attach an operation to the job. The binding I am using is REST with the following settings:

Format: XML
HTTP Action: POST
Parameter Type: BODY

I tried the following two basic HTML pages to test:

--version 1
<title>REST with Forms</title>
<form action="https://devetleng:9443/wisd-rest2/DataStageCall/rest_test/DataStageCall" method="post">
<input type="text" name="data" value="mydata" />
<input type="submit" />
</form>

--version 2
<html>
<body>
<form action="https://devetleng:9443/wisd-rest2/DataStageCall/rest_test/DataStageCall" method="post">
<textarea rows="20" cols="100" name=" ">
<?xml version="1.0"?><requestElements><blah></blah></requestElements>
</textarea>
<input type="submit" value="Submit">
</form>
</body>
</html>

I am getting the following error: org.xml.sax.SAXParseException: Premature end of file.

Any ideas?

Thanks
eostic

Premium Poster



Group memberships:
Premium Members

Joined: 17 Oct 2005
Posts: 3773

Points: 30298

Post Posted: Fri Dec 18, 2015 6:24 am Reply with quote    Back to top    

Not sure exactly what is happening, but start with something vastly more primitive and simple in your first testing. A good one to try is perhaps a simple Job that takes a single input argu ...

_________________
Ernie Ostic

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



Group memberships:
Premium Members

Joined: 11 Dec 2014
Posts: 35
Location: South Africa
Points: 515

Post Posted: Fri Dec 18, 2015 7:27 am Reply with quote    Back to top    

Hi Ernie,

My colleague Arnd says you know this stuff best. I believe you two have met on at least one occasion? Razz

Yeah the job I am testing is a simple one like you suggest.

Testing it with GET it is successful.

Currently we have a webpage that interacts with a system via a POST. We are trying to insert datastage in between. Thus the POST should go to DataStage and is why I am trying to get it to work with a POST.

The requesting system's post is prepared in the format of version 2 in the two simple XML post examples I showed earlier.

Thanks,

Shaun

_________________
PBT TBIS Consultant
Rate this response:  
Not yet rated
eostic

Premium Poster



Group memberships:
Premium Members

Joined: 17 Oct 2005
Posts: 3773

Points: 30298

Post Posted: Fri Dec 18, 2015 3:19 pm Reply with quote    Back to top    

Yeah...hard to say. I recall looking at that aspect of this binding a long time ago when it first came out, but haven't touched that aspect (POST with xml body) of the binding in years... I would pr ...

_________________
Ernie Ostic

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



Group memberships:
Premium Members

Joined: 11 Dec 2014
Posts: 35
Location: South Africa
Points: 515

Post Posted: Mon Dec 21, 2015 7:27 am Reply with quote    Back to top    

Thanks for the help so far Ernie.

I am now trying to get my ISD job to work with the binding "Text Over HTTP".

The HTTP data unit that looks like it should work with the client posting to the service I have selected is HTTP PAYLOAD.

https://www-01.ibm.com/support/knowledgecenter/SSZJPZ_11.3.0/com.ibm.swg.im.iis.infoservdir.user.doc/topics/c_isd_user_bindings_text_over_http.html?lang=en

I get a a blank page in the browser when submitting the post with my test pages. If i do a view source on the blank page Chrome shows me a ERR_CACHE_MISS

See nothing in the job log in DataStage Director. Nothing comes up in the SystemOUT.log and SystemErr.log files.

This tell me that my request is not been received by the job and that the problem lies in the binding configuration of the service.

Any ideas on how to troubleshoot what/where it is going wrong?

_________________
PBT TBIS Consultant
Rate this response:  
Not yet rated
eostic

Premium Poster



Group memberships:
Premium Members

Joined: 17 Oct 2005
Posts: 3773

Points: 30298

Post Posted: Mon Dec 21, 2015 8:17 am Reply with quote    Back to top    

Mapping HTTP PAyload to a single column in the Job is the right approach. I would have a simple ISD Job that has just one big column...nothing else. varchar and a long length, or maybe even c ...

_________________
Ernie Ostic

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



Group memberships:
Premium Members

Joined: 11 Dec 2014
Posts: 35
Location: South Africa
Points: 515

Post Posted: Mon Dec 21, 2015 10:29 am Reply with quote    Back to top    

Parallel job forces you to have one (and only one) ISD Output Stage with an ISD Input Stage.

Server job allows to have just a ISD Input Stage but am still getting the same blank page and no processing in the job log.

Checking the plumbing in SystemErr.log, SystemOut.log and native_stderr.log. Nothing in there. Are there any specific log files I can check for application services?

Port 9443 the correct port to use with http://servername:port/wisd-txhttp/<application-name>/<service-name> ?

_________________
PBT TBIS Consultant
Rate this response:  
Not yet rated
pbttbis



Group memberships:
Premium Members

Joined: 11 Dec 2014
Posts: 35
Location: South Africa
Points: 515

Post Posted: Thu Jan 07, 2016 3:35 am Reply with quote    Back to top    

Marking this thread as resolved.

Ended up making use of a REST binding with Input and Output pass through handling all the logic in the job.

Great tool I ended up using for testing was the rest client from WizTools.org.

Learnt the hard way that having a passive stage with both an input and output within a job with both input and output ISD stage causes issues.

_________________
PBT TBIS Consultant
Rate this response:  
Not yet rated
eostic

Premium Poster



Group memberships:
Premium Members

Joined: 17 Oct 2005
Posts: 3773

Points: 30298

Post Posted: Thu Jan 07, 2016 6:27 am Reply with quote    Back to top    

Ouch. Yes. It's too bad that the compiler doesn't check that for you...... : / I recall learning that many years ago (not to do it in a Server ISD Job), as it is certainly a common technique ...

_________________
Ernie Ostic

blogit!
Open IGC is Here!
Rate this response:  
Not yet rated
ray.wurlod

Premium Poster
Participant

Group memberships:
Premium Members, Inner Circle, Australia Usergroup, Server to Parallel Transition Group

Joined: 23 Oct 2002
Posts: 54254
Location: Sydney, Australia
Points: 294257

Post Posted: Thu Jan 07, 2016 3:38 pm Reply with quote    Back to top    

Would it work if you enabled Inter Process Row Buffering in the server job? Just a thought. I still believe that blocking operations are incompatible with ISD.

_________________
RXP Services Ltd
Melbourne | Canberra | Sydney | Hong Kong | Hobart | Brisbane
currently hiring: Canberra, Sydney and Melbourne
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