Publishing Engine is supported with a number of IBM products as described in the RPE System Requirements. What this means is that we’ve tested the integration and we will support users running into issues with those products.
However RPE is designed to work with any product that meets the following 3 rules:
- the product’s API provides data in XML format
- it’s preferable that the API is Web based but that is not mandatory as long as you can automate the process of obtaining the XML.
- an XML schema exists for the data
- the XSD can be provided by the API or it can be manually created
- RPE can handle the authentication* used to protect the API.
- RPE currently supports Basic authentication, Form based authentication and the Jazz flavour of OAuth
There are further details like rich text, binary file attachments and more but if the above conditions are met RPE should be able to at least produce documents with raw data from your product.
So when you don’t see your product on the support page my advice is to give it a try and if you run into any issues raise them on the RPE DevWorks forum.
RPE is designed to work with XML data only but with JSON gaining ground more and more tools switched to JSON for exporting their data.
For such scenarios you need to use one of the multiple offline and online tools that can convert JSON to XML. Next you need to create an XML schema (XSD) for the generated XML in order to build a template for the data.
Online tools have a number of shortcomings, data security and privacy first and foremost. To avoid this I have assembled a tool that does that conversion on my local machine. Note that there are multiple commercial tools that are better and more flexible my tool but this is a good, fast alternative to manual conversion.
The transformation route is:
JSON ----> XML ---> XSD
java -jar json2xml.jar d:\test\test1.json d:\test\
The tool’s source code and the latest build is available on Github: https://github.com/dragoscojocari/json2xml You can fork it and change it in any way you need.
The software is not provided or supported by IBM and it’s not associated with RPE.
DISCLAIMER: THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
When reporting a problem via support or asking for help via the RPE Dev Works forum one of the first questions you will be asked is to provide the XML data used for your report. Getting a hold of the XML data is also interesting for testing your templates while avoiding/reducing the need for server requests.
This post describes 3 ways of getting the XML data that RPE uses for the document generation.
Continue reading “How to get the XML data used by RPE”