diff --git a/xta-adapter/pom.xml b/xta-adapter/pom.xml index b23ad1bdb3a554de2c5f51dee4499458b5cb1400..99d04ee83d680b95aed8a21d06f39cd5bcdb179c 100644 --- a/xta-adapter/pom.xml +++ b/xta-adapter/pom.xml @@ -12,6 +12,8 @@ <properties> <spring-boot.build-image.imageName>docker.ozg-sh.de/xta-adapter:build-latest</spring-boot.build-image.imageName> + <okio.version>3.9.0</okio.version> + <mockwebserver.version>4.12.0</mockwebserver.version> </properties> <dependencies> @@ -81,6 +83,18 @@ <artifactId>spring-boot-configuration-processor</artifactId> <optional>true</optional> </dependency> + <dependency> + <groupId>com.squareup.okio</groupId> + <artifactId>okio</artifactId> + <version>${okio.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>com.squareup.okhttp3</groupId> + <artifactId>mockwebserver</artifactId> + <version>${mockwebserver.version}</version> + <scope>test</scope> + </dependency> </dependencies> <build> diff --git a/xta-adapter/src/test/java/de/ozgcloud/eingang/xta/MockResponseTestFactory.java b/xta-adapter/src/test/java/de/ozgcloud/eingang/xta/MockResponseTestFactory.java new file mode 100644 index 0000000000000000000000000000000000000000..1df581ac477f920aa8069fe84fb6677f3cac6d0e --- /dev/null +++ b/xta-adapter/src/test/java/de/ozgcloud/eingang/xta/MockResponseTestFactory.java @@ -0,0 +1,133 @@ +package de.ozgcloud.eingang.xta; + +import java.io.IOException; +import java.util.Arrays; +import java.util.Base64; +import java.util.Map; +import java.util.Objects; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +import de.ozgcloud.common.test.TestUtils; +import okhttp3.mockwebserver.MockResponse; + +public class MockResponseTestFactory { + + private static final String UUID_BOUNDARY = "uuid:4403149a-87eb-4bb4-b885-472816010e04+id=12707"; + // The MIME Multipart/Related Content-type (See https://www.ietf.org/rfc/rfc2387.txt) + private static final String MULTIPART_RELATED_CONTENT_TYPE = "multipart/related; type=\"application/xop+xml\";start=\"<http://tempuri.org/0>\";boundary=\"%s\";start-info=\"application/soap+xml\"".formatted( + UUID_BOUNDARY); + private static final String INCLUDE_URL = "http://tempuri.org/1/638485294711394846"; + + private static final Map<String, String> ENVELOPE_HEADERS = Map.of( + "Content-ID", "<http://tempuri.org/0>", + "Content-Transfer-Encoding", "8bit", + "Content-Type", "application/xop+xml;charset=utf-8;type=\"application/soap+xml\"" + ); + + public static Map<String, String> MAILBOX_CONTENT = Map.of( + "urn:de:xta:messageid:dataport_xta_210:20eb297a-e224-45a0-9376-5ebd4d9bcc9a", "AFM", + "urn:de:xta:messageid:dataport_xta_210:371ce4e3-44e3-4f9d-8c82-db7f347ae760", "AFM", + "urn:de:xta:messageid:dataport_xta_210:3d280bfa-d790-4865-a6cf-f6656d7be13f", "Versammlungsanzeige", + "urn:de:xta:messageid:dataport_xta_210:749f0375-be76-4928-959d-76d52de906c3", "AFM" + ); + + private static final Map<String, String> ATTACHMENT_FILENAME = Map.of( + "AFM", "attachment.zip", + "Versammlungsanzeige", "attachment.xml" + ); + + public static MockResponse create() { + return new MockResponse(); + } + + public static MockResponse createEmptyGetStatusListResponse() { + var envelopeXMLString = TestUtils.loadTextFile( + "mock-responses/getStatusList/envelope.template.xml", + "0", + "" + ); + + var body = combineParts( + createPart( + ENVELOPE_HEADERS, + envelopeXMLString + ) + ); + + return new MockResponse() + .addHeader("Content-Type", MULTIPART_RELATED_CONTENT_TYPE) + .setBody(body); + } + + public static MockResponse createGetStatusListResponse() { + var messageMetaDataEntriesString = MAILBOX_CONTENT.entrySet().stream() + .map(kv -> TestUtils.loadTextFile("mock-responses/getStatusList/MessageMetaData/%s.template.xml".formatted(kv.getValue()), + kv.getKey())) + .collect(Collectors.joining()); + var envelopeXMLString = TestUtils.loadTextFile( + "mock-responses/getStatusList/envelope.template.xml", + String.valueOf(MAILBOX_CONTENT.size()), + messageMetaDataEntriesString + ); + + var body = combineParts( + createPart( + ENVELOPE_HEADERS, + envelopeXMLString + ) + ); + + return new MockResponse() + .addHeader("Content-Type", MULTIPART_RELATED_CONTENT_TYPE) + .setBody(body); + } + + public static MockResponse createGetMessageResponse(String messageId) { + var antragType = Objects.requireNonNull(MAILBOX_CONTENT.get(messageId)); + + var envelopeXMLString = TestUtils.loadTextFile( + "mock-responses/getMessage/%s/envelope.template.xml".formatted(antragType), + messageId, INCLUDE_URL); + + String attachmentBase64; + try (var attachmentFile = TestUtils.loadFile( + "mock-responses/getMessage/%s/%s".formatted(antragType, Objects.requireNonNull(ATTACHMENT_FILENAME.get(antragType))))) { + attachmentBase64 = new String(Base64.getEncoder().encode(attachmentFile.readAllBytes())); + } catch (IOException e) { + throw new RuntimeException(e); + } + + var body = combineParts( + createPart( + ENVELOPE_HEADERS, + envelopeXMLString + ), + createPart( + Map.of( + "Content-ID", "<%s>".formatted(INCLUDE_URL), + "Content-Transfer-Encoding", "base64", + "Content-Type", "application/octet-stream" + ), + attachmentBase64 + ) + ); + + return new MockResponse() + .addHeader("Content-Type", MULTIPART_RELATED_CONTENT_TYPE) + .setBody(body); + } + + private static String combineParts(String... parts) { + return Stream.concat( + Arrays.stream(parts).map(part -> "--%s\n%s\n".formatted(UUID_BOUNDARY, part)), + Stream.of("--%s--".formatted(UUID_BOUNDARY))) + .collect(Collectors.joining()); + } + + private static String createPart(Map<String, String> headers, String content) { + return String.join("\n", + headers.entrySet().stream().map(kv -> "%s: %s\n".formatted(kv.getKey(), kv.getValue())).collect(Collectors.joining()), content); + } + +} diff --git a/xta-adapter/src/test/java/de/ozgcloud/eingang/xta/XtaRemoteServiceITCase.java b/xta-adapter/src/test/java/de/ozgcloud/eingang/xta/XtaRemoteServiceITCase.java index 381cce5eaf3711843971ff76eaf1f9454ee0baf2..cc85f76f2d5cff5cf9556a7613493647f05f740b 100644 --- a/xta-adapter/src/test/java/de/ozgcloud/eingang/xta/XtaRemoteServiceITCase.java +++ b/xta-adapter/src/test/java/de/ozgcloud/eingang/xta/XtaRemoteServiceITCase.java @@ -54,7 +54,7 @@ class XtaRemoteServiceITCase { class TestGetMessage { @Test void shouldSendRequest() { - var result = remoteService.getMessage("urn:de:xta:messageid:dataport_xta_210:81e40808-91c6-4765-aaf4-1aa62fec8be9"); + var result = remoteService.getMessage("urn:de:xta:messageid:dataport_xta_210:20eb297a-e224-45a0-9376-5ebd4d9bcc9a"); assertThat(result).isNotNull(); } diff --git a/xta-adapter/src/test/java/de/ozgcloud/eingang/xta/XtaServiceITCase.java b/xta-adapter/src/test/java/de/ozgcloud/eingang/xta/XtaServiceITCase.java new file mode 100644 index 0000000000000000000000000000000000000000..3f25039dd3c66356a1727d80ea208381fc0e03b4 --- /dev/null +++ b/xta-adapter/src/test/java/de/ozgcloud/eingang/xta/XtaServiceITCase.java @@ -0,0 +1,118 @@ +package de.ozgcloud.eingang.xta; + +import static org.assertj.core.api.Assertions.*; +import static org.junit.jupiter.api.Assertions.*; + +import java.net.InetAddress; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; + +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Nested; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.ActiveProfiles; + +import de.ozgcloud.eingang.Application; +import de.ozgcloud.eingang.semantik.enginebased.EngineBasedSemantikAdapter; +import de.ozgcloud.eingang.semantik.formbased.FormBasedSemantikAdapter; +import lombok.SneakyThrows; +import okhttp3.mockwebserver.MockWebServer; + +@ActiveProfiles({ "itcase", "local" }) +@SpringBootTest(classes = Application.class) +class XtaServiceITCase { + + private MockWebServer nachrichtenBrokerMock; + + private static final List<String> FILTERED_MESSAGE_IDS = MockResponseTestFactory.MAILBOX_CONTENT.entrySet().stream() + .filter(kv -> kv.getValue().equals("AFM")) + .map(Map.Entry::getKey) + .toList(); + + @Autowired + private XtaService xtaService; + + @Autowired + private EngineBasedSemantikAdapter engineBasedAdapter; + + @Autowired + private FormBasedSemantikAdapter formBasedAdapter; + + @Autowired + private XtaProperties properties; + + @DisplayName("get messages") + @Nested + class TestGetMessages { + + @BeforeEach + void enqueueResponse() { + startServer(); + nachrichtenBrokerMock.enqueue(MockResponseTestFactory.createGetStatusListResponse()); + FILTERED_MESSAGE_IDS.forEach(messageId -> + nachrichtenBrokerMock.enqueue(MockResponseTestFactory.createGetMessageResponse(messageId)) + ); + nachrichtenBrokerMock.enqueue(MockResponseTestFactory.createEmptyGetStatusListResponse()); + } + + @AfterEach + @SneakyThrows + void verifyRequestCall() { + try { + var expectedCallCount = FILTERED_MESSAGE_IDS.size() + 2; + + for (var i = 0; i < expectedCallCount; i++) { + var request = nachrichtenBrokerMock.takeRequest(1, TimeUnit.SECONDS); + assertNotNull(request, "should have request index %d".formatted(i)); + assertThat(request.getPath()).isEqualTo("/MB_XTA-WS/XTA210msgBoxPort.svc"); + } + } finally { + stopServer(); + } + } + + @DisplayName("should return form data with filtered message ids") + @Test + void shouldReturnFormDataWithFilteredMessageIds() { + var formDataItems = xtaService.getMessages(); + + var messageIds = formDataItems.map(item -> item.getHeader().getRequestId()).toList(); + assertThat(messageIds).isEqualTo(FILTERED_MESSAGE_IDS); + } + + @DisplayName("should unzip correct number of representations") + @Test + void shouldUnzipCorrectNumberOfRepresentations() { + var firstFormData = xtaService.getMessages().toList().getFirst(); + assertNotNull(firstFormData); + + firstFormData = engineBasedAdapter.parseFormData(firstFormData); + firstFormData = formBasedAdapter.parseFormData(firstFormData); + + // Expect that there are 3 files in attachment.zip and that the zip itself is a representation + assertThat(firstFormData.getNumberOfRepresentations()).isEqualTo(4); + } + } + + @SneakyThrows + private void startServer() { + nachrichtenBrokerMock = new MockWebServer(); + + nachrichtenBrokerMock.start(InetAddress.getByName("127.0.0.1"), 0); + var serverProperties = properties.getServer(); + serverProperties.setAddress(nachrichtenBrokerMock.getHostName() + ":" + nachrichtenBrokerMock.getPort()); + serverProperties.setProtocol("http"); + } + + @SneakyThrows + private void stopServer() { + nachrichtenBrokerMock.shutdown(); + nachrichtenBrokerMock = null; + } + +} diff --git a/xta-adapter/src/test/resources/mock-responses/getMessage/AFM/attachment.zip b/xta-adapter/src/test/resources/mock-responses/getMessage/AFM/attachment.zip new file mode 100644 index 0000000000000000000000000000000000000000..8f466f5b2eaf7bfb457ffcf27c3b21886d972a29 Binary files /dev/null and b/xta-adapter/src/test/resources/mock-responses/getMessage/AFM/attachment.zip differ diff --git a/xta-adapter/src/test/resources/mock-responses/getMessage/AFM/envelope.template.xml b/xta-adapter/src/test/resources/mock-responses/getMessage/AFM/envelope.template.xml new file mode 100644 index 0000000000000000000000000000000000000000..4015e654c8a309ee31d039de6a0799fb0f8ed483 --- /dev/null +++ b/xta-adapter/src/test/resources/mock-responses/getMessage/AFM/envelope.template.xml @@ -0,0 +1,48 @@ +<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing"> + <s:Header> + <a:Action s:mustUnderstand="1">http://www.osci.eu/ws/2008/05/transport/urn/messageTypes/MsgBoxFetchRequest</a:Action> + <h:MsgBoxResponse MsgBoxRequestID="urn:de:xta:messageid:dataport_xta_210:20eb297a-e224-45a0-9376-5ebd4d9bcc9a" xmlns:h="http://www.osci.eu/ws/2008/05/transport" xmlns="http://www.osci.eu/ws/2008/05/transport" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <ItemsPending>0</ItemsPending> + </h:MsgBoxResponse> + <h:MessageMetaData xmlns:h="http://www.osci.eu/ws/2014/10/transport" xmlns="http://www.osci.eu/ws/2014/10/transport"> + <DeliveryAttributes> + <Origin>2024-04-04T10:24:07.57</Origin> + <Delivery>2024-04-04T10:24:08.723</Delivery> + </DeliveryAttributes> + <Originators> + <Author> + <Identifier type="xoev">afmsh:WebMethod_Online-Dienste</Identifier> + </Author> + </Originators> + <Destinations> + <Reader> + <Identifier type="xoev">afmsh:ozg-cloud-dev001</Identifier> + </Reader> + </Destinations> + <MsgIdentification> + <MessageID xmlns="http://www.w3.org/2005/08/addressing">%s</MessageID> + </MsgIdentification> + <Qualifier> + <Service>urn:xdomea:AFM</Service> + <BusinessScenario> + <Defined listURI="urn:de:dataport:codeliste:business.scenario" listVersionID="1"> + <code xmlns="">AFM_DATA</code> + </Defined> + </BusinessScenario> + <MessageType listURI="urn:de:payloadSchema:elementName" listVersionID="1.0" payloadSchema="http://www.xdomea.de/V2.0.1"> + <code xmlns="">Geschaeftsgang.Geschaeftsgang.0201</code> + </MessageType> + </Qualifier> + <MsgSize>40142</MsgSize> + </h:MessageMetaData> + </s:Header> + <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> + <GenericContentContainer xmlns="http://xoev.de/transport/xta/211"> + <ContentContainer> + <Message contentType="application/zip" filename="9f1b47d4-d6bf-4ec4-b0ff-1e30bee42ef2_Geschaeftsgang.Geschaeftsgang.0201.zip" size="40142"> + <xop:Include href="cid:%s" xmlns:xop="http://www.w3.org/2004/08/xop/include"/> + </Message> + </ContentContainer> + </GenericContentContainer> + </s:Body> +</s:Envelope> diff --git a/xta-adapter/src/test/resources/mock-responses/getMessage/Versammlungsanzeige/attachment.xml b/xta-adapter/src/test/resources/mock-responses/getMessage/Versammlungsanzeige/attachment.xml new file mode 100644 index 0000000000000000000000000000000000000000..e535ee0d452895989e769142c40dd29ee8e4d87e --- /dev/null +++ b/xta-adapter/src/test/resources/mock-responses/getMessage/Versammlungsanzeige/attachment.xml @@ -0,0 +1 @@ +<fim.S17000652.17000652001004 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:xoev-de:xfall:standard:fim-s17000652_1.4"><G17003529><G05001479><G05001480><F05002750>85ad506f-25a2-4a93-a086-b069784c6d60</F05002750><F05002751>21.03.2024 08:56:33</F05002751><F05002752>fim.S17000652.17000652001004</F05002752><F05002753>urn:fim:Versammlungsanzeige:1.4</F05002753></G05001480><G05001481><F05002754>Fachdienst Sicherheit und Ordnung - Kreis Ostholstein</F05002754><F05002755>vbe:010550120100</F05002755><F05002756>Versammlungsbehörde</F05002756></G05001481><G05001482><F05002754>Dataport</F05002754><F05002755>ehp:010100100000</F05002755><F05002756>Versammlungsbehörde</F05002756></G05001482></G05001479><F17005454>true</F17005454><F17005455>false</F17005455><F17005533>85ad506f-25a2-4a93-a086-b069784c6d60</F17005533></G17003529><F17009191>false</F17009191><G17002112><F60000228>Jörg</F60000228><F60000227>Bolay</F60000227><G60000086><F60000243>Muster</F60000243><F60000244>1</F60000244><F60000246>12345</F60000246><F60000247>Muster</F60000247></G60000086><F60000242>joerg.bolay@dataport.de</F60000242><F17009011>false</F17009011></G17002112><F17003371>Anzeigen einer ortsfesten Versammlung (Kundgebung / Demonstration)</F17003371><G17005404><G17007202><F17003373>fsdf</F17003373><F17003377>sdf</F17003377><G17005406><F60000048>2024-03-21</F60000048><F17001348>13.5</F17001348><F60000049>2024-03-21</F60000049><F17001349>15</F17001349></G17005406></G17007202><G17007205><F17003379>10</F17003379><F17003382>keine</F17003382><G17007234><F17011826>Nein</F17011826></G17007234><G17007235><F17011827>Nein</F17011827></G17007235></G17007205></G17005404></fim.S17000652.17000652001004> \ No newline at end of file diff --git a/xta-adapter/src/test/resources/mock-responses/getMessage/Versammlungsanzeige/envelope.template.xml b/xta-adapter/src/test/resources/mock-responses/getMessage/Versammlungsanzeige/envelope.template.xml new file mode 100644 index 0000000000000000000000000000000000000000..58699f57d3a8c1adbb67844f29d1697ffa6be84c --- /dev/null +++ b/xta-adapter/src/test/resources/mock-responses/getMessage/Versammlungsanzeige/envelope.template.xml @@ -0,0 +1,49 @@ +<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing"> + <s:Header> + <a:Action s:mustUnderstand="1">http://www.osci.eu/ws/2008/05/transport/urn/messageTypes/MsgBoxFetchRequest</a:Action> + <h:MsgBoxResponse MsgBoxRequestID="urn:de:xta:messageid:dataport_xta_210:3d280bfa-d790-4865-a6cf-f6656d7be13f" xmlns:h="http://www.osci.eu/ws/2008/05/transport" xmlns="http://www.osci.eu/ws/2008/05/transport" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <ItemsPending>0</ItemsPending> + </h:MsgBoxResponse> + <h:MessageMetaData xmlns:h="http://www.osci.eu/ws/2014/10/transport" xmlns="http://www.osci.eu/ws/2014/10/transport"> + <DeliveryAttributes> + <InitialSend>2024-03-21T08:56:35.214+01:00</InitialSend> + <Delivery>2024-03-21T08:56:38.417</Delivery> + </DeliveryAttributes> + <Originators> + <Author> + <Identifier type="xoev" name="Dataport" category="Engagement- und Hobbyportal">ehp:010100100000</Identifier> + </Author> + </Originators> + <Destinations> + <Reader> + <Identifier type="xoev" name="L100012.OE.279550874" category="Versammlungsbehörde">vbe:010550120100</Identifier> + </Reader> + </Destinations> + <MsgIdentification> + <MessageID xmlns="http://www.w3.org/2005/08/addressing">%s</MessageID> + </MsgIdentification> + <Qualifier> + <Service>urn:fim:Versammlungsanzeige:1.4</Service> + <BusinessScenario> + <Defined listURI="urn:de:dataport:codeliste:business.scenario" listVersionID="1"> + <code xmlns="">FIM_DATA</code> + </Defined> + </BusinessScenario> + <MessageType listURI="urn:de:payloadSchema:elementName" listVersionID="1.0" payloadSchema="urn:xoev-de:xfall:standard:fim-s17000652_1.4"> + <code xmlns="">fim.S17000652.17000652001004</code> + <name xmlns="">fim.S17000652.17000652001004</name> + </MessageType> + </Qualifier> + <MsgSize>1738</MsgSize> + </h:MessageMetaData> + </s:Header> + <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> + <GenericContentContainer xmlns="http://xoev.de/transport/xta/211"> + <ContentContainer> + <Message contentType="application/xml" filename="Antrag.xml" size="1738"> + <xop:Include href="cid:%s" xmlns:xop="http://www.w3.org/2004/08/xop/include"/> + </Message> + </ContentContainer> + </GenericContentContainer> + </s:Body> +</s:Envelope> diff --git a/xta-adapter/src/test/resources/mock-responses/getStatusList/MessageMetaData/AFM.template.xml b/xta-adapter/src/test/resources/mock-responses/getStatusList/MessageMetaData/AFM.template.xml new file mode 100644 index 0000000000000000000000000000000000000000..8fead80cb247fd0f0b73e2722176340354cd08cf --- /dev/null +++ b/xta-adapter/src/test/resources/mock-responses/getStatusList/MessageMetaData/AFM.template.xml @@ -0,0 +1,32 @@ +<MessageMetaData xmlns="http://www.osci.eu/ws/2014/10/transport"> + <DeliveryAttributes> + <Origin>2024-04-04T10:24:07.57</Origin> + <Delivery>2024-04-04T10:24:08.723</Delivery> + </DeliveryAttributes> + <Originators> + <Author> + <Identifier type="xoev">afmsh:WebMethod_Online-Dienste</Identifier> + </Author> + </Originators> + <Destinations> + <Reader> + <Identifier type="xoev">afmsh:ozg-cloud-dev001</Identifier> + </Reader> + </Destinations> + <MsgIdentification> + <a:MessageID>%s</a:MessageID> + </MsgIdentification> + <Qualifier> + <Service>urn:xdomea:AFM</Service> + <BusinessScenario> + <Defined listURI="urn:de:dataport:codeliste:business.scenario" listVersionID="1"> + <code xmlns="">AFM_DATA</code> + </Defined> + </BusinessScenario> + <MessageType listURI="urn:de:payloadSchema:elementName" listVersionID="1.0" + payloadSchema="http://www.xdomea.de/V2.0.1"> + <code xmlns="">Geschaeftsgang.Geschaeftsgang.0201</code> + </MessageType> + </Qualifier> + <MsgSize>40142</MsgSize> +</MessageMetaData> diff --git a/xta-adapter/src/test/resources/mock-responses/getStatusList/MessageMetaData/Versammlungsanzeige.template.xml b/xta-adapter/src/test/resources/mock-responses/getStatusList/MessageMetaData/Versammlungsanzeige.template.xml new file mode 100644 index 0000000000000000000000000000000000000000..77f8e312dada38bba29bfe1e3cb6d14b168a9224 --- /dev/null +++ b/xta-adapter/src/test/resources/mock-responses/getStatusList/MessageMetaData/Versammlungsanzeige.template.xml @@ -0,0 +1,37 @@ +<MessageMetaData xmlns="http://www.osci.eu/ws/2014/10/transport"> + <DeliveryAttributes> + <InitialSend>2024-03-21T08:56:35.214+01:00</InitialSend> + <Delivery>2024-03-21T08:56:38.417</Delivery> + </DeliveryAttributes> + <Originators> + <Author> + <Identifier type="xoev" name="Dataport" category="Engagement- und Hobbyportal"> + ehp:010100100000 + </Identifier> + </Author> + </Originators> + <Destinations> + <Reader> + <Identifier type="xoev" name="L100012.OE.279550874" category="Versammlungsbehörde"> + vbe:010550120100 + </Identifier> + </Reader> + </Destinations> + <MsgIdentification> + <a:MessageID>%s</a:MessageID> + </MsgIdentification> + <Qualifier> + <Service>urn:fim:Versammlungsanzeige:1.4</Service> + <BusinessScenario> + <Defined listURI="urn:de:dataport:codeliste:business.scenario" listVersionID="1"> + <code xmlns="">FIM_DATA</code> + </Defined> + </BusinessScenario> + <MessageType listURI="urn:de:payloadSchema:elementName" listVersionID="1.0" + payloadSchema="urn:xoev-de:xfall:standard:fim-s17000652_1.4"> + <code xmlns="">fim.S17000652.17000652001004</code> + <name xmlns="">fim.S17000652.17000652001004</name> + </MessageType> + </Qualifier> + <MsgSize>1738</MsgSize> +</MessageMetaData> diff --git a/xta-adapter/src/test/resources/mock-responses/getStatusList/envelope.template.xml b/xta-adapter/src/test/resources/mock-responses/getStatusList/envelope.template.xml new file mode 100644 index 0000000000000000000000000000000000000000..510d2b8cd48fc4c6629e53fee5d0263accd43127 --- /dev/null +++ b/xta-adapter/src/test/resources/mock-responses/getStatusList/envelope.template.xml @@ -0,0 +1,18 @@ +<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing"> + <s:Header> + <a:Action s:mustUnderstand="1"> + http://www.osci.eu/ws/2008/05/transport/urn/messageTypes/MsgBoxStatusListRequest + </a:Action> + <h:MsgBoxResponse MsgBoxRequestID="1" xmlns:h="http://www.osci.eu/ws/2008/05/transport" + xmlns="http://www.osci.eu/ws/2008/05/transport" + > + <ItemsPending>%s</ItemsPending> + </h:MsgBoxResponse> + </s:Header> + <s:Body> + <MsgStatusList xmlns="http://www.osci.eu/ws/2008/05/transport"> + %s + </MsgStatusList> + </s:Body> +</s:Envelope> +