XML

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
devilsmentor
Participant
Posts: 30
Joined: Wed Apr 12, 2006 11:23 am

XML

Post by devilsmentor »

i am using DS to send the data via XML. The issue is, i can either send the XML or capture it. i cannot cpature and send at the same time, coz when i try to capture it, the job aborts saving the XML to the defined location. Does any one know If we could capture and send it at the same time. Thanks in advance :)
devilsmentor
Participant
Posts: 30
Joined: Wed Apr 12, 2006 11:23 am

Post by devilsmentor »

Would appreciate if anybody can help !!!
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

If you can describe exactly how you are attempting to undertake this task, we might be in a better position to offer coherent diagnosis. What stage types are you using? How did you import the metadata? Are you using default style sheets or customized ones? And so on.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

If 'capture' means read and 'send' means write, sure - you can do both at the same time, meaning in one job. As noted, we'd need a better understanding of what you are trying to accomplish and what your job design looks like to be able to help.

Also, I have no idea what this means:
devilsmentor wrote:when i try to capture it, the job aborts saving the XML to the defined location.
If you are getting 'aborts' it would help to post the actual errors you are getting here as well.
-craig

"You can never have too many knives" -- Logan Nine Fingers
devilsmentor
Participant
Posts: 30
Joined: Wed Apr 12, 2006 11:23 am

Post by devilsmentor »

source (oracle) -> XML O/P -> WS TRFR -> XML I/P -> TARGET (ORACLE)

this is the flow in the job for data. In XML O/P stage, in the output tab, in options tab we can specify the path and choose to save the XML generated with the XML O/P stage. If i choose this option, the data will not flow further, aborting the job. And if i dont choose the option i cannot save the XML generated, but the job does not abort. Now i am trying to save this XML without trying to abort the job.

And i am really sorry for replying this late to my own post. i was occupied with prod deployment. My sincere apologies to ray and chulett
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

No worries, we figure we'll get back to it when you get back to it. :wink:

Let's start with this: post the actual errors that you get. No summaries, no approximations, no 'it was something like' - the actual errors pasted from the logs. We've chased too many wild gooses when someone doesn't do that.

And I'm not even going to ask why in the world you'd want to convert an 'Oracle to Oracle' load to XML, dump and futz with it and then convert the XML back. :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
devilsmentor
Participant
Posts: 30
Joined: Wed Apr 12, 2006 11:23 am

Post by devilsmentor »

hi craig,

i am not passing the data from source to target, i am sending the data to another system via webservice url. let me explain it in detail.


i pick data from source, then with the help of XPATHS ( AKA BOD and many more names) i define the XML tag, this tag holds the value of, say , some column. so i build an XML file with all these XML tags and send it over webservice URL, when the other team receives it they acknowledge by sending us a confirmation, usually some serial no: , this is captured in the destination oracle db.

here is the error:
org.xml.sax.SAXParseException: Document root element is missing.
at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3339)
at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3327)
at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:635)
at org.apache.crimson.parser.Parser2.parse(Parser2.java:333)
at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:448)
at org.apache.crimson.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:185)
at com.ascentialsoftware.wsclient.xml.TreeBuilder.xmlReaderToDom(TreeBuilder.java:326)
at com.ascentialsoftware.wsclient.InputRequest.buildRequestBodyDocument(InputRequest.java:922)
at com.ascentialsoftware.wsclient.WebService.callServiceInternal(WebService.java:1598)
at com.ascentialsoftware.wsclient.WebService.callService(WebService.java:1566)
at com.ascentialsoftware.wsclient.WebService.callService(WebService.java:1519)
at com.ascentialsoftware.wspack.Transformer.process(Transformer.java:102)
at com.ascentialsoftware.jds.StageFactory.runStage(StageFactory.java:544)
at com.ascentialsoftware.jds.StageFactory.runTransformer(StageFactory.java:361)
Service invocation exception: Document root element is missing.
at com.ascentialsoftware.wsclient.WebService.callService(WebService.java:1577)
at com.ascentialsoftware.wsclient.WebService.callService(WebService.java:1519)
at com.ascentialsoftware.wspack.Transformer.process(Transformer.java:102)
at com.ascentialsoftware.jds.StageFactory.runStage(StageFactory.java:544)
at com.ascentialsoftware.jds.StageFactory.runTransformer(StageFactory.java:361)
]


i get this error when the job aborts after capturing the XML.....and all the stuff tht i posted before. i want this job not to abort and capture the XML at the same time.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Ok, missed the WebService Transformer in the middle - for some reason I thought it was the XML Transformer. Doh!

Take the WS out of the picture. Copy the job and just leave in the Oracle and XML Output stages. Run the job until the output you get is actually what the WS is expecting and that it is 'well formed':

org.xml.sax.SAXParseException: Document root element is missing.

Seems to be your problem.
-craig

"You can never have too many knives" -- Logan Nine Fingers
devilsmentor
Participant
Posts: 30
Joined: Wed Apr 12, 2006 11:23 am

Post by devilsmentor »

hey craig,

i am not concerned to check if the XML is well-formed. i want to do both capturing and transferring at the same time. i am sorry if i didnt get the way you were pointing me !!! :roll:

thanks
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

The web service doesn't like your XML it seems, so I suggested to take it out of the picture until you can generate 'acceptable' XML. Copy your job and take out all but the first two stages. Consider adding a Transformer between the two stages as sometimes you need to... manipulate... the data for consumption by the XML stages. Set the XML Output stage to write to a file and work with it until it is correct.

Only then add the other stages back into the mix.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply