EC2 SOAP API requires a signed SOAP message, but their WSDL doesn't say it in an machine readable fashion (that is, by using WS-Policy.) Therefore, to talk to this web service with Metro, the onus is on the developer to configure Metro correctly, which is possible but tedious.
This module is developed to hide this manual Metro configuration. This module is also compiled with the fluent API JAXB plugin , to improve the usability.
The API is generated from their 2008-08-08 version of WSDL. For more details about EC2 SOAP API and its semantics, please refer to the documentation by Amazon . The following short program snippet illustrates how to use this API.
// create a proxy that talks to the server. This requiers your AWS private key and X509 certificate. // the resulting port object is multi-thread safe File privateKey = ...; File certificate = ...; AmazonEC2PortType p = EC2.connect(privateKey,certificate); // at this point you can make any API call p.describeImages(new DescribeImagesType().withOwnersSet( new DescribeImagesOwnersType().withItem( new DescribeImagesOwnerType().withOwner("amazon") )));