Page 1 of 1

XML

Posted: Tue Mar 06, 2007 12:25 pm
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 :)

Posted: Fri Mar 09, 2007 2:15 pm
by devilsmentor
Would appreciate if anybody can help !!!

Posted: Fri Mar 09, 2007 2:44 pm
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.

Posted: Fri Mar 09, 2007 3:06 pm
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.

Posted: Sun Mar 18, 2007 4:58 pm
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

Posted: Sun Mar 18, 2007 6:24 pm
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. :?

Posted: Mon Mar 19, 2007 8:00 am
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.

Posted: Mon Mar 19, 2007 9:47 am
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.

Posted: Tue Mar 20, 2007 12:37 pm
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

Posted: Tue Mar 20, 2007 1:18 pm
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.