Highlighted
christow Absent Member.
Absent Member.
382 views

case attachments and parsing in the exported xml

Hi, we're working on integrating ArcSight with an external ticketing system (not Remedy), but connectors do not yet exist for the system.  So, we're writing Java code to parse the .xml files of Cases and create the tickets in the system.  All is working well until we get to the where we try to add attachments to our ticket.

In the .xml file, it appears the the Case attachments are encoded a certain way.  My coworker said he found that the attachments were ZLIB compressed and the Base64 encoded, so what shows up in the .xml file is the Base64 encoded string of the ZLIB compressed file.

In Java, we Base64 decode the string listed under fileContent, and then use Java Inflater class to decompress.  At this point we add the attachment to our ticketing system using its API.  However, the file always comes out corrupted.  I've tried multiple methods of decompressing and attaching the file, but I am always unable to get the file to decode/decompress to its original stated size listed under contentLength.  The size of the file is always larger than the original size, and therefore can never be opened properly.

The attach method in the API is not the culprit as regular files attach correctly.  This only occurs with the decode and decompressed files from the .xml file.

Has anyone else ever tried to decode the attached files from the .xml and had it work correctly?  Any advice on getting this to work?

Thanks,

Chris

Labels (2)
0 Likes
Reply
3 Replies
user991
New Member.

Re: case attachments and parsing in the exported xml

Hi Chris (or anyone),


Did you ever manage to figure this out? I was just doing some testing, and some of the "fileContent" in the XML doesn't seem to always be correct base64 ... (incorrect padding).

Cheers,

Al

0 Likes
Reply
Glasscock Absent Member.
Absent Member.

Re: case attachments and parsing in the exported xml

Did you ever hear what the encoding is? Or were you ever able to export to an external ticketing system successfully?

We are upgrading to ArcSight 6.5, however we have thousand of cases and 10,000 plus attachments to those cases.  Ideally we would like move them over to 6.5, but haven't come up with a way to do so yet.  We do have a ticketing system that we could possible export to if we had enough information.

Thanks,

John

0 Likes
Reply
user991
New Member.

Re: case attachments and parsing in the exported xml

Hey John,

No sorry I gave up I'm afraid, didn't have the cycles to burn looking into it more. I found some references to people parsing the XML on the web, but nothing on the attachments.

I'd say the best bet is to work through any PS contacts you have or log a ticket and try and get an answer via that path ...

Would be very interested to hear how you get on ...

Cheers,

Al

0 Likes
Reply
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.