Package client.ws.milanas.helpers.dom

Examples of client.ws.milanas.helpers.dom.DOMItemHandler


    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)
        {
View Full Code Here


    private Item sendSOAPMessage(String operation, String cathegory, HashMap<String, String> parameters) throws SOAPEnvelopeCreationException, SOAPConnectionException
    {
        int numPages, i = 0;
        Item item = new Item();
        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();
            item = dih.getItemContent(doc);           
        }
        catch(SOAPException se)
        {
            throw new SOAPConnectionException();
        }
View Full Code Here

TOP

Related Classes of client.ws.milanas.helpers.dom.DOMItemHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.