private ArrayList<Item> sendSOAPMessages(String operation, String cathegory, HashMap<String, String> parameters) throws SOAPEnvelopeCreationException, SOAPConnectionException
{
int numPages, i = 0;
ArrayList content = new ArrayList();
Document doc = null;
DOMItemHandler dih = null;
SOAPMessage response = null;
SOAPMessage message = SOAPEnvelopeCreator.createAmazonSearchSOAPEnvelope(operation, parameters, properties);
try
{
response = connection.call(message, properties.getProperty("endpoint"));
dih = DOMItemHandlerFactory.newInstance().newDOMContentHandler(cathegory);
doc = response.getSOAPBody().extractContentAsDocument();
numPages = dih.getNumberOfPages(doc);
content = dih.getContent(doc);
for(i = 2; i <= numPages; i++)
{
parameters.put("ItemPage", new Integer(i).toString());
message = SOAPEnvelopeCreator.createAmazonSearchSOAPEnvelope(operation, parameters, properties);
response = connection.call(message, properties.getProperty("endpoint"));
content.addAll(dih.getContent(response.getSOAPBody().extractContentAsDocument()));
}
}
catch(SOAPException se)
{