Page 1 of 1

XML Output Stage to a Webservice

Posted: Mon Jul 15, 2013 10:43 am
by MrBlack
I'm looking for some help with the XML Output stage, so far I've just used the stage to write a file to the OS. So my job looks like this so far

Code: Select all

{Database} -> {Transformer} -> {XML Output}
So the input tab of the XML Stage I write my XPath expressions and everything is working great. So the next thing I want to do is instead of writing the file to the file system, I want to take that XML as a BLOB/CLOB/STRING and pass it into a webservice (or a database table, etc...) So my job now looks like

Code: Select all

{Database} -> {Transformer} -> {XML Output} -> {Transformer} -> {Web Service}
My web service just has one column, payload, which I will base64 encode my xml document that I want to upload.

Where I'm stuck is I don't know what the Output Columns on the XML Stage should be? Should my output columns be identical to my input columns? I would think that I would just have one output column which would be my entire finished xml doc, just as if it was going to be written to disk?

Posted: Mon Jul 15, 2013 11:17 am
by MrBlack
Solved it!

In the output column of the XML Output stage, define just a single column but in the Description (where you put the XPath when working with XML) just put a single

Code: Select all

/
The datatype I've just left as Unknown and so far that's working. I now have a single sting of xml text that I can do whatever I need to with. I have ran into trouble using a transformer immediately after because I get a

Code: Select all

"ds_input() - row too big for inter stage rowbuffer"
error so I'm just working around that issue right now.

Posted: Mon Jul 15, 2013 12:04 pm
by rameshrr3
Try using LongVarChar datatype, and set teh data element property as XML