views:

57

answers:

2

Edit: Sorry guys, realised I have no idea when it comes to integrating Webservices in Java. Was hoping someone could point me in the right direction.

Original question: Hey everyone, I was wondering if you guys could point me in the right direction for this. I am required to find out how to inject data into an XML being created. I am using Java and the XALAN processor for my XML creation. The realtime data would either be coming form APIs or calls from a WebService.

A: 

I'm not sure that the 'real-time' element is of interest here.

Is the main issue that you're having difficulty manipulating XML via the standard DOM APIs ? If so, I would check out JDom, which is a Java API that will allow you to manipulate XML in a much easier/more intuitive fashion than the standard APIs.

Brian Agnew
Im not having too much of a problem manipulating the XML. I guess I should have worded my question better, so my issue can be split into two a) How to integrate webservice/api calling in my javacode.b)How to transfer an unknown amount of data into the XML. The amount of data varies.
Bilzac
@Bilzac - why don't you edit your question to ask what you need to know?
erickson
A: 

Since you mention Xalan, maybe you are using XSLT. In that case, you can pass parameters to the Transformer and reference them by name in the style sheet.

erickson
I figured I would do that, wasn't really sure how I would be able to implement that with a real-time webservice calls
Bilzac