Topic by Narendra Muttineni
Hi,
i am working on RightNow web services to integrate with another ServiceNow cloud service using soapui4.0. I want to Update Incident with nothing as attachment in FileAttachments section. I am using below code but its throwing error. If i mentioned xsi:null="true" then all the previous files getting deleted. please see the below code. I am able to update the empty Threads successfully. Could you please suggest me how to update the incident with null attachment.
<ns4:FileAttachments xsi:nil="false">
<ns4:FileAttachmentList action="add">
<ns4:ContentType>image/png</ns4:ContentType>
<ns4:Data><the data in binary format></ns4:Data>
<ns4:FileName>File Name</ns4:FileName>
</ns4:FileAttachmentList>
</ns4:FileAttachments>
<ns4:Threads xsi:nil="false">
<ns4:ThreadList action="add">
<ns4:EntryType>
<ID xmlns="urn:base.ws.rightnow.com/v1_2" id='1' /><!--1-Private Note- it should be always '1' don't change this id-->
</ns4:EntryType>
<ns4:Text> </ns4:Text>
</ns4:ThreadList>
</ns4:Threads>
If i use above soap request file is getting as an attachment. but if i use below soap request all files that were added are getting deleted.
<ns4:FileAttachments xsi:nil="true">
<ns4:FileAttachmentList action="add">
<ns4:ContentType>image/png</ns4:ContentType>
<ns4:Data></ns4:Data>
<ns4:FileName>File Name</ns4:FileName>
</ns4:FileAttachmentList>
</ns4:FileAttachments>
Could you please suugest me in anyway to resolve this issue.
thanks in advance
Narendra