ApiClientConfiguration configuration = ApiClientConfiguration.getApiConfigWithAppProperties();

S2sHttpClient s2sHttpClient = S2sHttpClientFactory.create(configuration)
TingbogAnmeld tingbogAnmeld = new TingbogAnmeld(s2sHttpClient)

DocumentSigner documentSigner = new DocumentSigner(configuration);

Document document = StringToDocumentMapper.stringToDocument(xmlPayload);
documentSigner.signAsDisponent(document)
documentSigner.signWithNonRepudiation(document)
String signedXmlPayload = StringToDocumentMapper.documentToString(document)
HttpResponse<String> response = tingbogAnmeld.postEjendomOpret(xmlPayload, messageId, relatesTo)
