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();
}