Template Subprocessing
Morgan Conner <[email protected]>
| Newsgroups | gmane.comp.web.freemarker.user |
|---|---|
| Message-ID | <[email protected]> |
So we have a small configuration for leveraging FreeMarker to produce the XML payload of SOAP messages. Works great. Now we're trying to call a service that wants to have part of the document base64 encoded. The encoded content is also XML that needs to be created using data from the model. Unfortunately, I cannot change the service to make it less dysfunctional, so the encoding is required. I'm also somewhat constrained as to how FreeMarker is invoked, so I can't process it all in code. Maybe I'm dreaming, but: Has anyone seen anything like this before? Is there anyway to build all this into one template? Is there an easy way to get the results of processing a sub-template into a string in the primary template (which I could then call out to Java to get base64 encoded)? My last questions seems like a straightforward way to do it, but most of the code I've looked at returns the included/parsed files in the output and not in a string. Am I missing something? ------------------------------------------------------------------------------