Πέμπτη, 23 Δεκεμβρίου 2010

SOAPUI for testing Amazon S3

SOAPUI is a graphical tool which can be used to test web services. With SOAPUI you can import a wsdl file of a web service. Then, the tool provides a sample soap request for each operation included in the wsdl file. After inserting values to the request parameters of the SOAP request message, this message is sent to the server and a SOAP response is returned and presented. 

SOAPUI was used to test Amazon S3 service and worked perfect. For the creation of the  signature value  requested by the Amazon S3 operations I used the openSSL.openSSL can be downloaded from here


 http://gnuwin32.sourceforge.net/packages/openssl.htm

For creating the signature with openSSL you should run in command line after moving to the path openSSL install directory and bin the following command

openssl dgst -sha256 -hmac SECRET KEY -binary aaa.txt | openssl enc -base64

where you should put your Amazon secret key instead of SECRET KEY and in the txt file aaa.txt, the string that should be used for the signature. For example, in case the ListAllMyBuckets operation ishould be executed, the string is AmazonS3ListAllMyBuckets2010-12-22T22:22:43.000Z where 2010-12-22T22:22:43.000Z is the timestamp of the request.

In case, there is an error in signature the SOAP response message returns a Hex Encoded String. This string with the amazon secret key can be used to verify and create the right signature. This can be achieved by using Amazon S3 Signature Tester that can be downloaded from here

http://awsmedia.s3.amazonaws.com/catalog/attachments/s3-sigtester.zip

Try it, is good and simple!!!!!


P.S There is also another tool that can be used for testing web services, the SOAPSonar. This tool is provided on a personal and an enterprise edition. Unfortunately, only the personal edition can be downloaded for free and this version does not allow to send messages through SSL. Thus, it is impossible to test Amazon S3 web service.


M.P.

Δεν υπάρχουν σχόλια:

Δημοσίευση σχολίου