开发者

Re-using results from webservice

I am using Java and SOAP. I have two webservices. One (A), which generates some data, and one (B), which will update that data given specific parameters. My question is: How can I save the data after it is generated from A for B to use? I have read that using stat开发者_Go百科eful webservices is not preferable. Instead, can I just write the XML response to a file and then get B to open and parse that file? This seems like a lot of work. What would be the 'normal' method to use here?

Thank you!


The usual enterprisey thing to do is to have a persistence layer (e.g. database) to save the data. You would map the XML to a relational model and store that, then regenerate the XML when B requires it.

Saving a file directly is pretty simple and might be the best solution - you'll need to manage locking etc. yourself. Or you could do a very simple DB with the XML in a column.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜