Here's the scenario: I've got vendor-specific XML I need to create and then POST it somewhere. It sounds easy enough, but I'm running into issues when it comes time to actually use the XML.
Trying hard to stay within the MVC pattern I:
1) Create a controller which loads the models I'm about to turn into XML 2) Create an rxml view which renders the XML I need perfectly
Now I need to actually *use* this XML in a "model" and POST it to the webservice endpoint. Now, I am not asking "how can I render a view in a model?". What I am asking is "how can I view a view from a model?"
It seems logical and not a breach of MVC that the system should have this level of introspection (right?). It seems consistent with MVC b/c the view is rendering and the controller is controlling. I just need to use that view in an object.
The best solution I have right now is to just have an object that uses net/http or wget and then calls the url of my own server. But this seems hackish and less than ideal.
Has anyone else had to deal with a similar type of issue? Am I missing something incredibly obvious?