public void createInvoice() throws IOException, UBL4JException {
createInvoiceFromOrder();
}
private void createInvoiceFromOrder() throws IOException, UBL4JException {
InvoiceCreationOutput output = (InvoiceCreationOutput) getOutput();
OrderTypeToInvoiceTypeTransformer orderTypeToInvoiceTypeTransformer =
new OrderTypeToInvoiceTypeTransformer();
CreateInvoiceBasedOnOrderInput input = (CreateInvoiceBasedOnOrderInput) getInput();
InvoiceType generatedInvoiceType = orderTypeToInvoiceTypeTransformer.create(input.getOrderInputStream());
output.setGeneratedInvoiceType(generatedInvoiceType);
InvoiceTypeMarshaller.marshal(generatedInvoiceType, output.getInvoiceOutputStream(generatedInvoiceType));
output.setInvoiceOutputURI(output.getInvoiceOutputURI());
}