Clarity Service Management

Expand all | Collapse all

Download sdm attachment via Servlet

  • 1.  Download sdm attachment via Servlet

    Posted 08-10-2016 09:19 AM

    Hi all,


    I'm in the process of downloading sdm attachment from within PAM to send it via Email.


    I reviewed several posts on the community,

    Downloading attachment using CA Upload servlet using following link

    Download attachment via webservice


    But no luck. I'm using the HTTP GET operator and it runs fine. The HTTP response status is : 200. Which means OK.


    Still, the response length is 0.


    I'm able to find and download the attachment from within SDM with the ID provided in the URL.

    There's is no error in PAM's log.

    There's is no error in SDM's log.


    Below is the used url.



    Any idea?

  • 2.  Re: Download sdm attachment via Servlet

    Posted 08-11-2016 10:01 PM

    Hi Pier-Olivier

    Have you taken the fiddler trace and tried to analyze the url background? The fiddler is not the CA product but a freeware. Here is the tech doc about the fiddler.


    I am sorry that I have not a useful exact information for you at this moment, but I were you, I would try to capture the fiddler trace and try to find the related information to the problem you are encountering. I just let you know about the fiddler if you don't use it at this moment for the situation.


    Best regards, Kosei

  • 3.  Re: Download sdm attachment via Servlet

    Posted 08-12-2016 05:13 AM


    in the past we used the upload servlet to download attachments. We need this Feature to exchange Incident informations with attachments between tenants with a self written application.  Since SDM 14.1 we use the RESTFUL WEB-Service to download attachments. We think this i a better solution because its officially supported.

    Best wishes


  • 4.  Re: Download sdm attachment via Servlet

    Posted 08-15-2016 07:21 PM

    Hi pier-olivier.tremblay - Did any of the responses help answer your question? If so please mark as Correct Answer. Thanks!

  • 5.  Re: Download sdm attachment via Servlet

    Posted 08-16-2016 08:57 AM

    Actually no, but i got it working using a different approach.


    Uploading from servlet did not work. Maybe one day i'll take a look with fiddler. (CA Support told me not to download from it)


    RESTful API. My current 12.9 installation needs a patch to get the downloadAttachment method working. My installation is currently ultra stable so i do not want to compromise this with a patch.


    I've done the old, creepy way. Sharing the attachment folder with a specific user. Copy it with PAM, decompress it, rename it and send it.

  • 6.  Re: Download sdm attachment via Servlet

    Posted 08-16-2016 11:17 AM

    Thanks for sharing!

  • 7.  Re: Download sdm attachment via Servlet

    Posted 08-16-2016 10:16 AM

    I believe this is the same question i ran into, I did actually finally get it working with help from Michael Mueller. (full credit goes to him) This should prevent you from doing all the creepy back end unpacking and delivery legwork yourself :-)


    The pattern is as follows:



    Substitute the following values:

    • <NX_WEB_CGI_URL>: your normal pdmweb.exe URL, pick it up from NX.env
    • <NX_SERVLET_SERVER_URL>: the servlet host and port, pick it up from NX.env as well
    • <attmnt_id>: the id of the attachment you would like display
    • <repository-server>: the server name of the repository the attachment is stored in


    Here's the thread:

    Need a link to SDM Request Attachments from a PAM IRF or Email.


    Hope this helps!