I've been able to retrieve an incident with all its attachments, it all works great.
A request like below does that work perfectly and Service Manager returns all the attachments together with the incident.
________________________________________
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<ns2:RetrieveIncidentRequest xmlns:ns2="http://schemas.hp.com/SM/7" attachmentInfo="true" attachmentData="true" ignoreEmptyElements="true">
<ns2:model>
<ns2:keys>
<ns2:IncidentID type="String" mandatory="false" readonly="false">IM0000000123</ns2:IncidentID>
</ns2:keys>
</ns2:model>
</ns2:RetrieveIncidentRequest>
</soapenv:Body>
</soapenv:Envelope>
______________________________
Nevertheless, I am looking for a solution in getting one specific attachment by its ID.
I've been trying to do this with messages like below but the Service Manager doesn't return the content of the attachment but all the metadata of the incident, including attachment information, but no contents.
__________________________
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<ns2:RetrieveIncidentRequest xmlns:ns2="http://schemas.hp.com/SM/7" attachmentInfo="true" attachmentData="true" ignoreEmptyElements="true">
<ns2:model>
<ns2:keys>
<ns2:IncidentID type="String" mandatory="false" readonly="false">IM0000000793</ns2:IncidentID>
</ns2:keys>
<ns2:instance>
<ns2:attachments>
<attachment xmlns="http://schemas.hp.com/SM/7/Common" contentId="4c17a7b2cb930041a13143a8"/>
</ns2:attachments>
</ns2:instance>
</ns2:model>
</ns2:RetrieveIncidentRequest>
</soapenv:Body>
</soapenv:Envelope>
____________________________
Any help?
Thanks.
Tom


Reply With Quote

Bookmarks