diff --git a/pom.xml b/pom.xml index 4bc431cb6fd4f1a43dd75af5f15b3a03d75b628b..842a106415d04ecc600bdefb8a236e9b447aa6ca 100644 --- a/pom.xml +++ b/pom.xml @@ -63,7 +63,6 @@ <jaxb2-plugin.version>0.15.2</jaxb2-plugin.version> <jaxb3-plugin.version>0.15.0</jaxb3-plugin.version> <mojo-jaxb2-plugin.version>3.1.0</mojo-jaxb2-plugin.version> - <okio.version>3.9.0</okio.version> </properties> <dependencyManagement> @@ -123,12 +122,6 @@ <type>test-jar</type> <scope>test</scope> </dependency> - <dependency> - <groupId>com.squareup.okio</groupId> - <artifactId>okio</artifactId> - <version>${okio.version}</version> - <scope>test</scope> - </dependency> </dependencies> </dependencyManagement> diff --git a/xta-adapter/pom.xml b/xta-adapter/pom.xml index ffa56164004b164c8726efc70193d405de2af09b..89bc1e1e5940f41e803f72534286e91a0a3f0a18 100644 --- a/xta-adapter/pom.xml +++ b/xta-adapter/pom.xml @@ -82,11 +82,6 @@ <optional>true</optional> </dependency> <!-- Test --> - <dependency> - <groupId>com.squareup.okhttp3</groupId> - <artifactId>mockwebserver</artifactId> - <scope>test</scope> - </dependency> <dependency> <groupId>de.ozgcloud.eingang</groupId> <artifactId>common</artifactId> 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 deleted file mode 100644 index 66dc51f7863d8a586951aab8e72af214ea0b8cbd..0000000000000000000000000000000000000000 --- a/xta-adapter/src/test/java/de/ozgcloud/eingang/xta/MockResponseTestFactory.java +++ /dev/null @@ -1,196 +0,0 @@ -package de.ozgcloud.eingang.xta; - -import java.io.IOException; -import java.util.Arrays; -import java.util.Base64; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.UUID; -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 final Map<String, String> MESSAGE_TYPE_BY_ATTACHMENT_FILENAME = Map.of( - "mantelantrag_without_anlage.zip", "Geschaeftsgang.Geschaeftsgang.0201", - "dfoerdermittel_without_anlage.zip", "Geschaeftsgang.Geschaeftsgang.0201", - "brauchtumsfeuer_without_anlage.zip", "Geschaeftsgang.Geschaeftsgang.0201", - "versammlungsanzeige.xml", "fim.S17000652.17000652001004", - "mantelantrag_with_anlage.zip", "Geschaeftsgang.Geschaeftsgang.0201", - "dfoerdermittel_with_anlage.zip", "Geschaeftsgang.Geschaeftsgang.0201", - "brauchtumsfeuer_with_anlage.zip", "Geschaeftsgang.Geschaeftsgang.0201", - "waffenschein.zip", "Geschaeftsgang.Geschaeftsgang.0201" - ); - - private static final Map<String, String> MESSAGE_ID_BY_ATTACHMENT_FILENAME = MESSAGE_TYPE_BY_ATTACHMENT_FILENAME - .keySet().stream() - .collect(Collectors.toMap(name -> name, name -> generateMessageID())); - - private static String generateMessageID() { - return "urn:de:xta:messageid:dataport_xta_210:%s".formatted(UUID.randomUUID().toString()); - } - - private static final Map<String, String> METADATA_NAME_ATTACHMENT_FILENAME = Map.of( - "mantelantrag_without_anlage.zip", "afm", - "brauchtumsfeuer_without_anlage.zip", "afm", - "dfoerdermittel_without_anlage.zip", "dfoerdermittel", - "versammlungsanzeige.xml", "versammlungsanzeige", - "mantelantrag_with_anlage.zip", "afm", - "dfoerdermittel_with_anlage.zip", "dfoerdermittel", - "brauchtumsfeuer_with_anlage.zip", "afm", - "waffenschein.zip", "afm" - ); - - 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(List<String> xtaAttachmentFileNames) { - var messageMetaDataEntriesString = xtaAttachmentFileNames.stream() - .map(MockResponseTestFactory::createMessageMetadataXml) - .collect(Collectors.joining()); - var envelopeXMLString = TestUtils.loadTextFile( - "mock-responses/getStatusList/envelope.template.xml", - String.valueOf(xtaAttachmentFileNames.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 xtaAttachmentFileName) { - var messageType = Objects.requireNonNull(MESSAGE_TYPE_BY_ATTACHMENT_FILENAME.get(xtaAttachmentFileName)); - var metadataMessageXml = createMessageMetadataXml(xtaAttachmentFileName); - - var envelopeXMLString = TestUtils.loadTextFile( - "mock-responses/getMessage/%s/envelope.template.xml".formatted( - messageType - ), - metadataMessageXml, - xtaAttachmentFileName, - getFileSize(getAttachmentFilePath(xtaAttachmentFileName)), - INCLUDE_URL - ); - - 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" - ), - loadFileAsBase64( - getAttachmentFilePath(xtaAttachmentFileName) - ) - ) - ); - - return new MockResponse() - .addHeader("Content-Type", MULTIPART_RELATED_CONTENT_TYPE) - .setBody(body); - } - - private static String getMessageType(String xtaAttachmentFileName) { - return Objects.requireNonNull( - MESSAGE_TYPE_BY_ATTACHMENT_FILENAME.get(xtaAttachmentFileName), - "Xta-message type for '%s' has to be configured!".formatted(xtaAttachmentFileName) - ); - } - - private static String createMessageMetadataXml(String xtaAttachmentFileName) { - return TestUtils.loadTextFile( - "mock-responses/getStatusList/MessageMetaData/%s/%s.template.xml".formatted( - getMessageType(xtaAttachmentFileName), - Objects.requireNonNull( - METADATA_NAME_ATTACHMENT_FILENAME.get(xtaAttachmentFileName), - "Xta-message metadata-name for '%s' has to be configured!".formatted(xtaAttachmentFileName) - ) - ), Objects.requireNonNull(MESSAGE_ID_BY_ATTACHMENT_FILENAME.get(xtaAttachmentFileName)), - getFileSize(getAttachmentFilePath(xtaAttachmentFileName)) - ); - } - - private static String getFileSize(String filePath) { - try (var inputStream = TestUtils.loadFile(filePath)) { - return String.valueOf(inputStream.readAllBytes().length); - } catch (IOException e) { - throw new RuntimeException(e); - } - } - - private static String getAttachmentFilePath(String xtaAttachmentFileName) { - return "mock-responses/getMessage/%s/%s".formatted(getMessageType(xtaAttachmentFileName), xtaAttachmentFileName); - } - - private static String loadFileAsBase64(String fileName) { - try (var attachmentFile = TestUtils.loadFile(fileName)) { - return new String(Base64.getEncoder().encode(attachmentFile.readAllBytes())); - } catch (IOException e) { - throw new RuntimeException(e); - } - } - - 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); - } - - public static MockResponse createCloseResponse() { - return new MockResponse(); - } -} diff --git a/xta-adapter/src/test/java/de/ozgcloud/eingang/xta/XtaITCase.java b/xta-adapter/src/test/java/de/ozgcloud/eingang/xta/XtaITCase.java index 2b5ded74d92e6aad3dbd5d23e997808b0c8e1259..6a5705a31bc4ea95c96227e291f3d4b3e814da45 100644 --- a/xta-adapter/src/test/java/de/ozgcloud/eingang/xta/XtaITCase.java +++ b/xta-adapter/src/test/java/de/ozgcloud/eingang/xta/XtaITCase.java @@ -10,7 +10,6 @@ import java.lang.annotation.Target; import java.util.List; import java.util.Optional; -import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Nested; @@ -36,15 +35,12 @@ import de.ozgcloud.vorgang.vorgang.GrpcEingang; @ActiveProfiles({ "itcase" }) class XtaITCase { - @Autowired - private XtaMockServerConfiguration.XtaMocker xtaMocker; - - @Autowired - private XtaRunner runner; - @MockBean private VorgangRemoteService vorgangRemoteService; + @MockBean + private XtaRemoteService xtaRemoteService; + @Captor private ArgumentCaptor<FormData> formDataArgumentCaptor; @@ -54,6 +50,9 @@ class XtaITCase { @Captor private ArgumentCaptor<Optional<String>> organisationseinheitenIdArgumentCaptor; + @Autowired + private XtaRunner runner; + @DisplayName("run get xta messages") @Nested class TestRunGetXtaMessages { @@ -62,11 +61,6 @@ class XtaITCase { when(vorgangRemoteService.createVorgang(any(), any(), any())).thenReturn("vorgangId(unused)"); } - @AfterEach - void teardown() { - xtaMocker.teardownServer(); - } - @DisplayName("should have three representations with pdf") @TestZipFileNamesWithPdf void shouldHaveThreeRepresentationsWithPdf(String zipFileName) { @@ -171,7 +165,13 @@ class XtaITCase { } private void mockNachrichtenBroker(String zipFileName) { - xtaMocker.setupServer(List.of(zipFileName), true); + when(xtaRemoteService.getMessage(any(XtaMessageId.class))).thenReturn( + XtaResponseTestFactory.createGetMessageResponse(zipFileName) + ); + when(xtaRemoteService.getMessagesMetadata()) + .thenReturn(XtaResponseTestFactory.createGetStatusListResponse(List.of(zipFileName))); + when(xtaRemoteService.getNextMessagesMetadata(any())) + .thenReturn(XtaResponseTestFactory.createEmptyGetStatusListResponse()); } @Target({ ElementType.METHOD }) diff --git a/xta-adapter/src/test/java/de/ozgcloud/eingang/xta/XtaMockServerConfiguration.java b/xta-adapter/src/test/java/de/ozgcloud/eingang/xta/XtaMockServerConfiguration.java deleted file mode 100644 index 5484189046e19e820bcc6f9f0065c068af85908d..0000000000000000000000000000000000000000 --- a/xta-adapter/src/test/java/de/ozgcloud/eingang/xta/XtaMockServerConfiguration.java +++ /dev/null @@ -1,93 +0,0 @@ -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.Objects; -import java.util.concurrent.TimeUnit; - -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; - -import lombok.Getter; -import lombok.RequiredArgsConstructor; -import lombok.SneakyThrows; -import okhttp3.mockwebserver.MockWebServer; - -@Configuration -public class XtaMockServerConfiguration { - - @Bean - XtaMocker xtaMockServer(XtaProperties properties) { - return new XtaMocker(properties); - } - - @RequiredArgsConstructor - @Getter - public static class XtaMocker { - private final XtaProperties properties; - - private MockWebServer nachrichtenBrokerMock; - private List<String> filteredAttachmentFileNames; - - @SneakyThrows - public void setupServer(List<String> xtaAttachmentFileNames, boolean expectCloseMessages) { - filteredAttachmentFileNames = xtaAttachmentFileNames.stream() - .filter(name -> Objects.requireNonNull( - MockResponseTestFactory.MESSAGE_TYPE_BY_ATTACHMENT_FILENAME.get(name), - "Xta-attachment name '%s' has to be configured!".formatted(name) - ) - .equals("Geschaeftsgang.Geschaeftsgang.0201")) - .toList(); - - startServer(); - - nachrichtenBrokerMock.enqueue(MockResponseTestFactory.createGetStatusListResponse(xtaAttachmentFileNames)); - filteredAttachmentFileNames.forEach(xtaAttachmentFileName -> { - nachrichtenBrokerMock.enqueue(MockResponseTestFactory.createGetMessageResponse(xtaAttachmentFileName)); - if (expectCloseMessages) { - nachrichtenBrokerMock.enqueue(MockResponseTestFactory.createCloseResponse()); - } - } - ); - nachrichtenBrokerMock.enqueue(MockResponseTestFactory.createEmptyGetStatusListResponse()); - } - - @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 - public void teardownServer() { - if (nachrichtenBrokerMock == null) { - throw new RuntimeException("No server has been set up to tear down!"); - } - try { - var expectedCallCount = filteredAttachmentFileNames.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(); - } - } - - @SneakyThrows - private void stopServer() { - nachrichtenBrokerMock.shutdown(); - nachrichtenBrokerMock = null; - } - - } -} diff --git a/xta-adapter/src/test/java/de/ozgcloud/eingang/xta/XtaResponseTestFactory.java b/xta-adapter/src/test/java/de/ozgcloud/eingang/xta/XtaResponseTestFactory.java new file mode 100644 index 0000000000000000000000000000000000000000..6f63e3cc3492ff9aa9e0dc2bcf4f46ab0cfe89da --- /dev/null +++ b/xta-adapter/src/test/java/de/ozgcloud/eingang/xta/XtaResponseTestFactory.java @@ -0,0 +1,96 @@ +package de.ozgcloud.eingang.xta; + +import java.io.File; +import java.io.IOException; +import java.math.BigInteger; +import java.time.ZonedDateTime; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +import org.apache.commons.codec.Resources; + +import de.ozgcloud.common.binaryfile.TempFileUtils; + +public class XtaResponseTestFactory { + + public static final Map<String, String> MESSAGE_TYPE_BY_ATTACHMENT_FILENAME = Map.of( + "mantelantrag_without_anlage.zip", "Geschaeftsgang.Geschaeftsgang.0201", + "dfoerdermittel_without_anlage.zip", "Geschaeftsgang.Geschaeftsgang.0201", + "brauchtumsfeuer_without_anlage.zip", "Geschaeftsgang.Geschaeftsgang.0201", + "versammlungsanzeige.xml", "fim.S17000652.17000652001004", + "mantelantrag_with_anlage.zip", "Geschaeftsgang.Geschaeftsgang.0201", + "dfoerdermittel_with_anlage.zip", "Geschaeftsgang.Geschaeftsgang.0201", + "brauchtumsfeuer_with_anlage.zip", "Geschaeftsgang.Geschaeftsgang.0201", + "waffenschein.zip", "Geschaeftsgang.Geschaeftsgang.0201" + ); + + private static final Map<String, String> MESSAGE_ID_BY_ATTACHMENT_FILENAME = MESSAGE_TYPE_BY_ATTACHMENT_FILENAME + .keySet().stream() + .collect(Collectors.toMap(name -> name, name -> generateMessageID())); + + private static String generateMessageID() { + return "urn:de:xta:messageid:dataport_xta_210:%s".formatted(UUID.randomUUID().toString()); + } + + public static XtaMessageMetaDatasAndHeader createEmptyGetStatusListResponse() { + return XtaMessageMetaDatasAndHeader.builder() + .msgBoxRequestID("testid-empty") + .moreMessagesAvailable(false) + .messages(Stream.empty()) + .build(); + } + + public static XtaMessageMetaDatasAndHeader createGetStatusListResponse(List<String> xtaAttachmentFileNames) { + var messageMetaDataItems = xtaAttachmentFileNames.stream() + .map(name -> + XtaMessageMetaData.builder() + .messageId(new XtaMessageId(MESSAGE_ID_BY_ATTACHMENT_FILENAME.get(name))) + .messageType(MESSAGE_TYPE_BY_ATTACHMENT_FILENAME.get(name)) + .origin(ZonedDateTime.now()) + .delivery(ZonedDateTime.now()) + .build() + ) + .toList(); + + return XtaMessageMetaDatasAndHeader.builder() + .msgBoxRequestID("testid-withattachment") + .moreMessagesAvailable(true) + .messages(messageMetaDataItems.stream()) + .build(); + } + + public static XtaMessage createGetMessageResponse(String xtaAttachmentFileName) { + var attachmentPath = getAttachmentFilePath(xtaAttachmentFileName); + + File file; + try (var inputStream = Resources.getInputStream(attachmentPath)) { + file = TempFileUtils.writeTmpFile(inputStream); + } catch (IOException e) { + throw new RuntimeException(e); + } + + return XtaMessage.builder() + .messageFile(XtaFile.builder() + .contentType("application/zip") + .name(xtaAttachmentFileName) + .size(BigInteger.valueOf(file.length())) + .file(file) + .build()) + .build(); + } + + private static String getMessageType(String xtaAttachmentFileName) { + return Objects.requireNonNull( + MESSAGE_TYPE_BY_ATTACHMENT_FILENAME.get(xtaAttachmentFileName), + "Xta-message type for '%s' has to be configured!".formatted(xtaAttachmentFileName) + ); + } + + private static String getAttachmentFilePath(String xtaAttachmentFileName) { + return "mock-responses/getMessage/%s/%s".formatted(getMessageType(xtaAttachmentFileName), xtaAttachmentFileName); + } +} 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 deleted file mode 100644 index 5cbebb33620ba8ec6801326c71526527b2ebdc35..0000000000000000000000000000000000000000 --- a/xta-adapter/src/test/java/de/ozgcloud/eingang/xta/XtaServiceITCase.java +++ /dev/null @@ -1,83 +0,0 @@ -package de.ozgcloud.eingang.xta; - -import static org.assertj.core.api.Assertions.*; - -import java.util.List; - -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 lombok.SneakyThrows; - -@ActiveProfiles({ "itcase", "local" }) -@SpringBootTest(classes = { Application.class, XtaMockServerConfiguration.class }) -class XtaServiceITCase { - - @Autowired - private XtaMockServerConfiguration.XtaMocker xtaMocker; - - @Autowired - private XtaService xtaService; - - @DisplayName("get messages") - @Nested - class TestGetMessages { - - @BeforeEach - void setup() { - xtaMocker.setupServer(List.of( - "mantelantrag_without_anlage.zip", - "dfoerdermittel_without_anlage.zip", - "versammlungsanzeige.xml", - "waffenschein.zip" - ), false); - } - - @AfterEach - @SneakyThrows - void teardown() { - xtaMocker.teardownServer(); - } - - @DisplayName("should return data for waffenschein, mantelantrag and dfoerdermittel") - @Test - void shouldReturnDataForMantelantragAndDfoerdermittel() { - var formDataItems = xtaService.getMessages().toList(); - - assertThat(formDataItems).hasSize(3); - } - - @DisplayName("should unzip correct number of representations") - @Test - void shouldUnzipCorrectNumberOfRepresentations() { - var firstFormData = xtaService.getMessages().toList().getFirst(); - - assertThat(firstFormData.getRepresentations()).hasSize(3); - assertThat(firstFormData.getNumberOfRepresentations()).isEqualTo(3); - } - - @DisplayName("should unzip correct number of attachments") - @Test - void shouldUnzipCorrectNumberOfAttachments() { - var firstFormData = xtaService.getMessages().toList().getFirst(); - - assertThat(firstFormData.getAttachments()).isEmpty(); - } - - @DisplayName("should have vorgang nummer at correct length") - @Test - void shouldHaveVorgangNummerAtCorrectLength() { - var vorgangNumbers = xtaService.getMessages().map(formData -> formData.getHeader().getVorgangNummer()).toList(); - - assertThat(vorgangNumbers).isNotEmpty().allMatch(number -> number.length() == 9); - } - } - -} diff --git a/xta-adapter/src/test/resources/mock-responses/getMessage/Geschaeftsgang.Geschaeftsgang.0201/envelope.template.xml b/xta-adapter/src/test/resources/mock-responses/getMessage/Geschaeftsgang.Geschaeftsgang.0201/envelope.template.xml deleted file mode 100644 index e6f2da91fe005276ba66700d009ffa6de8e9de7b..0000000000000000000000000000000000000000 --- a/xta-adapter/src/test/resources/mock-responses/getMessage/Geschaeftsgang.Geschaeftsgang.0201/envelope.template.xml +++ /dev/null @@ -1,18 +0,0 @@ -<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:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" 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> - %s - </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="%s" size="%s"> - <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/fim.S17000652.17000652001004/envelope.template.xml b/xta-adapter/src/test/resources/mock-responses/getMessage/fim.S17000652.17000652001004/envelope.template.xml deleted file mode 100644 index 8e77bc1ff5e9f8e5f2b94137ee9c6e1501b43b04..0000000000000000000000000000000000000000 --- a/xta-adapter/src/test/resources/mock-responses/getMessage/fim.S17000652.17000652001004/envelope.template.xml +++ /dev/null @@ -1,18 +0,0 @@ -<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:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" 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> - %s - </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="%s" size="%s"> - <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/Geschaeftsgang.Geschaeftsgang.0201/afm.template.xml b/xta-adapter/src/test/resources/mock-responses/getStatusList/MessageMetaData/Geschaeftsgang.Geschaeftsgang.0201/afm.template.xml deleted file mode 100644 index 361033e4e2a2a3e91f56f408481230dbe71f2e25..0000000000000000000000000000000000000000 --- a/xta-adapter/src/test/resources/mock-responses/getStatusList/MessageMetaData/Geschaeftsgang.Geschaeftsgang.0201/afm.template.xml +++ /dev/null @@ -1,32 +0,0 @@ -<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>%s</MsgSize> -</MessageMetaData> diff --git a/xta-adapter/src/test/resources/mock-responses/getStatusList/MessageMetaData/Geschaeftsgang.Geschaeftsgang.0201/dfoerdermittel.template.xml b/xta-adapter/src/test/resources/mock-responses/getStatusList/MessageMetaData/Geschaeftsgang.Geschaeftsgang.0201/dfoerdermittel.template.xml deleted file mode 100644 index b5f50562d4406a57e481baea5a729329787cdd3f..0000000000000000000000000000000000000000 --- a/xta-adapter/src/test/resources/mock-responses/getStatusList/MessageMetaData/Geschaeftsgang.Geschaeftsgang.0201/dfoerdermittel.template.xml +++ /dev/null @@ -1,32 +0,0 @@ -<MessageMetaData xmlns="http://www.osci.eu/ws/2014/10/transport"> - <DeliveryAttributes> - <Origin>2024-04-26T13:35:41.6323321Z</Origin> - <Delivery>2024-04-26T15:35:45.607</Delivery> - </DeliveryAttributes> - <Originators> - <Author> - <Identifier type="xoev" category="Generischer Antragsdienst">gad:010200200000</Identifier> - </Author> - </Originators> - <Destinations> - <Reader> - <Identifier type="xoev" category="Generischer Antragsempfänger">gae:dev-environment@ozg-cloud.de</Identifier> - </Reader> - </Destinations> - <MsgIdentification> - <a:MessageID>%s</a:MessageID> - </MsgIdentification> - <Qualifier> - <Service>urn:xoev-de:xdomea:schema:2.4.0/xdomea240Antrag.wsdl</Service> - <BusinessScenario> - <Defined listURI="urn:de:dataport:codeliste:business.scenario" listVersionID="1"> - <code xmlns="">XDOMEAGAD_DATA</code> - <name xmlns=""/> - </Defined> - </BusinessScenario> - <MessageType listURI="urn:de:payloadSchema:elementName" listVersionID="1.0" payloadSchema="urn:xoev-de:xdomea:schema:2.4.0"> - <code xmlns="">Geschaeftsgang.Geschaeftsgang.0201</code> - </MessageType> - </Qualifier> - <MsgSize>%s</MsgSize> -</MessageMetaData> diff --git a/xta-adapter/src/test/resources/mock-responses/getStatusList/MessageMetaData/fim.S17000652.17000652001004/versammlungsanzeige.template.xml b/xta-adapter/src/test/resources/mock-responses/getStatusList/MessageMetaData/fim.S17000652.17000652001004/versammlungsanzeige.template.xml deleted file mode 100644 index 02b66074ed3eec73ec3018c92000bd6949821f3c..0000000000000000000000000000000000000000 --- a/xta-adapter/src/test/resources/mock-responses/getStatusList/MessageMetaData/fim.S17000652.17000652001004/versammlungsanzeige.template.xml +++ /dev/null @@ -1,37 +0,0 @@ -<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>%s</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 deleted file mode 100644 index 510d2b8cd48fc4c6629e53fee5d0263accd43127..0000000000000000000000000000000000000000 --- a/xta-adapter/src/test/resources/mock-responses/getStatusList/envelope.template.xml +++ /dev/null @@ -1,18 +0,0 @@ -<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> -