2 of 2 people found this helpful
I did a proof of concept test with web service attachments a while ago (although I did not get to implement it in production).
Basically, you need to encode your attachment into base64 encoded string.
I produced a short document, which has the the details of my test. Since I can't find a way to attach it, I'll try paste the contents into this post.
I hope you find this of some use.
ARS WEB SERVICE ATTACHMENTS
This document shows how ARS accepts attachments via web services by way of example.
A test form with an attachment field was created, and then exposed via web services.
The web service allows a consumer to create a record in the test attachment form that has a file in the attachment field.
A requirement of the ARS web service attachment function is that the file is converted into a base64 encoded string.
For the purposes of the test, an online converter was used to provide the conversion function (as this was not part of our test tool’s capabilties).
For reference, the online converter tool can be found at:
The test file is simple text file:
We used the Crosscheck Soap Sonar tool to test the web service.
The XML to create the attachment appears as follows:
(Note the encoded string in the attachmentData tag.)
The XML response from the ARS web service appears as follows:
A screenshot of the new record in the ARS client tool is shown below:
Below are screenshots of the online base 64 encoding tool:
Encoded string in online tool:
Message was edited by: Mark
..............................del...................| Generic Xanax online | buy vicodin online | generic viagra online cheap | buy generic valium | Buy Ultram online | Buy Tramadol online | Buy Tamiflu online | Buy Phentermine online | buy MERIDIA online | buy lorazepam online | buy generic fioricet online | buy ATIVAN online | Buy AMBIEN online | buy adipex online | buy hydrocodon online | order generic cialis | buy levitra online | order Viagra online | order cheap sildenafil | order tadalafil online | buy vardenafil online | order lexapro online | buy abilify online | buy zyprexa online | buy soma online |
Message was edited by: Mark
Thanks a lot that was very helpful.
Thank you for you post. I tried in similar way and it worked fine.
My query is If I want to test using a file as attachment instead of specifying direct data in WSDL file. For ex. you specified base64 string under tag <s0:Attachment_attachmentData>VGhpcyBpcyBhIHRlc3QgdGV4dCBmaWxlLCBMaW5lIDAxLg0KVGhpcyBpcyBhIHR.... >
Now, If I want to upload attachment file in Attachment tab and test using SOAP UI then how we will achieve that ? Should we encode attachment file in base64.bin file and upload it under Attachment tab in SOAPUI or is there any other way to do it ?
I'm referring to attachment test specified in below link: