HTTP Request tool for JMF submission??

Post Reply
mclarke
Member
Posts: 54
Joined: Thu Feb 28, 2013 5:29 pm
Location: Syracuse, NY

HTTP Request tool for JMF submission??

Post by mclarke »

Good morning!

So, I'm looking for some additional assistance with a flow I've been working on for a customer. Also, it's been a great learning experience for me. The batch file is working great (thanks again Freddie!) and the files I combined have been read correctly by the printer. Now, however, I have a need to pull some media data from the device using JMF.

The device has an internal HTTP server, so I was assuming that I could use the HTTP Request tool. I have the JMF file to request the data, which is:

Code: Select all

<JMF xmlns="http://www.CIP4.org/JDFSchema_1_1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Query Type="Resource" xsi:type="QueryResource">
<ResourceQuParams Classes="Consumable Handling" ResourceName="Media" Scope="Present" />
</Query>
</JMF>
I would be using a Switch variable to substitute the "Media" entry with the name of the media, for which I need the rest of the media information from the printer.

My question is, since I do not have any experience in web coding, how do I format the HTTP request tool to submit that Query JMF file, and then get back it's response? I will need to add the JMF response to the main file as another external data source for building a correctly formatted JDF file for my company's devices.

Thanks in advance for any help or insights on how to make this work.
freddyp
Advanced member
Posts: 1008
Joined: Thu Feb 09, 2012 3:53 pm

Re: HTTP Request tool for JMF submission??

Post by freddyp »

This answers the question of how to post the JMF file: viewtopic.php?f=12&t=4270.

If the JMF file is always the same, inject it with Inject job and use the HTTP request element to send it and inject the response as a new file (it will also be an XML file). If it is not always the same you can use the Make XML app to create one on the fly.

And in order to trigger the process at regular intervals you can use the FireStarter app.
Post Reply