Package com.socialnetworkshirts.twittershirts.dataaccess.spreadshirt.http

Examples of com.socialnetworkshirts.twittershirts.dataaccess.spreadshirt.http.HttpCallCommand.execute()


    public String getCheckoutUrl(String id)
            throws Exception {
        HttpCallCommand command =
                commandFactory.createJaxbHttpCallCommand(basketsUrl + "/" + id + "/checkout", HttpMethod.GET, null);
        command.setApiKeyProtected(true);
        command.execute();
        if (command.getStatus() != 200)
            throw new IllegalArgumentException("Could not retrieve checkout reference!");
        Reference reference = (Reference) ((JAXBElement) command.getOutput()).getValue();
        return reference.getHref();
    }
View Full Code Here


        HttpCallCommand createProductCommand =
                commandFactory.createJaxbHttpCallCommand(productUrl, HttpMethod.POST, null);
        // use id from fetched design xml here -> my solution is only a hack
        createProductCommand.setInput(objectFactory.createProduct(product));
        createProductCommand.setApiKeyProtected(true);
        createProductCommand.execute();
        if (createProductCommand.getStatus() >= 400) {
            throw new Exception("Could not create product xml!");
        }
        return createProductCommand.getLocation();
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.