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


Reply With Quote
Bookmarks