Run Commander Task To Listen On Port
<?xml version="1.0" encoding="utf-8"?> <XMLScript Version="2.0"> <Command Name="Job1"> <Print> <PrintSetup> <Printer>HP LaserJet On Third Floor Room 12</Printer> </PrintSetup> <Format>c:\Bartender\Documents\Document1.btw</Format> <Delimitation>btDelimQuoteAndComma</Delimitation> <UseFieldNamesFromFirstRecord>true</UseFieldNamesFromFirstRecord> <TextData> <![CDATA[ "FirstName","LastName","City","Zip Code" "Adam","Jones","Bellevue","98008", "John","Smith","Kirkland","98293" ]]> </TextData> </Print> </Command> </XMLScript>
Hello, a newbie to Bartender here.
What I am trying to setup, or my goal is: from my (java) application, I'll send a BT xml script to the commander task and have the xml script fired up on Bartender.
Attached are two screenshots of how I set it up.
on the Java side, above xml is the data I am trying to send ( the xml data above - I don't know how but it always appear on top even though I was trying to insert it down here).
I was hoping that when the commander task receives the data, save it into the input.xml file and the BT XML Script command will fired it up.
but instead, I got following error from the commander task log:
[Error] XML document must have a top level element
[Error] Commander cannot continue because the BTXML Script Command failed.
and of course, the input.xml is not created at all in the specified directory.
(the java uses: outputDataStream.writeUTF, might have to use different writer?)
Please let me know I got the whole thing setup wrong and this is not how it woks.
Thanks in advance.
Ben
-
Ok, I've figured out that it was the double quotes in the xml that broke the deal somewhere along the way the Bartend.exe fired up with the /XMLScript set to be whatever read from the socket. Solution -- use single quote in the xml before transforming.
0 -
What is the edition, version, and build of BarTender in use? Could you attach an example XML trigger file for us to examine.
0 -
Ah, never mind I see you've just worked it out.
0 -
Thanks Ian. I did have the issue resolved.
for the record, I am using Bartender 10.1 SR2, build 2945 on Windows Server 2008 R2.
0
Please sign in to leave a comment.
Comments
4 comments