AXL output file has non valid XML as first row

Unanswered Question
Nov 10th, 2008


I am using the output=foobar.xml with my simple java -cp command as follows

D:\CiscoSOAP\axlsqltoolkit>java -cp .\classes;.\lib\saaj-api.jar;.\lib\saaj-impl.jar;.\lib\mail.jar;.\lib\activation.jar;.\li

b\jaxm-api.jar;.\lib\jaxm-runtime.jar;.\lib\xercesImpl.jar;.\lib\xml-apis.jar AxlSqlToolkit -username=foo -password=bar -host=x.x.x.x -input=d:\apps\getFreeCall.cmd -output=d:\output\freecall.xml

The problem is that the first row in the output file is NOT the XML output, it adds the ------------ SQL code here -------

That makes my XML parser say the file is not valid XML, how can I make the toolkit ONLY output the valid XML and not add the silly first row?

If I edit the file and remove line 1 everything works fine.

I am not on UNIX so no nifty scripts or tools will work and windows find only outputs 255 chars so I need sth in the toolkit to omit the first rubbish row.

Any suggestions appeciated



I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
stephan.steiner Wed, 11/12/2008 - 01:37

Does your programming language of choice not support webservices? If it does, launching code not really meant for a productive environment seems like a strange design choice and I strongly suggest you rethink it (for instance.. if there's an error in the request processing or writing the output, you get no output at all.. so you'd have to parse the commandline output to get some feedback).

If you look at the source code of the sample you'll see quickly where this line is added:

FileWriter fw = new FileWriter(outputFile, true);

BufferedWriter bw = new BufferedWriter(fw);

bw.write("---------------------------- " + currentStatement + " ----------------------------");






just remove the first two lines I quoted and recompile and the output is gone.


This Discussion