Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X
Hello,
I am trying to remove attached files from Integrity 10.6 server using soap requests.
I tested SoapUI 5.2.1 from SmartBear
Our Integrity web service location looks something like http://server:port/webservices/10/2/Integrity/
But whenever the filename contains a , character, the removeAttachment method fails (see also below in red colour what SoapUI responds)
Example of file names having this problem:
Hello,World.txt
Some File 19,06a.doc
I tried both text files and binary files.
For other attached file names, without a , character in their names, I can successfully remove the files, without problems.
(e.g. Hello World.txt or Some File 1906a.doc)
The SoapUI request for the Hello,World.txt file looks like this
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:int="http://webservice.mks.com/10/2/Integrity" xmlns:sch="http://webservice.mks.com/10/2/Integrity/schema">
<soapenv:Header/>
<soapenv:Body>
<int:removeAttachment>
<arg0 transactionId="?" AttachmentName=Hello,World.txt" FieldName="Attachments" sch:ItemId="122953">
<sch:Username>myusername</sch:Username>
<sch:Password>mypassword </sch:Password>
</arg0>
</int:removeAttachment>
</soapenv:Body>
</soapenv:Envelope>
The response in SoapUI looks like this for removing the Hello,World.txt attached file.
<ns1:MKSException class="com.mks.api.response.InvalidCommandOptionException" implication="Unable to remove attachment." xmlns:ns1="http://webservice.mks.com/10/2/Integrity/fault">Could not save modified item 122953: Error removing attachment: The specified key is invalid: World.txt</ns1:MKSException>
The response in SoapUI looks like this for removing the Some File 19,06a.doc attached file.
<ns1:MKSException class="com.mks.api.response.InvalidCommandOptionException" implication="Unable to remove attachment." xmlns:ns1="http://webservice.mks.com/10/2/Integrity/fault">Could not save modified item 122953: Error removing attachment: The specified key is invalid: 06a.doc</ns1:MKSException>
It can be seen from the error message that somehow the part of the file name following the comma is split internally by MKS ?!
Any hint ? Thanks !
I don't know nothing about SoapUI
but could it be that you missed a quotation mark?
<arg0 transactionId="?" AttachmentName=Hello,World.txt" FieldName="Attachments" sch:ItemId="122953">
maybe this works:
<arg0 transactionId="?" AttachmentName="Hello,World.txt" FieldName="Attachments" sch:ItemId="122953">
Jürgen
Thank you Jurgen, I just mistyped and forgot the opening double quote when I wrote my question in the HTML editor..
The text below was in my original intention as well, and no it doesn't work. The removeAttachment web service method returns the error mentioned above.
<arg0 transactionId="?" AttachmentName="Hello,World.txt" FieldName="Attachments" sch:ItemId="122953">
Alexandru,
You probably want to open a Support case with Integrity support, to look at this further. It could be a defect. I've seen similar problems with filenames that had the "+" character in the filename, so this may be similar to that.