diff --git a/common/src/main/java/de/itvsh/kop/eingangsadapter/Application.java b/common/src/main/java/de/itvsh/kop/eingangsadapter/Application.java index c4604af02e546e855723ed488e8df97a65e8d063..1d2cf2ad415119685a59f7d5f7759bac810e1e59 100644 --- a/common/src/main/java/de/itvsh/kop/eingangsadapter/Application.java +++ b/common/src/main/java/de/itvsh/kop/eingangsadapter/Application.java @@ -27,7 +27,7 @@ import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.scheduling.annotation.EnableScheduling; -@SpringBootApplication(scanBasePackages = "de.itvsh.kop") +@SpringBootApplication(scanBasePackages = { "de.itvsh.kop", "de.ozgcloud" }) @EnableScheduling public class Application { diff --git a/common/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/common/src/main/resources/META-INF/additional-spring-configuration-metadata.json new file mode 100644 index 0000000000000000000000000000000000000000..d135ce00a6e4d882a6ebdb920769d21387a8cff7 --- /dev/null +++ b/common/src/main/resources/META-INF/additional-spring-configuration-metadata.json @@ -0,0 +1,5 @@ +{"properties": [{ + "name": "ozgcloud.xta.actions.status-list", + "type": "java.lang.String", + "description": "A description for 'ozgcloud.xta.actions.status-list'" +}]} \ No newline at end of file diff --git a/xta-adapter/pom.xml b/xta-adapter/pom.xml index e0c6f9b8f9b1727e66b4a63ac7f98e3e37656450..6b216bd1d73d1ce3462461d767731e076b2eda37 100644 --- a/xta-adapter/pom.xml +++ b/xta-adapter/pom.xml @@ -3,7 +3,7 @@ <parent> <groupId>de.itvsh.kop.eingangsadapter</groupId> <artifactId>parent</artifactId> - <version>1.6.0</version> + <version>1.7.0-SNAPSHOT</version> </parent> <artifactId>xta-adapter</artifactId> <name>Eingangs Adapter - XTA</name> @@ -19,43 +19,76 @@ </exclusion> </exclusions> </dependency> + <dependency> + <groupId>org.springframework.ws</groupId> + <artifactId>spring-ws-security</artifactId> + </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-log4j2</artifactId> + </dependency> <!--mapstruct--> <dependency> <groupId>org.mapstruct</groupId> <artifactId>mapstruct</artifactId> </dependency> - <dependency> <groupId>org.springframework.ws</groupId> <artifactId>spring-ws-core</artifactId> </dependency> - <dependency> <groupId>org.springframework.ws</groupId> <artifactId>spring-ws-support</artifactId> </dependency> - + <!--own project --> + <dependency> + <groupId>de.itvsh.kop.eingangsadapter</groupId> + <artifactId>common</artifactId> + </dependency> <!-- JAXB API only --> - <dependency> - <groupId>jakarta.xml.bind</groupId> - <artifactId>jakarta.xml.bind-api</artifactId> - <version>2.3.3</version> - </dependency> - - <dependency> - <groupId>com.sun.xml.bind</groupId> - <artifactId>jaxb-impl</artifactId> <version>2.3.3</version> - </dependency> + <dependency> + <groupId>jakarta.xml.bind</groupId> + <artifactId>jakarta.xml.bind-api</artifactId> + <!-- <version>2.3.3</version>--> + </dependency> + <dependency> + <groupId>com.sun.xml.bind</groupId> + <artifactId>jaxb-impl</artifactId> + <!-- <version>2.3.3</version>--> + </dependency> <!-- https://mvnrepository.com/artifact/javax.xml.ws/jaxws-api --> -<!--<dependency>--> -<!-- <groupId>javax.xml.ws</groupId>--> -<!-- <artifactId>jaxws-impl</artifactId>--> -<!-- <version>2.3.1</version>--> -<!--</dependency>--> - + <!--<dependency>--> + <!-- <groupId>javax.xml.ws</groupId>--> + <!-- <artifactId>jaxws-impl</artifactId>--> + <!-- <version>2.3.1</version>--> + <!--</dependency>--> </dependencies> <build> <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + </plugin> + <plugin> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-maven-plugin</artifactId> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-failsafe-plugin</artifactId> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-plugin</artifactId> + </plugin> + <plugin> + <groupId>org.jacoco</groupId> + <artifactId>jacoco-maven-plugin</artifactId> + </plugin> + <plugin> + <groupId>pl.project13.maven</groupId> + <artifactId>git-commit-id-plugin</artifactId> + </plugin> <!-- <plugin>--> <!-- <groupId>com.evolvedbinary.maven.jvnet</groupId>--> <!-- <artifactId>jaxb30-maven-plugin</artifactId>--> @@ -77,46 +110,46 @@ <!-- </execution>--> <!-- </executions>--> <!-- </plugin>--> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>jaxb2-maven-plugin</artifactId> -<!-- <version>2.5.0</version>--> - <executions> - <!-- <execution>--> - <!-- <id>schema files</id>--> - <!-- <phase>generate-sources</phase>--> - <!-- <goals>--> - <!-- <goal>xjc</goal>--> - <!-- </goals>--> - <!-- <configuration>--> - <!-- <sourceType>xmlschema</sourceType>--> - <!-- </configuration>--> - <!-- </execution>--> - <execution> - <id>wsdl1</id> - <goals> - <goal>xjc</goal> - </goals> - <configuration> - <sourceType>wsdl</sourceType> - <sources> - <source>${basedir}/src/main/resources/XTA.wsdl</source> - </sources> -<!-- <--> -<!-- <schemaDirectory>src/main/resources/schema/wsdl</schemaDirectory>--> - <clearOutputDir>false</clearOutputDir> - <arguments>-wsdl</arguments> - </configuration> - </execution> - </executions> - <!-- <dependencies>--> - <!-- <dependency>--> - <!-- <groupId>org.glassfish.jaxb</groupId>--> - <!-- <artifactId>jaxb-runtime</artifactId>--> - <!-- <version>4.0.1</version>--> - <!-- </dependency>--> - <!-- </dependencies>--> - </plugin> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>jaxb2-maven-plugin</artifactId> + <!-- <version>2.5.0</version>--> + <executions> + <!-- <execution>--> + <!-- <id>schema files</id>--> + <!-- <phase>generate-sources</phase>--> + <!-- <goals>--> + <!-- <goal>xjc</goal>--> + <!-- </goals>--> + <!-- <configuration>--> + <!-- <sourceType>xmlschema</sourceType>--> + <!-- </configuration>--> + <!-- </execution>--> + <execution> + <id>wsdl1</id> + <goals> + <goal>xjc</goal> + </goals> + <configuration> + <sourceType>wsdl</sourceType> + <sources> + <source>${basedir}/src/main/resources/XTA.wsdl</source> + </sources> + <!-- <--> + <!-- <schemaDirectory>src/main/resources/schema/wsdl</schemaDirectory>--> + <clearOutputDir>false</clearOutputDir> + <arguments>-wsdl</arguments> + </configuration> + </execution> + </executions> + <!-- <dependencies>--> + <!-- <dependency>--> + <!-- <groupId>org.glassfish.jaxb</groupId>--> + <!-- <artifactId>jaxb-runtime</artifactId>--> + <!-- <version>4.0.1</version>--> + <!-- </dependency>--> + <!-- </dependencies>--> + </plugin> </plugins> </build> </project> \ No newline at end of file diff --git a/xta-adapter/readme.md b/xta-adapter/readme.md new file mode 100644 index 0000000000000000000000000000000000000000..9381635bcfd41fd16ed992cd5ae185155758ea17 --- /dev/null +++ b/xta-adapter/readme.md @@ -0,0 +1,5 @@ +# Ceritifcade chain + +lokal das Root CA in keystore laden: + + sudo keytool -trustcacerts -keystore /lib/jvm/java-1.17.0-openjdk-amd64/lib/security/cacerts -storepass changeit -importcert -alias dataportRoot -file DataportRootCA02.crt \ No newline at end of file diff --git a/xta-adapter/src/main/java/de/ozgcloud/eingang/xta/WsHeaderAddingInterceptor.java b/xta-adapter/src/main/java/de/ozgcloud/eingang/xta/WsHeaderAddingInterceptor.java new file mode 100644 index 0000000000000000000000000000000000000000..f776e3eaa03623fa326221a4551bdea4475c5865 --- /dev/null +++ b/xta-adapter/src/main/java/de/ozgcloud/eingang/xta/WsHeaderAddingInterceptor.java @@ -0,0 +1,66 @@ +package de.ozgcloud.eingang.xta; + +import jakarta.xml.bind.JAXBContext; +import jakarta.xml.bind.JAXBElement; +import jakarta.xml.bind.JAXBException; + +import org.springframework.stereotype.Component; +import org.springframework.ws.client.WebServiceClientException; +import org.springframework.ws.client.support.interceptor.ClientInterceptor; +import org.springframework.ws.context.MessageContext; +import org.springframework.ws.soap.SoapMessage; + +import de.itvsh.kop.eingangsadapter.common.errorhandling.TechnicalException; +import eu.osci.ws._2014._10.transport.OriginatorsType; +import eu.osci.ws._2014._10.transport.PartyIdentifierType; +import eu.osci.ws._2014._10.transport.PartyType; + +@Component +class WsHeaderAddingInterceptor implements ClientInterceptor { + + @Override + public boolean handleRequest(MessageContext messageContext) throws WebServiceClientException { + var soapMessage = (SoapMessage) messageContext.getRequest(); + var header = soapMessage.getSoapHeader(); + + try { + JAXBContext context = JAXBContext.newInstance(PartyType.class); + var marshaller = context.createMarshaller(); + marshaller.marshal(createAuthor(), header.getResult()); + } catch (JAXBException e) { + throw new TechnicalException("Error on handling Request for adding Header.", e); + } + + return true; + } + + JAXBElement<PartyType> createAuthor() { + eu.osci.ws._2014._10.transport.ObjectFactory objectFactory = new eu.osci.ws._2014._10.transport.ObjectFactory(); + + PartyType partyType = new PartyType(); + PartyIdentifierType identifier = new PartyIdentifierType(); + identifier.setValue("gae:jens.reese@mgm-tp.com"); + partyType.setIdentifier(identifier); + + var origin = new OriginatorsType(); + origin.setAuthor(partyType); + + return objectFactory.createAuthor(partyType); + } + + @Override + public boolean handleResponse(MessageContext messageContext) throws WebServiceClientException { + return true; + } + + @Override + public boolean handleFault(MessageContext messageContext) throws WebServiceClientException { + return true; + } + + @Override + public void afterCompletion(MessageContext messageContext, Exception ex) throws WebServiceClientException { + // nothing to do here + } + +} diff --git a/xta-adapter/src/main/java/de/ozgcloud/eingang/xta/XtaProperties.java b/xta-adapter/src/main/java/de/ozgcloud/eingang/xta/XtaProperties.java new file mode 100644 index 0000000000000000000000000000000000000000..0a98e237da4179e49cc899a44991220684a05e99 --- /dev/null +++ b/xta-adapter/src/main/java/de/ozgcloud/eingang/xta/XtaProperties.java @@ -0,0 +1,76 @@ +package de.ozgcloud.eingang.xta; + +import java.math.BigInteger; +import java.net.URI; + +import jakarta.validation.constraints.NotEmpty; +import jakarta.validation.constraints.NotNull; + +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.context.annotation.Configuration; +import org.springframework.core.io.Resource; +import org.springframework.stereotype.Component; +import org.springframework.validation.annotation.Validated; + +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; + +@Validated +@ToString +@Setter +@Getter +@Configuration +@ConfigurationProperties(prefix = XtaProperties.PROPERTIES_PREFIX) +class XtaProperties { + static final String PROPERTIES_PREFIX = "ozgcloud.xta"; + + private Server server; + private BigInteger maxListElements; + + private KeyStore keyStore; + private Actions actions; +} + +@Validated +@ToString +@Getter +@Setter +@Component +@ConfigurationProperties(prefix = Server.PROPERTIES_PREFIX) +class Server { + static final String PROPERTIES_PREFIX = XtaProperties.PROPERTIES_PREFIX + ".server"; + + @NotEmpty + private String name; + private String address; +} + +@Validated +@ToString +@Getter +@Setter +@Component +@ConfigurationProperties(prefix = KeyStore.PROPERTIES_PREFIX) +class KeyStore { + static final String PROPERTIES_PREFIX = XtaProperties.PROPERTIES_PREFIX + ".keystore"; + + @NotNull + private Resource file; + private String type = "PKCS12"; + @NotEmpty + private char[] password; +} + +@Validated +@ToString +@Setter +@Getter +@Configuration +@ConfigurationProperties(prefix = Actions.PROPERTIES_PREFIX) +class Actions { + static final String PROPERTIES_PREFIX = XtaProperties.PROPERTIES_PREFIX + ".actions"; + + @NotNull + private URI statusList; +} diff --git a/xta-adapter/src/main/java/de/ozgcloud/eingang/xta/XtaRemoteService.java b/xta-adapter/src/main/java/de/ozgcloud/eingang/xta/XtaRemoteService.java index e53c53ebae4c51c9d4928647cb640b1205aebb6e..40d588c0f0369bbf81b4bdab4da8f90172d2fded 100644 --- a/xta-adapter/src/main/java/de/ozgcloud/eingang/xta/XtaRemoteService.java +++ b/xta-adapter/src/main/java/de/ozgcloud/eingang/xta/XtaRemoteService.java @@ -1,53 +1,64 @@ package de.ozgcloud.eingang.xta; -import java.math.BigInteger; import java.net.URI; import java.net.URISyntaxException; -import javax.xml.bind.JAXBElement; +import jakarta.annotation.PostConstruct; +import jakarta.validation.Valid; +import jakarta.xml.bind.JAXBElement; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.webservices.client.WebServiceTemplateBuilder; import org.springframework.stereotype.Service; -import org.springframework.ws.client.core.support.WebServiceGatewaySupport; +import org.springframework.ws.client.core.WebServiceTemplate; import org.springframework.ws.soap.addressing.client.ActionCallback; -import org.springframework.ws.soap.addressing.core.EndpointReference; +import org.springframework.ws.soap.addressing.version.Addressing10; +import de.itvsh.kop.eingangsadapter.common.errorhandling.TechnicalException; import eu.osci.ws._2008._05.transport.MsgBoxStatusListRequestType; import eu.osci.ws._2008._05.transport.MsgStatusListType; import eu.osci.ws._2008._05.transport.ObjectFactory; -import lombok.extern.java.Log; @Service -@Log -class XtaRemoteService extends WebServiceGatewaySupport { +class XtaRemoteService { -// @Autowired -// private XtaMessageMetaDataMapper mapper; + private static final String URI_TEMPLATE = "https://%s/MB_XTA-WS/XTA210msgBoxPort.svc"; -// public Stream<XtaMessageMetaData> getMessagesMetadata() { -// return getStatusList().getMessageMetaData().stream().map(mapper::fromSoap); -// // TODO load more message with getNextStatusList -// } + @Autowired + @Valid + private XtaProperties properties; - MsgStatusListType getStatusList() throws URISyntaxException { + @Autowired + private WebServiceTemplateBuilder webServiceTemplateBuilder; - ObjectFactory objectFactory = new ObjectFactory(); -// - MsgBoxStatusListRequestType msg = new MsgBoxStatusListRequestType(); - msg.setMaxListItems(BigInteger.valueOf(5)); - JAXBElement<MsgBoxStatusListRequestType> getStatusList = objectFactory.createMsgBoxStatusListRequest(msg); -// -// getWebServiceTemplate() -// .marshalSendAndReceive(objectFactory.createSendBspNachrichtNative(sendBspNachrichtNative))) -// .getValue(); + private WebServiceTemplate template; + + @PostConstruct + void init() { + template = webServiceTemplateBuilder.build(); + } + + @SuppressWarnings("unchecked") + MsgStatusListType getStatusList() { + var callback = new ActionCallback(properties.getActions().getStatusList(), new Addressing10(), getTargetUri()); -// LOG. + return ((JAXBElement<MsgStatusListType>) template.marshalSendAndReceive(buildListRequest(), callback)).getValue(); + } + + private JAXBElement<MsgBoxStatusListRequestType> buildListRequest() { + ObjectFactory objectFactory = new ObjectFactory(); - var callback = new ActionCallback(new URI("http://LI33-0005/MB_XTA-WS/XTA210msgBoxPort.svc")); - callback.setReplyTo(new EndpointReference(new URI("https://localhost:3000/MB_XTA-WS/XTA210msgBoxPort.svc"))); + MsgBoxStatusListRequestType msg = new MsgBoxStatusListRequestType(); + msg.setMaxListItems(properties.getMaxListElements()); + return objectFactory.createMsgBoxStatusListRequest(msg); + } - return ((JAXBElement<MsgStatusListType>) getWebServiceTemplate().marshalSendAndReceive( - "https://localhost:3000/MB_XTA-WS/XTA210msgBoxPort.svc", - getStatusList, callback)).getValue(); + private URI getTargetUri() { + try { + return new URI(URI_TEMPLATE.formatted(properties.getServer().getName())); + } catch (URISyntaxException e) { + throw new TechnicalException("Error building target url: " + e); + } } public XtaMessage getMessage(XtaMessageId messageId) { @@ -55,4 +66,4 @@ class XtaRemoteService extends WebServiceGatewaySupport { return null; } -} \ No newline at end of file +} diff --git a/xta-adapter/src/main/java/de/ozgcloud/eingang/xta/XtaRemoteServiceConfiguration.java b/xta-adapter/src/main/java/de/ozgcloud/eingang/xta/XtaRemoteServiceConfiguration.java index 345a46804acb180b45c880cb2f91f44227ee1285..d4032da259127b2a444ca516173bc95f048e0935 100644 --- a/xta-adapter/src/main/java/de/ozgcloud/eingang/xta/XtaRemoteServiceConfiguration.java +++ b/xta-adapter/src/main/java/de/ozgcloud/eingang/xta/XtaRemoteServiceConfiguration.java @@ -2,10 +2,11 @@ package de.ozgcloud.eingang.xta; import java.io.IOException; import java.io.InputStream; +import java.net.URI; +import java.net.URISyntaxException; import java.security.KeyStore; import java.security.KeyStoreException; import java.security.NoSuchAlgorithmException; -import java.security.UnrecoverableKeyException; import java.security.cert.CertificateException; import java.security.cert.X509Certificate; @@ -15,69 +16,118 @@ import javax.net.ssl.SSLSession; import javax.net.ssl.TrustManager; import javax.net.ssl.X509TrustManager; -import org.springframework.beans.factory.annotation.Value; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.webservices.client.WebServiceTemplateCustomizer; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import org.springframework.core.io.Resource; import org.springframework.oxm.jaxb.Jaxb2Marshaller; +import org.springframework.ws.client.support.destination.DestinationProvider; +import org.springframework.ws.client.support.interceptor.ClientInterceptor; +import org.springframework.ws.soap.SoapVersion; +import org.springframework.ws.soap.saaj.SaajSoapMessageFactory; +import org.springframework.ws.transport.WebServiceMessageSender; import org.springframework.ws.transport.http.HttpsUrlConnectionMessageSender; +import de.itvsh.kop.eingangsadapter.common.errorhandling.TechnicalException; + @Configuration public class XtaRemoteServiceConfiguration { private static final String KEYSTORE_TYPE = "PKCS12"; - @Value("classpath:KOP_SH_KIEL_DEV.p12") - private Resource certificate; - - private String certificateKey = ""; + @Autowired + private XtaProperties properties; @Bean - public Jaxb2Marshaller marshaller() { + Jaxb2Marshaller marshaller() { Jaxb2Marshaller marshaller = new Jaxb2Marshaller(); marshaller.setContextPath("eu.osci.ws._2008._05.transport"); + marshaller.setMtomEnabled(true); return marshaller; } @Bean - public XtaRemoteService xtaRemoteService(Jaxb2Marshaller marshaller) - throws UnrecoverableKeyException, KeyStoreException, CertificateException, NoSuchAlgorithmException, IOException { - XtaRemoteService client = new XtaRemoteService(); - client.setDefaultUri("https://localhost:3000/MB_XTA-WS/XTA210msgBoxPort.svc"); - marshaller.setMtomEnabled(true); - client.setMarshaller(marshaller); - client.setUnmarshaller(marshaller); + WebServiceTemplateCustomizer webServiceTemplateCustomizer() { + return template -> template + .setMessageSender(messageSender()); + } + + @Bean + WebServiceTemplateCustomizer setMarshallerCustomizer() { + return template -> { + template.setMarshaller(marshaller()); + template.setUnmarshaller(marshaller()); + }; + } - client.setMessageSender(initMessageSender()); - return client; + @Bean + WebServiceTemplateCustomizer setMessageFactoryCustomizer() { + return template -> template.setMessageFactory(messageFactory()); } - HttpsUrlConnectionMessageSender initMessageSender() - throws KeyStoreException, CertificateException, NoSuchAlgorithmException, IOException, UnrecoverableKeyException { - var keyManagerFactory = KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm()); - keyManagerFactory.init(getKeyStore(), certificateKey.toCharArray()); + @Bean + WebServiceTemplateCustomizer addingInterceptorCustomizer(WsHeaderAddingInterceptor interceptor) { + return template -> template.setInterceptors(new ClientInterceptor[] { interceptor }); + } - var messageSender = new HttpsUrlConnectionMessageSender(); - messageSender.setKeyManagers(keyManagerFactory.getKeyManagers()); - messageSender.setTrustManagers(new TrustManager[] { new UnTrustworthyTrustManager() }); - messageSender.setHostnameVerifier(new HostnameVerifier() { + @Bean + WebServiceTemplateCustomizer setDestionationProvider() { + return template -> template.setDestinationProvider(destinationProvider()); + } - @Override - public boolean verify(String hostname, SSLSession session) { - return true; + @Bean + DestinationProvider destinationProvider() { + return () -> { + try { + return new URI("https://localhost:3000/MB_XTA-WS/XTA210msgBoxPort.svc"); + } catch (URISyntaxException e) { + throw new TechnicalException("Error building URI", e); } - }); - return messageSender; + }; + } + + @Bean + SaajSoapMessageFactory messageFactory() { + SaajSoapMessageFactory messageFactory = new SaajSoapMessageFactory(); + messageFactory.setSoapVersion(SoapVersion.SOAP_12); + return messageFactory; + } + + @Bean + WebServiceMessageSender messageSender() { + return initMessageSender(); + } + + HttpsUrlConnectionMessageSender initMessageSender() { + try { + var keyManagerFactory = KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm()); + keyManagerFactory.init(xtaKeyStore(), properties.getKeyStore().getPassword()); + + var messageSender = new HttpsUrlConnectionMessageSender(); + messageSender.setKeyManagers(keyManagerFactory.getKeyManagers()); + messageSender.setTrustManagers(new TrustManager[] { new UnTrustworthyTrustManager() }); + messageSender.setHostnameVerifier(new HostnameVerifier() { + + @Override + public boolean verify(String hostname, SSLSession session) { + return true; + } + }); + return messageSender; + } catch (Exception e) { + throw new TechnicalException("Error initializating message sender.", e); + } } - KeyStore getKeyStore() throws KeyStoreException, CertificateException, NoSuchAlgorithmException, IOException { - var keyStoreResource = certificate; + @Bean + KeyStore xtaKeyStore() throws KeyStoreException, CertificateException, NoSuchAlgorithmException, IOException { + var keyStoreResource = properties.getKeyStore().getFile(); // var keysres = XtaRemoteServiceConfiguration.class.getResourceAsStream("/KOP_SH_KIEL_DEV.p12"); // assert (keysres != null); var keyStore = KeyStore.getInstance(KEYSTORE_TYPE); try (InputStream keyStoreStream = keyStoreResource.getInputStream()) { // try (InputStream keyStoreStream = keysres) { - keyStore.load(keyStoreStream, certificateKey.toCharArray()); + keyStore.load(keyStoreStream, properties.getKeyStore().getPassword()); } return keyStore; diff --git a/xta-adapter/src/main/resources/XTA.wsdl b/xta-adapter/src/main/resources/XTA.wsdl index 3e449f77070181c827fbd6b524b7122d474f2c76..1209ef802d0c6eab11a958ab95b72149a2cba1a6 100644 --- a/xta-adapter/src/main/resources/XTA.wsdl +++ b/xta-adapter/src/main/resources/XTA.wsdl @@ -1,669 +1,202 @@ -<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" -targetNamespace="http://xoev.de/transport/xta/211" -xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" -xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" -xmlns:xsd="http://www.w3.org/2001/XMLSchema" -xmlns:wsa="http://www.w3.org/2005/08/addressing" -xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap12/" -xmlns:wspmtom="http://schemas.xmlsoap.org/ws/2004/09/policy/optimizedmimeserialization" -xmlns:osci="http://www.osci.eu/ws/2008/05/transport" -xmlns:wsp="http://www.w3.org/ns/ws-policy" -xmlns:oscimeta="http://www.osci.eu/ws/2014/10/transport" -xmlns:wsu="oasis-200401-wss-wssecurity-utility-1.0.xsd" -xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702" -xmlns:s12="http://www.w3.org/2003/05/soap-envelope" -xmlns:xta="http://xoev.de/transport/xta/211" name="XTA-Webservice"> - <wsp:Policy wsu:Id="osciCommon"> - <!--###### general osci policies ##########--> - <wsp:All> - <wsam:Addressing wsp:Optional="false"> - <wsp:Policy> - <wsam:AnonymousResponses/> - </wsp:Policy> - </wsam:Addressing> - <wspmtom:OptimizedMimeSerialization/> - <sp:Wss11> - <wsp:Policy> - <sp:MustSupportRefKeyIdentifier/> - <sp:MustSupportRefIssuerSerial/> - <sp:MustSupportRefThumbprint/> - <sp:MustSupportRefEncryptedKey/> - <sp:RequireSignatureConfirmation/> - </wsp:Policy> - </sp:Wss11> - <sp:Trust13> - <wsp:Policy> - <sp:MustSupportIssuedTokens/> - <sp:RequireClientEntropy/> - <sp:RequireServerEntropy/> - </wsp:Policy> - </sp:Trust13> - </wsp:All> - </wsp:Policy> - <wsp:Policy wsu:Id="TransportBindingPolicy"> - <wsp:ExactlyOne> - <wsp:All> - <sp:TransportBinding> - <wsp:Policy> - <sp:TransportToken> - <wsp:Policy> - <sp:HttpsToken RequireClientCertificate="true"/> - </wsp:Policy> - </sp:TransportToken> - <sp:AlgorithmSuite> - <wsp:Policy> - <sp:Basic256/> - </wsp:Policy> - </sp:AlgorithmSuite> - <sp:Layout> - <wsp:Policy> - <sp:Lax/> - </wsp:Policy> - </sp:Layout> - <!-- sp:IncludeTimestamp/ --> - </wsp:Policy> - </sp:TransportBinding> - <!-- sp:Wss10> - <wsp:Policy> - <sp:MustSupportRefKeyIdentifier/> - </wsp:Policy> - </sp:Wss10 --> - </wsp:All> - </wsp:ExactlyOne> - </wsp:Policy> - <!--Datenstrukturen --> - <types> - <xsd:schema targetNamespace="http://xoev.de/transport/xta/211"> - <xsd:import namespace="http://www.osci.eu/ws/2014/10/transport" schemaLocation="../xsd/OSCI_MessageMetaData_V2.02.xsd"/> - <xsd:import namespace="http://www.osci.eu/ws/2008/05/transport" schemaLocation="../xsd/OSCI2_02.xsd"/> - <xsd:include schemaLocation="../xsd/XTA-Webservice-Globale-Elemente.xsd"/> - <xsd:include schemaLocation="../xsd/XTA-Webservice-Exceptions.xsd"/> - - <!--<xsd:element name="getStatusList"> - <xsd:complexType> - <xsd:all> - <xsd:element name="getStatusList" type="xsd:string"/> - </xsd:all> - </xsd:complexType> - </xsd:element>--> - - <!--<xsd:complexType name='getStatusList'> - <xsd:sequence> - <xsd:element minOccurs='1' name='FetchRequest' - type='xsd:base64Binary' /> - </xsd:sequence> - </xsd:complexType>--> - - <!--<xsd:element name="getStatusList"> - <xsd:complexType> - <xsd:all> - <xsd:element name="tickerSymbol" type="xsd:string"/> - </xsd:all> - </xsd:complexType> - </xsd:element>--> - -<!-- <xsd:element name='MsgBoxStatusListRequest' type='osci:MsgBoxStatusListRequest'> - <xsd:complexType name='MsgBoxStatusListRequest'> - <xsd:sequence> - <xsd:element minOccurs='1' name='FetchResponse' - type='xsd:base64Binary' /> - </xsd:sequence> - </xsd:complexType> - </xsd:element> ---> - <xsd:element name="MsgBoxStatusListRequest" type="osci:MsgBoxStatusListRequestType"/> - <xsd:complexType name="MsgBoxStatusListRequest"> - <xsd:complexContent> - <xsd:extension base="osci:MsgBoxRequestType"> - <xsd:attribute name="maxListItems" type="xsd:positiveInteger"/> - <xsd:attribute name="ListForm"> - <xsd:simpleType> - <xsd:restriction base="xsd:NMTOKEN"> - <xsd:enumeration value="MsgAtrributes"/> - <xsd:enumeration value="MessageMetaData"/> - </xsd:restriction> - </xsd:simpleType> - </xsd:attribute> - </xsd:extension> - </xsd:complexContent> - </xsd:complexType> - - - </xsd:schema> - </types> - <!--Nachrichten --> - <message name="EmptyBody"/> - <message name="XTAHeader"> - <part name="AuthorIdentifier" element="oscimeta:Author"/> - <part name="MessageMetaData" element="oscimeta:MessageMetaData"/> - </message> - <message name="LookupServiceRequest"> - <part name="LookupServiceRequest" element="xta:LookupServiceRequest"/> - </message> - <message name="LookupServiceResponse"> - <part name="LookupServiceResponse" element="xta:LookupServiceResponse"/> - </message> - <message name="GetTransportReportResponse"> - <part name="GetTransportReportResponse" element="xta:TransportReport"/> - </message> - <message name="GenericContainerBody"> - <part name="GenericContainer" element="xta:GenericContentContainer"/> - </message> - <message name="MessageID"> - <part name="MessageID" element="wsa:MessageID"/> - </message> - <message name="OptHeaders"> - <part name="FetchResponseHeader" element="osci:MsgBoxResponse"/> - <part name="X509TokenContainer" element="osci:X509TokenContainer"/> - </message> - <message name="FetchMsgRequest"> - <part name="FetchRequest" element="osci:MsgBoxFetchRequest"/> - </message> - <message name="GetNextRequest"> - <part name="FetchRequest" element="osci:MsgBoxGetNextRequest"/> - </message> - <message name="CloseRequest"> - <part name="FetchRequest" element="osci:MsgBoxCloseRequest"/> - </message> - <message name="FetchListRequest"> - <part name="FetchRequest" element="osci:MsgBoxStatusListRequest"/> - </message> - <message name="FetchListResponse"> - <part name="FetchResponse" element="osci:MsgStatusList"/> - </message> - <!--Nachrichten - SOAP-Exceptions--> - <message name="PermissionDeniedException"> - <part name="permissionDeniedException" element="xta:PermissionDeniedException"/> - </message> - <message name="XTAWSTechnicalProblemException"> - <part name="xtawsTechnicalProblem" element="xta:XTAWSTechnicalProblemException"/> - </message> - <message name="ParameterIsNotValidException"> - <part name="parameterIsNotValidException" element="xta:ParameterIsNotValidException"/> - </message> - <message name="MessageSchemaViolationException"> - <part name="messageSchemaViolationException" element="xta:MessageSchemaViolationException"/> - </message> - <message name="MessageVirusDetectionException"> - <part name="messageVirusDetectionException" element="xta:MessageVirusDetectionException"/> - </message> - <message name="SyncAsyncException"> - <part name="syncAsyncException" element="xta:SyncAsyncException"/> - </message> - <message name="InvalidMessageIDException"> - <!-- <part name="invalidMessageIDException" element="xta:InvalidMessageIdException"/> ---> - <part name="invalidMessageIDException" element="xta:InvalidMessageIDException"/> - </message> - <message name="CancelDeniedException"> - <part name="cancelDeniedException" element="xta:CancelDeniedException"/> - </message> - <!--Interfaces --> - <portType name="managementPortType"> - <documentation>xta managementPort</documentation> - <operation name="checkAccountActive"> - <input message="xta:EmptyBody" wsam:Action="http://www.xta.de/XTA/CheckAccountActive"/> - <output message="xta:EmptyBody" wsam:Action="http://www.xta.de/XTA/CheckAccountActive"> - <documentation>only for exception handling</documentation> - </output> - <fault name="PermissionDeniedException" message="xta:PermissionDeniedException" wsam:Action="http://www.xta.de/XTA/CheckAccountActive"/> - <fault name="XTAWSTechnicalProblemException" message="xta:XTAWSTechnicalProblemException" wsam:Action="http://www.xta.de/XTA/CheckAccountActive"/> - </operation> - <operation name="lookupService"> - <input message="xta:LookupServiceRequest" wsam:Action="http://www.xta.de/XTA/IsServiceAvailable"/> - <output message="xta:LookupServiceResponse" wsam:Action="http://www.xta.de/XTA/IsServiceAvailable"/> - <fault name="PermissionDeniedException" message="xta:PermissionDeniedException" wsam:Action="http://www.xta.de/XTA/IsServiceAvailable"/> - <fault name="ParameterIsNotValid" message="xta:ParameterIsNotValidException" wsam:Action="http://www.xta.de/XTA/IsServiceAvailable"/> - <fault name="XTAWSTechnicalProblemException" message="xta:XTAWSTechnicalProblemException" wsam:Action="http://www.xta.de/XTA/IsServiceAvailable"/> - </operation> - <operation name="getTransportReport"> - <input message="xta:MessageID" wsam:Action="http://www.xta.de/XTA/GetTransportReport"/> - <output message="xta:GetTransportReportResponse" wsam:Action="http://www.xta.de/XTA/GetTransportReport"/> - <fault name="PermissionDeniedException" message="xta:PermissionDeniedException" wsam:Action="http://www.xta.de/XTA/GetTransportReport"/> - <fault name="XTAWSTechnicalProblemException" message="xta:XTAWSTechnicalProblemException" wsam:Action="http://www.xta.de/XTA/GetTransportReport"/> - <fault name="InvalidMessageIDException" message="xta:InvalidMessageIDException" wsam:Action="http://www.xta.de/XTA/GetTransportReport"/> - </operation> - <operation name="cancelMessage"> - <input message="xta:MessageID" wsam:Action="http://www.xta.de/XTA/CancelMessage"/> - <output message="xta:EmptyBody" wsam:Action="http://www.xta.de/XTA/CancelMessage"> - <documentation>only for exception handling</documentation> - </output> - <fault name="PermissionDeniedException" message="xta:PermissionDeniedException" wsam:Action="http://www.xta.de/XTA/CancelMessage"/> - <fault name="ParameterIsNotValidException" message="xta:ParameterIsNotValidException" wsam:Action="http://www.xta.de/XTA/CancelMessage"/> - <fault name="XTAWSTechnicalProblemException" message="xta:XTAWSTechnicalProblemException" wsam:Action="http://www.xta.de/XTA/CancelMessage"/> - <fault name="CancelDeniedException" message="xta:CancelDeniedException" wsam:Action="http://www.xta.de/XTA/CancelMessage"/> - </operation> - <operation name="createMessageId"> - <input message="xta:EmptyBody" wsam:Action="http://www.xta.de/XTA/CreateMessageID"/> - <output message="xta:MessageID" wsam:Action="http://www.xta.de/XTA/CreateMessageID"/> - <fault name="PermissionDeniedException" message="xta:PermissionDeniedException" wsam:Action="http://www.xta.de/XTA/CreateMessageID"/> - <fault name="XTAWSTechnicalProblemException" message="xta:XTAWSTechnicalProblemException" wsam:Action="http://www.xta.de/XTA/CreateMessageID"/> - </operation> - </portType> - <portType name="sendPortType"> - <documentation>sendPort</documentation> - <operation name="sendMessage"> - <input message="xta:GenericContainerBody" wsam:Action="http://www.xta.de/XTA/SendMessage"/> - <output message="xta:EmptyBody" wsam:Action="http://www.xta.de/XTA/SendMessage"/> - <fault name="PermissionDeniedException" message="xta:PermissionDeniedException" wsam:Action="http://www.xta.de/XTA/SendMessage"/> - <fault name="ParameterIsNotValidException" message="xta:ParameterIsNotValidException" wsam:Action="http://www.xta.de/XTA/SendMessage"/> - <fault name="XTAWSTechnicalProblemException" message="xta:XTAWSTechnicalProblemException" wsam:Action="http://www.xta.de/XTA/SendMessage"/> - <fault name="MessageSchemaViolationException" message="xta:MessageSchemaViolationException" wsam:Action="http://www.xta.de/XTA/SendMessage"/> - <fault name="MessageVirusDetectionException" message="xta:MessageVirusDetectionException" wsam:Action="http://www.xta.de/XTA/SendMessage"/> - <fault name="SyncAsyncException" message="xta:SyncAsyncException" wsam:Action="http://www.xta.de/XTA/SendMessage"/> - </operation> - <operation name="sendMessageSync"> - <input message="xta:GenericContainerBody" wsam:Action="http://www.xta.de/XTA/SendMessageSync"/> - <output message="xta:GenericContainerBody" wsam:Action="http://www.xta.de/XTA/SendMessageSync"/> - <fault name="PermissionDeniedException" message="xta:PermissionDeniedException" wsam:Action="http://www.xta.de/XTA/SendMessageSync"/> - <fault name="ParameterIsNotValidException" message="xta:ParameterIsNotValidException" wsam:Action="http://www.xta.de/XTA/SendMessageSync"/> - <fault name="XTAWSTechnicalProblemException" message="xta:XTAWSTechnicalProblemException" wsam:Action="http://www.xta.de/XTA/SendMessageSync"/> - <fault name="MessageSchemaViolationException" message="xta:MessageSchemaViolationException" wsam:Action="http://www.xta.de/XTA/SendMessageSync"/> - <fault name="MessageVirusDetectionException" message="xta:MessageVirusDetectionException" wsam:Action="http://www.xta.de/XTA/SendMessageSync"/> - <fault name="SyncAsyncException" message="xta:SyncAsyncException" wsam:Action="http://www.xta.de/XTA/SendMessageSync"/> - </operation> - </portType> - <portType name="msgBoxPortType"> - <documentation>msgboxfetchPort</documentation> - <operation name="getMessage"> - <input message="xta:FetchMsgRequest" wsam:Action="http://www.osci.eu/ws/2008/05/transport/urn/messageTypes/MsgBoxFetchRequest"/> - <output message="xta:GenericContainerBody" wsam:Action="http://www.osci.eu/ws/2008/05/transport/urn/messageTypes/MsgBoxFetchRequest"/> - <fault name="PermissionDeniedException" message="xta:PermissionDeniedException" wsam:Action="http://www.osci.eu/ws/2008/05/transport/urn/messageTypes/MsgBoxFetchRequest"/> - <fault name="XTAWSTechnicalProblemException" message="xta:XTAWSTechnicalProblemException" wsam:Action="http://www.osci.eu/ws/2008/05/transport/urn/messageTypes/MsgBoxFetchRequest"/> - <fault name="InvalidMessageIDException" message="xta:InvalidMessageIDException" wsam:Action="http://www.osci.eu/ws/2008/05/transport/urn/messageTypes/MsgBoxFetchRequest"/> - </operation> - <operation name="getStatusList"> - <input message="xta:FetchListRequest" wsam:Action="http://www.osci.eu/ws/2008/05/transport/urn/messageTypes/MsgBoxStatusListRequest"/> - <output message="xta:FetchListResponse" wsam:Action="http://www.osci.eu/ws/2008/05/transport/urn/messageTypes/MsgBoxStatusListRequest"/> - <fault name="PermissionDeniedException" message="xta:PermissionDeniedException" wsam:Action="http://www.osci.eu/ws/2008/05/transport/urn/messageTypes/MsgBoxStatusListRequest"/> - <fault name="XTAWSTechnicalProblemException" message="xta:XTAWSTechnicalProblemException" wsam:Action="http://www.osci.eu/ws/2008/05/transport/urn/messageTypes/MsgBoxStatusListRequest"/> - </operation> - <operation name="getNextMessage"> - <input message="xta:GetNextRequest" wsam:Action="http://www.osci.eu/ws/2008/05/transport/urn/messageTypes/MsgBoxGetNextMsgRequest"/> - <output message="xta:GenericContainerBody" wsam:Action="http://www.osci.eu/ws/2008/05/transport/urn/messageTypes/MsgBoxGetNextMsgRequest"/> - <!-- Stand 13.05.2016 Vorgabe fehlt in Abschnitt B1.1.1, Annahme: Es werden - dieselben Exceptions benötigt, wie für getMessage --> - <fault name="PermissionDeniedException" message="xta:PermissionDeniedException" wsam:Action="http://www.osci.eu/ws/2008/05/transport/urn/messageTypes/MsgBoxGetNextMsgRequest"/> - <fault name="XTAWSTechnicalProblemException" message="xta:XTAWSTechnicalProblemException" wsam:Action="http://www.osci.eu/ws/2008/05/transport/urn/messageTypes/MsgBoxGetNextMsgRequest"/> - <fault name="InvalidMessageIDException" message="xta:InvalidMessageIDException" wsam:Action="http://www.osci.eu/ws/2008/05/transport/urn/messageTypes/MsgBoxGetNextMsgRequest"/> - </operation> - <operation name="getNextStatusList"> - <input message="xta:GetNextRequest" wsam:Action="http://www.osci.eu/ws/2008/05/transport/urn/messageTypes/MsgBoxGetNextListRequest"/> - <output message="xta:FetchListResponse" wsam:Action="http://www.osci.eu/ws/2008/05/transport/urn/messageTypes/MsgBoxGetNextListRequest"/> - <fault name="PermissionDeniedException" message="xta:PermissionDeniedException" wsam:Action="http://www.osci.eu/ws/2008/05/transport/urn/messageTypes/MsgBoxGetNextListRequest"/> - <fault name="XTAWSTechnicalProblemException" message="xta:XTAWSTechnicalProblemException" wsam:Action="http://www.osci.eu/ws/2008/05/transport/urn/messageTypes/MsgBoxGetNextListRequest"/> - </operation> - <operation name="close"> - <input message="xta:CloseRequest" wsam:Action="http://www.osci.eu/ws/2008/05/transport/urn/messageTypes/MsgBoxCloseRequest"/> - <output message="xta:EmptyBody" wsam:Action="http://www.osci.eu/ws/2008/05/transport/urn/messageTypes/MsgBoxCloseRequest"> - <documentation>only for exception handling</documentation> - </output> - <fault name="PermissionDeniedException" message="xta:PermissionDeniedException" wsam:Action="http://www.osci.eu/ws/2008/05/transport/urn/messageTypes/MsgBoxCloseRequest"/> - <fault name="XTAWSTechnicalProblemException" message="xta:XTAWSTechnicalProblemException" wsam:Action="http://www.osci.eu/ws/2008/05/transport/urn/messageTypes/MsgBoxCloseRequest"/> - <fault name="InvalidMessageIDException" message="xta:InvalidMessageIDException" wsam:Action="http://www.osci.eu/ws/2008/05/transport/urn/messageTypes/MsgBoxCloseRequest"/> - </operation> - </portType> - <!--Bindung von Protokoll und Interface --> - <binding name="sendXTAHttpsBinding" type="xta:sendPortType"> - <documentation>https binding for the sendPort</documentation> - <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> - <wsp:PolicyReference URI="#TransportBindingPolicy"/> - <wsp:PolicyReference URI="#osciCommon"/> - <operation name="sendMessage"> - <documentation>The sendMessage method delivers a content message to the sending - hub.</documentation> - <soap:operation soapAction="http://www.xta.de/XTA/SendMessage" soapActionRequired="true" style="document"/> - <input> - <documentation>Input Header: MessageMetaData header contains additional information - for the for the given payload. Body: The GenericContainerBody containins the - "xöv" message.</documentation> - <soap:body use="literal"/> - <soap:header message="xta:XTAHeader" part="MessageMetaData" use="literal"/> - <soap:header message="xta:OptHeaders" part="X509TokenContainer" use="literal"/> - </input> - <output> - <documentation>only for exception handling</documentation> - <soap:body use="literal"/> - </output> - <fault name="PermissionDeniedException"> - <soap:fault name="PermissionDeniedException" use="literal"/> - </fault> - <fault name="ParameterIsNotValidException"> - <soap:fault name="ParameterIsNotValidException" use="literal"/> - </fault> - <fault name="XTAWSTechnicalProblemException"> - <soap:fault name="XTAWSTechnicalProblemException" use="literal"/> - </fault> - <fault name="MessageSchemaViolationException"> - <soap:fault name="MessageSchemaViolationException" use="literal"/> - </fault> - <fault name="MessageVirusDetectionException"> - <soap:fault name="MessageVirusDetectionException" use="literal"/> - </fault> - <fault name="SyncAsyncException"> - <soap:fault name="SyncAsyncException" use="literal"/> - </fault> - </operation> - <operation name="sendMessageSync"> - <documentation>The sendMessage method delivers a content message to the sending - hub.</documentation> - <soap:operation soapAction="http://www.xta.de/XTA/SendMessageSync" soapActionRequired="true" style="document"/> - <input> - <documentation>Input Header: MessageMetaData header contains additional information - for the for the given payload. Body: The GenericContainerBody contains the "xöv" - message.</documentation> - <soap:body use="literal"/> - <soap:header message="xta:XTAHeader" part="MessageMetaData" use="literal"/> - <soap:header message="xta:OptHeaders" part="X509TokenContainer" use="literal"/> - </input> - <output> - <documentation>Output body: A GenericContainerBody in the body, containing the - synchronous "xöv" message response.</documentation> - <soap:body use="literal"/> - <soap:header message="xta:XTAHeader" part="MessageMetaData" use="literal"/> - <soap:header message="xta:OptHeaders" part="X509TokenContainer" use="literal"/> - </output> - <fault name="PermissionDeniedException"> - <soap:fault name="PermissionDeniedException" use="literal"/> - </fault> - <fault name="ParameterIsNotValidException"> - <soap:fault name="ParameterIsNotValidException" use="literal"/> - </fault> - <fault name="XTAWSTechnicalProblemException"> - <soap:fault name="XTAWSTechnicalProblemException" use="literal"/> - </fault> - <fault name="MessageSchemaViolationException"> - <soap:fault name="MessageSchemaViolationException" use="literal"/> - </fault> - <fault name="MessageVirusDetectionException"> - <soap:fault name="MessageVirusDetectionException" use="literal"/> - </fault> - <fault name="SyncAsyncException"> - <soap:fault name="SyncAsyncException" use="literal"/> - </fault> - </operation> - </binding> - <binding name="managementHttpsBinding" type="xta:managementPortType"> - <documentation>https binding for the managementPort</documentation> - <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> - <wsp:PolicyReference URI="#TransportBindingPolicy"/> - <wsp:PolicyReference URI="#osciCommon"/> - <operation name="getTransportReport"> - <documentation>Method to get the transport report for the given - MessageID</documentation> - <soap:operation soapAction="http://www.xta.de/XTA/GetTransportReport" soapActionRequired="true" style="document"/> - <input> - <documentation>Input: optional xta:AuthorIdentifier header and the MessageID in the - body part.</documentation> - <soap:body use="literal"/> - <soap:header message="xta:XTAHeader" part="AuthorIdentifier" use="literal"/> - </input> - <output> - <documentation>Output body: The Transport report containing the detailed information - for the related message.</documentation> - <soap:body use="literal"/> - </output> - <fault name="PermissionDeniedException"> - <soap:fault name="PermissionDeniedException" use="literal"/> - </fault> - <fault name="XTAWSTechnicalProblemException"> - <soap:fault name="XTAWSTechnicalProblemException" use="literal"/> - </fault> - <fault name="InvalidMessageIDException"> - <soap:fault name="InvalidMessageIDException" use="literal"/> - </fault> - </operation> - <operation name="cancelMessage"> - <documentation>Method to cancel disptach order (if not yet finalied - successfully)</documentation> - <soap:operation soapAction="http://www.xta.de/XTA/CancelMessage" soapActionRequired="true" style="document"/> - <input> - <documentation>Input: optional xta:AuthorIdentifier header and the MessageID in the - body part.</documentation> - <soap:body use="literal"/> - <soap:header message="xta:XTAHeader" part="AuthorIdentifier" use="literal"/> - </input> - <output> - <documentation>only for exception handling</documentation> - <soap:body use="literal"/> - </output> - <fault name="CancelDeniedException"> - <soap:fault name="CancelDeniedException" use="literal"/> - </fault> - <fault name="PermissionDeniedException"> - <soap:fault name="PermissionDeniedException" use="literal"/> - </fault> - <fault name="ParameterIsNotValidException"> - <soap:fault name="ParameterIsNotValidException" use="literal"/> - </fault> - <fault name="XTAWSTechnicalProblemException"> - <soap:fault name="XTAWSTechnicalProblemException" use="literal"/> - </fault> - </operation> - <operation name="lookupService"> - <documentation>Method to get further information about the given address - information</documentation> - <soap:operation soapAction="http://www.xta.de/XTA/IsServiceAvailable" soapActionRequired="true" style="document"/> - <input> - <documentation>Input: optional xta:AuthorIdentifier header and a list of address - information in the body part</documentation> - <soap:body use="literal"/> - <soap:header message="xta:XTAHeader" part="AuthorIdentifier" use="literal"/> - </input> - <output> - <documentation>Output body: further information for the given address - list.</documentation> - <soap:body use="literal"/> - </output> - <fault name="PermissionDeniedException"> - <soap:fault name="PermissionDeniedException" use="literal"/> - </fault> - <fault name="ParameterIsNotValid"> - <soap:fault name="ParameterIsNotValid" use="literal"/> - </fault> - <fault name="XTAWSTechnicalProblemException"> - <soap:fault name="XTAWSTechnicalProblemException" use="literal"/> - </fault> - </operation> - <operation name="checkAccountActive"> - <documentation>Method to check whether the account is activ</documentation> - <soap:operation soapAction="http://www.xta.de/XTA/CheckAccountActive" soapActionRequired="true" style="document"/> - <input> - <documentation>Input: optional xta:AuthorIdentifier header.</documentation> - <soap:body use="literal"/> - <soap:header message="xta:XTAHeader" part="AuthorIdentifier" use="literal"/> - </input> - <output> - <documentation>only for exception handling</documentation> - <soap:body use="literal"/> - </output> - <fault name="PermissionDeniedException"> - <soap:fault name="PermissionDeniedException" use="literal"/> - </fault> - <fault name="XTAWSTechnicalProblemException"> - <soap:fault name="XTAWSTechnicalProblemException" use="literal"/> - </fault> - </operation> - <operation name="createMessageId"> - <documentation>Method to obtain new created MesMessageID</documentation> - <soap:operation soapAction="http://www.xta.de/XTA/CreateMessageID" soapActionRequired="true" style="document"/> - <input> - <documentation>Input: optional xta:AuthorIdentifier header</documentation> - <soap:body use="literal"/> - <soap:header message="xta:XTAHeader" part="AuthorIdentifier" use="literal"/> - </input> - <output> - <documentation>Output body: The created MesMessageID</documentation> - <soap:body use="literal"/> - </output> - <fault name="PermissionDeniedException"> - <soap:fault name="PermissionDeniedException" use="literal"/> - </fault> - <fault name="XTAWSTechnicalProblemException"> - <soap:fault name="XTAWSTechnicalProblemException" use="literal"/> - </fault> - </operation> - </binding> - <binding name="msgBoxHttpsBinding" type="xta:msgBoxPortType"> - <documentation>https binding for the msgBox</documentation> - <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> - <wsp:PolicyReference URI="#TransportBindingPolicy"/> - <wsp:PolicyReference URI="#osciCommon"/> - <operation name="getMessage"> - <documentation>The getMethode method returns the first message relating to the given - parameter</documentation> - <soap:operation soapAction="http://www.osci.eu/ws/2008/05/transport/urn/messageTypes/MsgBoxFetchRequest" soapActionRequired="true"/> - <input> - <documentation>Input: optional xta:AuthorIdentifier header and OSCI 2 - MsgBoxFetchRequest parameter in the body part</documentation> - <soap:body use="literal"/> - <soap:header message="xta:XTAHeader" part="AuthorIdentifier" use="literal"/> - </input> - <output> - <documentation>Output: Header: Optional xta:AuthorIdentifier header or OSCI2 Header - MsgBoxResponse with addional information and related GenericContentContainer in - the body part</documentation> - <soap:header message="xta:XTAHeader" part="MessageMetaData" use="literal"/> - <soap:header message="xta:OptHeaders" part="FetchResponseHeader" use="literal"/> - <soap:body use="literal"/> - </output> - <fault name="PermissionDeniedException"> - <soap:fault name="PermissionDeniedException" use="literal"/> - </fault> - <fault name="XTAWSTechnicalProblemException"> - <soap:fault name="XTAWSTechnicalProblemException" use="literal"/> - </fault> - <fault name="InvalidMessageIDException"> - <soap:fault name="InvalidMessageIDException" use="literal"/> - </fault> - </operation> - <operation name="getStatusList"> - <documentation>getStatusList returns the list of related message - information</documentation> - <soap:operation soapAction="http://www.osci.eu/ws/2008/05/transport/urn/messageTypes/MsgBoxStatusListRequest" soapActionRequired="true"/> - <input> - <documentation>Input: optional xta:AuthorIdentifier header and OSCI 2 - MsgStatusListRequest parameter in the body part</documentation> - <soap:body use="literal"/> - <soap:header message="xta:XTAHeader" part="AuthorIdentifier" use="literal"/> - </input> - <output> - <documentation>Output: Header: OSCI2 Header MsgBoxResponse with addional information - and related MsgStatusList in the body part</documentation> - <soap:header message="xta:OptHeaders" part="FetchResponseHeader" use="literal"/> - <soap:body use="literal"/> - </output> - <fault name="PermissionDeniedException"> - <soap:fault name="PermissionDeniedException" use="literal"/> - </fault> - <fault name="XTAWSTechnicalProblemException"> - <soap:fault name="XTAWSTechnicalProblemException" use="literal"/> - </fault> - </operation> - <operation name="getNextMessage"> - <documentation>getNextMessage returns next message relates to fetch - iterator</documentation> - <soap:operation soapAction="http://www.osci.eu/ws/2008/05/transport/urn/messageTypes/MsgBoxGetNextMsgRequest" soapActionRequired="true"/> - <input> - <documentation>Input: Optional xta:AuthorIdentifier header and in the body part the - MsgBoxNextRequest element conatining the fetch iterator</documentation> - <soap:body use="literal"/> - <soap:header message="xta:XTAHeader" part="AuthorIdentifier" use="literal"/> - </input> - <output> - <documentation>Output: Header: Optional xta:AuthorIdentifier header or OSCI2 Header - MsgBoxResponse with addional information and related MsgStatusList in the body - part</documentation> - <soap:header message="xta:XTAHeader" part="MessageMetaData" use="literal"/> - <soap:header message="xta:OptHeaders" part="FetchResponseHeader" use="literal"/> - <soap:body use="literal"/> - </output> - <fault name="PermissionDeniedException"> - <soap:fault name="PermissionDeniedException" use="literal"/> - </fault> - <fault name="XTAWSTechnicalProblemException"> - <soap:fault name="XTAWSTechnicalProblemException" use="literal"/> - </fault> - <fault name="InvalidMessageIDException"> - <soap:fault name="InvalidMessageIDException" use="literal"/> - </fault> - </operation> - <operation name="getNextStatusList"> - <documentation>getNextStatusList returns the next list of related message information - related to the fetch iterator</documentation> - <soap:operation soapAction="http://www.osci.eu/ws/2008/05/transport/urn/messageTypes/MsgBoxGetNextListRequest" soapActionRequired="true"/> - <input> - <documentation>Input: optional xta:AuthorIdentifier header and in the body part the - MsgBoxNextRequest element conatining the fetch iterator</documentation> - <soap:body use="literal"/> - <soap:header message="xta:XTAHeader" part="AuthorIdentifier" use="literal"/> - </input> - <output> - <documentation>Output: Header: OSCI2 Header MsgBoxResponse with addional information - and next related MsgStatusList in the body part</documentation> - <soap:header message="xta:OptHeaders" part="FetchResponseHeader" use="literal"/> - <soap:body use="literal"/> - </output> - <fault name="PermissionDeniedException"> - <soap:fault name="PermissionDeniedException" use="literal"/> - </fault> - <fault name="XTAWSTechnicalProblemException"> - <soap:fault name="XTAWSTechnicalProblemException" use="literal"/> - </fault> - </operation> - <operation name="close"> - <documentation>The close method returns close the fetch iterator</documentation> - <soap:operation soapAction="http://www.osci.eu/ws/2008/05/transport/urn/messageTypes/MsgBoxCloseRequest" soapActionRequired="true"/> - <input> - <documentation>Input: optional xta:AuthorIdentifier header and the - MsgBoxCloseRequest element conatining the fetch iterator in the body - part</documentation> - <soap:body use="literal"/> - <soap:header message="xta:XTAHeader" part="AuthorIdentifier" use="literal"/> - </input> - <output> - <documentation>only for exception handling</documentation> - <soap:body use="literal"/> - </output> - <fault name="PermissionDeniedException"> - <soap:fault name="PermissionDeniedException" use="literal"/> - </fault> - <fault name="XTAWSTechnicalProblemException"> - <soap:fault name="XTAWSTechnicalProblemException" use="literal"/> - </fault> - <fault name="InvalidMessageIDException"> - <soap:fault name="InvalidMessageIDException" use="literal"/> - </fault> - </operation> - </binding> - <!--Endpoints des Services --> - <service name="XTAService"> - <port name="MsgBoxPort" binding="xta:msgBoxHttpsBinding"> - <soap:address location="REPLACE_WITH_ACTUAL_URL"/> - <wsa:EndpointReference> - <wsa:Address>REPLACE_WITH_ACTUAL_URL</wsa:Address> - <wsa:ReferenceParameters> - <osci:TypeOfBusinessScenario>http://www.xoevxta.de/xta/ws</osci:TypeOfBusinessScenario> - </wsa:ReferenceParameters> - </wsa:EndpointReference> - </port> - <port name="SendXtaPort" binding="xta:sendXTAHttpsBinding"> - <soap:address location="REPLACE_WITH_ACTUAL_URL"/> - <wsa:EndpointReference> - <wsa:Address>REPLACE_WITH_ACTUAL_URL</wsa:Address> - <wsa:ReferenceParameters> - <osci:TypeOfBusinessScenario>http://www.xoevxta.de/xta/ws</osci:TypeOfBusinessScenario> - </wsa:ReferenceParameters> - </wsa:EndpointReference> - </port> - <port name="ManagementPort" binding="xta:managementHttpsBinding"> - <soap:address location="REPLACE_WITH_ACTUAL_URL"/> - <wsa:EndpointReference> - <wsa:Address>REPLACE_WITH_ACTUAL_URL</wsa:Address> - <wsa:ReferenceParameters> - <osci:TypeOfBusinessScenario>http://www.xoevxta.de/xta/ws</osci:TypeOfBusinessScenario> - </wsa:ReferenceParameters> - </wsa:EndpointReference> - </port> - </service> -</definitions> +<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" + targetNamespace="http://xoev.de/transport/xta/211" + xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" + xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:wsa="http://www.w3.org/2005/08/addressing" + xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap12/" + xmlns:wspmtom="http://schemas.xmlsoap.org/ws/2004/09/policy/optimizedmimeserialization" + xmlns:osci="http://www.osci.eu/ws/2008/05/transport" + xmlns:wsp="http://www.w3.org/ns/ws-policy" + xmlns:oscimeta="http://www.osci.eu/ws/2014/10/transport" + xmlns:wsu="oasis-200401-wss-wssecurity-utility-1.0.xsd" + xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702" + xmlns:s12="http://www.w3.org/2003/05/soap-envelope" + xmlns:xta="http://xoev.de/transport/xta/211" name="XTA-Webservice"> + + <wsp:Policy wsu:Id="osciCommon"> + <!--###### general osci policies ########## --> + <wsp:All> + <wsam:Addressing wsp:Optional="false"> + <wsp:Policy> + <wsam:AnonymousResponses /> + </wsp:Policy> + </wsam:Addressing> + <wspmtom:OptimizedMimeSerialization /> + <sp:Wss11> + <wsp:Policy> + <sp:MustSupportRefKeyIdentifier /> + <sp:MustSupportRefIssuerSerial /> + <sp:MustSupportRefThumbprint /> + <sp:MustSupportRefEncryptedKey /> + <sp:RequireSignatureConfirmation /> + </wsp:Policy> + </sp:Wss11> + <sp:Trust13> + <wsp:Policy> + <sp:MustSupportIssuedTokens /> + <sp:RequireClientEntropy /> + <sp:RequireServerEntropy /> + </wsp:Policy> + </sp:Trust13> + </wsp:All> + </wsp:Policy> + <wsp:Policy wsu:Id="TransportBindingPolicy"> + <wsp:ExactlyOne> + <wsp:All> + <sp:TransportBinding> + <wsp:Policy> + <sp:TransportToken> + <wsp:Policy> + <sp:HttpsToken RequireClientCertificate="true" /> + </wsp:Policy> + </sp:TransportToken> + <sp:AlgorithmSuite> + <wsp:Policy> + <sp:Basic256 /> + </wsp:Policy> + </sp:AlgorithmSuite> + <sp:Layout> + <wsp:Policy> + <sp:Lax /> + </wsp:Policy> + </sp:Layout> + <!-- sp:IncludeTimestamp/ --> + </wsp:Policy> + </sp:TransportBinding> + <!-- sp:Wss10> <wsp:Policy> <sp:MustSupportRefKeyIdentifier/> </wsp:Policy> + </sp:Wss10 --> + </wsp:All> + </wsp:ExactlyOne> + </wsp:Policy> + + <types> + <xsd:schema + targetNamespace="http://xoev.de/transport/xta/211"> + <xsd:import + namespace="http://www.osci.eu/ws/2014/10/transport" + schemaLocation="../xsd/OSCI_MessageMetaData_V2.02.xsd" /> + <xsd:import + namespace="http://www.osci.eu/ws/2008/05/transport" + schemaLocation="../xsd/OSCI2_02.xsd" /> + <xsd:include + schemaLocation="../xsd/XTA-Webservice-Globale-Elemente.xsd" /> + <xsd:include + schemaLocation="../xsd/XTA-Webservice-Exceptions.xsd" /> + + + <xsd:element name="MsgBoxStatusListRequest" + type="osci:MsgBoxStatusListRequestType" /> + <xsd:complexType name="MsgBoxStatusListRequest"> + <xsd:complexContent> + <xsd:extension base="osci:MsgBoxRequestType"> + <xsd:attribute name="maxListItems" + type="xsd:positiveInteger" /> + <xsd:attribute name="ListForm"> + <xsd:simpleType> + <xsd:restriction base="xsd:NMTOKEN"> + <xsd:enumeration value="MsgAtrributes" /> + <xsd:enumeration value="MessageMetaData" /> + </xsd:restriction> + </xsd:simpleType> + </xsd:attribute> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + </xsd:schema> + </types> + + <message name="EmptyBody" /> + <message name="XTAHeader"> + <part name="AuthorIdentifier" element="oscimeta:Author" /> + <part name="MessageMetaData" element="oscimeta:MessageMetaData" /> + </message> + <message name="LookupServiceRequest"> + <part name="LookupServiceRequest" + element="xta:LookupServiceRequest" /> + </message> + <message name="LookupServiceResponse"> + <part name="LookupServiceResponse" + element="xta:LookupServiceResponse" /> + </message> + <message name="GetTransportReportResponse"> + <part name="GetTransportReportResponse" + element="xta:TransportReport" /> + </message> + <message name="GenericContainerBody"> + <part name="GenericContainer" + element="xta:GenericContentContainer" /> + </message> + <message name="MessageID"> + <part name="MessageID" element="wsa:MessageID" /> + </message> + <message name="OptHeaders"> + <part name="FetchResponseHeader" element="osci:MsgBoxResponse" /> + <part name="X509TokenContainer" element="osci:X509TokenContainer" /> + </message> + <message name="FetchMsgRequest"> + <part name="FetchRequest" element="osci:MsgBoxFetchRequest" /> + </message> + <message name="GetNextRequest"> + <part name="FetchRequest" element="osci:MsgBoxGetNextRequest" /> + </message> + <message name="CloseRequest"> + <part name="FetchRequest" element="osci:MsgBoxCloseRequest" /> + </message> + <message name="FetchListRequest"> + <part name="FetchRequest" element="osci:MsgBoxStatusListRequest" /> + </message> + <message name="FetchListResponse"> + <part name="FetchResponse" element="osci:MsgStatusList" /> + </message> + + <!--Nachrichten - SOAP-Exceptions --> + <message name="PermissionDeniedException"> + <part name="permissionDeniedException" + element="xta:PermissionDeniedException" /> + </message> + <message name="XTAWSTechnicalProblemException"> + <part name="xtawsTechnicalProblem" + element="xta:XTAWSTechnicalProblemException" /> + </message> + <message name="ParameterIsNotValidException"> + <part name="parameterIsNotValidException" + element="xta:ParameterIsNotValidException" /> + </message> + <message name="MessageSchemaViolationException"> + <part name="messageSchemaViolationException" + element="xta:MessageSchemaViolationException" /> + </message> + <message name="MessageVirusDetectionException"> + <part name="messageVirusDetectionException" + element="xta:MessageVirusDetectionException" /> + </message> + <message name="SyncAsyncException"> + <part name="syncAsyncException" element="xta:SyncAsyncException" /> + </message> + <message name="InvalidMessageIDException"> + <!-- <part name="invalidMessageIDException" element="xta:InvalidMessageIdException"/> --> + <part name="invalidMessageIDException" + element="xta:InvalidMessageIDException" /> + </message> + <message name="CancelDeniedException"> + <part name="cancelDeniedException" + element="xta:CancelDeniedException" /> + </message> + + <portType name="msgBoxPortType"> + <operation name="getStatusList"> + <input message="xta:FetchListRequest" + wsam:Action="http://www.osci.eu/ws/2008/05/transport/urn/messageTypes/MsgBoxStatusListRequest" /> + <output message="xta:FetchListResponse" + wsam:Action="http://www.osci.eu/ws/2008/05/transport/urn/messageTypes/MsgBoxStatusListRequest" /> + <fault name="PermissionDeniedException" + message="xta:PermissionDeniedException" + wsam:Action="http://www.osci.eu/ws/2008/05/transport/urn/messageTypes/MsgBoxStatusListRequest" /> + <fault name="XTAWSTechnicalProblemException" + message="xta:XTAWSTechnicalProblemException" + wsam:Action="http://www.osci.eu/ws/2008/05/transport/urn/messageTypes/MsgBoxStatusListRequest" /> + </operation> + </portType> + +</definitions> \ No newline at end of file diff --git a/xta-adapter/src/main/resources/application.properties b/xta-adapter/src/main/resources/application.properties deleted file mode 100644 index bfd6ba806f452a256341f879a98e1abfa7ae78b8..0000000000000000000000000000000000000000 --- a/xta-adapter/src/main/resources/application.properties +++ /dev/null @@ -1,20 +0,0 @@ -logging.level.org.springframework.web=DEBUG -logging.level.org.springframework.ws.client.MessageTracing.sent=DEBUG -logging.level.org.springframework.ws.server.MessageTracing.sent=DEBUG -logging.level.org.springframework.ws.client.MessageTracing.received=TRACE -logging.level.org.springframework.ws.server.MessageTracing.received=TRACE -log4j.logger.org.springframework.ws.client.MessageTracing.sent=TRACE -log4j.logger.org.springframework.ws.client.MessageTracing.received=TRACE -log4j.logger.org.springframework.ws.client.MessageTracing.sent=DEBUG -log4j.logger.org.springframework.ws.client.MessageTracing.received=TRACE - -log4j.logger.org.springframework.ws.server.MessageTracing.sent=DEBUG -log4j.logger.org.springframework.ws.server.MessageTracing.received=TRACE - -log4j.logger.org.springframework.ws.server.MessageTracing=DEBUG -log4j.logger.org.springframework.ws.client.MessageTracing=TRACE -logging.level.org.springframework.ws=TRACE - -org.springframework.ws.server.MessageTracing=TRACE -org.springframework.ws.server.MessageTracing.sent=TRACE -org.springframework.ws.client.MessageTracing.received=TRACE diff --git a/xta-adapter/src/main/resources/application.yml b/xta-adapter/src/main/resources/application.yml new file mode 100644 index 0000000000000000000000000000000000000000..980bf8410c7dbd86467d77344984a90869d0366e --- /dev/null +++ b/xta-adapter/src/main/resources/application.yml @@ -0,0 +1,23 @@ +spring: + profiles: + active: + - sec + +logging: + level: + ROOT: WARN + '[de.ozgcloud]': INFO + '[org.springframework.ws]': TRACE + config: classpath:log4j2-local.xml + +ozgcloud: + xta: + max-list-elements: 10 + server: + name: LI33-0005 + address: localhost:3000 + keystore: + file: classpath:KOP_SH_KIEL_DEV.p12 + type: PKCS12 + actions: + status-list: "http://www.osci.eu/ws/2008/05/transport/urn/messageTypes/MsgBoxStatusListRequest" \ No newline at end of file diff --git a/xta-adapter/src/main/resources/log4j.properties b/xta-adapter/src/main/resources/log4j.properties deleted file mode 100644 index 543d4bab5fd19e7f3a7616debd568716add4a026..0000000000000000000000000000000000000000 --- a/xta-adapter/src/main/resources/log4j.properties +++ /dev/null @@ -1,9 +0,0 @@ -log4j.rootCategory=INFO, stdout - -log4j.logger.org.springframework.ws.client.MessageTracing.sent=TRACE -log4j.logger.org.springframework.ws.client.MessageTracing.received=TRACE -log4j.logger.org.springframework.ws.server.MessageTracing=TRACE - -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout -log4j.appender.stdout.layout.ConversionPattern=%p [%c{3}] %m%n \ No newline at end of file diff --git a/xta-adapter/src/main/resources/logback.xml b/xta-adapter/src/main/resources/logback.xml deleted file mode 100644 index dea8c2983018ddaa849a38d5efae722788f009c8..0000000000000000000000000000000000000000 --- a/xta-adapter/src/main/resources/logback.xml +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<configuration> - - <include resource="org/springframework/boot/logging/logback/base.xml"/> - - <logger name="org.springframework.web" level="INFO"/> - - <logger name="org.springframework.ws.client.MessageTracing.sent" level="TRACE"/> - <logger name="org.springframework.ws.client.MessageTracing.received" level="TRACE"/> - <logger name="org.springframework.ws.server.MessageTracing" level="TRACE"/> - -</configuration> \ No newline at end of file diff --git a/xta-adapter/src/main/xsd/oasis-200401-wss-wssecurity-secext-1.0.xsd b/xta-adapter/src/main/xsd/oasis-200401-wss-wssecurity-secext-1.0.xsd index 0195d356527624b4e85ba5504ce76626f42aa0f8..1794066fd507e25a494479573430214d6b847b10 100644 --- a/xta-adapter/src/main/xsd/oasis-200401-wss-wssecurity-secext-1.0.xsd +++ b/xta-adapter/src/main/xsd/oasis-200401-wss-wssecurity-secext-1.0.xsd @@ -7,7 +7,7 @@ This document and translations of it may be copied and furnished to others, and The limited permissions granted above are perpetual and will not be revoked by OASIS or its successors or assigns. This document and the information contained herein is provided on an “AS IS” basis and OASIS DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. --> -<xsd:schema targetNamespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" elementFormDefault="qualified" attributeFormDefault="unqualified" blockDefault="#all" version="0.2"> +<xsd:schema targetNamespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" elementFormDefault="qualified" attributeFormDefault="unqualified" blockDefault="#all" version="0.2"> <xsd:import namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" schemaLocation="oasis-200401-wss-wssecurity-utility-1.0.xsd"/> <xsd:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd"/> <xsd:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="xmldsig-core-schema.xsd"/> 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 new file mode 100644 index 0000000000000000000000000000000000000000..d7a52c3a981c91efe6351daa10f95aaa0a570e73 --- /dev/null +++ b/xta-adapter/src/test/java/de/ozgcloud/eingang/xta/XtaRemoteServiceITCase.java @@ -0,0 +1,43 @@ +package de.ozgcloud.eingang.xta; + +import static org.assertj.core.api.Assertions.*; + +import java.net.URISyntaxException; + +import jakarta.validation.Valid; + +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.itvsh.kop.eingangsadapter.Application; +import eu.osci.ws._2008._05.transport.MsgStatusListType; + +@ActiveProfiles({ "itcase", "local", "sec" }) +@SpringBootTest(classes = Application.class) +class XtaRemoteServiceITCase { + + @Autowired + private XtaRemoteService xtaRemoteService; + @Autowired + @Valid + private XtaProperties xtaProperties; + + @Nested + class TestProperties { + @Test + void shouldHaveStatusListAction() { + assertThat(xtaProperties.getActions().getStatusList()).isNotNull(); + } + } + + @Test + void test() throws URISyntaxException { + MsgStatusListType rsp = xtaRemoteService.getStatusList(); + + assertThat(rsp.getMessageMetaData()).isNotEmpty(); + } + +} diff --git a/xta-adapter/src/test/java/de/ozgcloud/eingang/xta/XtaRemoteServiceLiveTest.java b/xta-adapter/src/test/java/de/ozgcloud/eingang/xta/XtaRemoteServiceLiveTest.java deleted file mode 100644 index 8afc0038eef9c27f71f5bb3d4ebc3cf19be782d7..0000000000000000000000000000000000000000 --- a/xta-adapter/src/test/java/de/ozgcloud/eingang/xta/XtaRemoteServiceLiveTest.java +++ /dev/null @@ -1,29 +0,0 @@ -package de.ozgcloud.eingang.xta; - -import static org.assertj.core.api.Assertions.*; - -import java.net.URISyntaxException; - -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.ContextConfiguration; -import org.springframework.test.context.support.AnnotationConfigContextLoader; - -import eu.osci.ws._2008._05.transport.MsgStatusListType; - -@SpringBootTest -@ContextConfiguration(classes = XtaRemoteServiceConfiguration.class, loader = AnnotationConfigContextLoader.class) -public class XtaRemoteServiceLiveTest { - - @Autowired - XtaRemoteService xtaRemoteService; - - @Test - void test() throws URISyntaxException { - - MsgStatusListType rsp = xtaRemoteService.getStatusList(); - assertThat(rsp.getMessageMetaData()).isNotEmpty(); - } - -}