Want to get rid of Google Ads, click here.
+ Reply to Thread
Results 1 to 4 of 4

Thread: SOAP API Attachments

  1. #1
    Junior Member
    Join Date
    Sep 2006
    Posts
    3

    Default SOAP API Attachments

    Hello all,

    I am working with the SC6 Soap API. I have used Apache Axis to convert the SC WSDL's into java proxy classes. I am able to open an incident no problem and am now working on trying to open a ticket with an attachment. But I have not been successful. The following is the code that I have in trying to attach a txt file to my soap request. Does anyone see anything wrong with it? Please let me know if anyone can help.

    //attachment
    com.peregrine.casm.probsummary.ScAttachmentType attach = new com.peregrine.casm.probsummary.ScAttachmentType();
    attach.setType("text/plain");
    attach.setAction("add");
    attach.setHref("file://c:\\test.txt");
    attach.setLen(319);
    attach.setName("test.txt");
    com.peregrine.casm.probsummary.ScAttachmentType[] attachs = new com.peregrine.casm.probsummary.ScAttachmentType[1];
    attachs[0] = attach;
    com.peregrine.casm.probsummary.ScAttachmentsType attaches = new com.peregrine.casm.probsummary.ScAttachmentsType() ;
    attaches.setAttachment(attachs);
    ticket_instance.setAttachments(attaches);

    After executing this code, the ticket still opens as expected, but with no attachment. Does SC 6 Soap API support attachments?

    Sincerely,
    mdossantos

  2. #2
    Junior Member
    Join Date
    Nov 2006
    Posts
    20

    Default Any luck

    I am facing the same problem.
    Any luck with attaching files ?

  3. #3
    Junior Member
    Join Date
    Mar 2002
    Location
    United States
    Posts
    1

    Default

    We are having issues with using the SOAP API to open change tickets. The sample code HP/peregrine has provided is not too helpful. Have you had any success doing that -- creating change tickets via the SOAP API?

  4. #4
    Junior Member ProxyProdigy's Avatar
    Join Date
    Aug 2007
    Posts
    25

    Default

    Are you running this locally or from a WebApp? It looks to me like, it it's being called from a WebApp, you'd need to change your href location. The WebApp would be trying to find the test.txt file locally instead of looking to your confuser for it.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts