diff options
author | Christof Rabensteiner <christof.rabensteiner@iaik.tugraz.at> | 2019-07-02 14:19:41 +0200 |
---|---|---|
committer | Christof Rabensteiner <christof.rabensteiner@iaik.tugraz.at> | 2019-07-02 14:19:41 +0200 |
commit | 030488bb7ff9572f35032d80d4101c06cfc98bf5 (patch) | |
tree | 20c563d181a4afe755daed7ec7cc91341a9815ab /src/main/java/at/gv/egiz/moazs/msg | |
parent | 45c717760a6efc74f4f15dbc3f55bafc5e9a02d9 (diff) | |
download | moa-zs-030488bb7ff9572f35032d80d4101c06cfc98bf5.tar.gz moa-zs-030488bb7ff9572f35032d80d4101c06cfc98bf5.tar.bz2 moa-zs-030488bb7ff9572f35032d80d4101c06cfc98bf5.zip |
Implement And Integrate tnvz:QueryPersonRequest.
- Merge TnvzClient and TnvzResultVerifier to TnvzHelper; TnvzHelper
now builds the QueryPersonRequest, sends it to the tnvz port and
evaluates the result.
- Publish some interfaces in Mzs2MsgConverter because they are needed
by TnvzHelper.
- Generalize MsgClientFactory to ClientFactory such that it can be
used to generate arbitrary SOAP clients (e.g. also for tnvz!).
Schema Changes to accomodate Tnvz's QueryPersonRequest:
- Add optional tnvz:AustrianAddressesOnly and optional TnvzMetaData to
mzs:mzs:DeliveryRequest.
Removed Unit Tests:
- Remove subset of SameThreadDeliveryPipeline testcases (mimetype
related) because its logic moved to TnvzHelper.
Diffstat (limited to 'src/main/java/at/gv/egiz/moazs/msg')
-rw-r--r-- | src/main/java/at/gv/egiz/moazs/msg/ClientFactory.java (renamed from src/main/java/at/gv/egiz/moazs/msg/MsgClientFactory.java) | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/src/main/java/at/gv/egiz/moazs/msg/MsgClientFactory.java b/src/main/java/at/gv/egiz/moazs/msg/ClientFactory.java index e55debc..6729015 100644 --- a/src/main/java/at/gv/egiz/moazs/msg/MsgClientFactory.java +++ b/src/main/java/at/gv/egiz/moazs/msg/ClientFactory.java @@ -5,7 +5,6 @@ import at.gv.egiz.moazs.util.SSLContextCreator; import at.gv.zustellung.app2mzs.xsd.ClientType; import at.gv.zustellung.app2mzs.xsd.KeyStoreType; import at.gv.zustellung.app2mzs.xsd.SSLType; -import at.gv.zustellung.msg.xsd.App2ZusePort; import org.apache.cxf.configuration.jsse.TLSClientParameters; import org.apache.cxf.endpoint.Client; import org.apache.cxf.frontend.ClientProxy; @@ -24,33 +23,33 @@ import javax.net.ssl.SSLContext; import static at.gv.zustellung.app2mzs.xsd.KeyStoreType.keyStoreTypeBuilder; @Component -public class MsgClientFactory { +public class ClientFactory { - private static final Logger log = LoggerFactory.getLogger(MsgClientFactory.class); + private static final Logger log = LoggerFactory.getLogger(ClientFactory.class); private final StoreSOAPBodyBinaryInRepositoryInterceptor storeResponseInterceptor; private final SSLContextCreator sslContextCreator; private final FileUtils fileUtils; @Autowired - public MsgClientFactory(StoreSOAPBodyBinaryInRepositoryInterceptor storeResponseInterceptor, - SSLContextCreator creator, - FileUtils fileUtils) { + public ClientFactory(StoreSOAPBodyBinaryInRepositoryInterceptor storeResponseInterceptor, + SSLContextCreator creator, + FileUtils fileUtils) { this.storeResponseInterceptor = storeResponseInterceptor; this.sslContextCreator = creator; this.fileUtils = fileUtils; } /** - * Creates a client that communicates with a msg service. + * Creates a client that communicates with a soap service. * * @param params for the client, such as service url and ssl parameters. - * @return the msg client + * @return the client */ - public App2ZusePort create(ClientType params) { + public <T> T create(ClientType params, Class<T> clazz) { var factory = new JaxWsClientFactoryBean(); - factory.setServiceClass(App2ZusePort.class); + factory.setServiceClass(clazz); factory.setAddress(params.getURL()); factory.getInInterceptors().add(storeResponseInterceptor); @@ -69,7 +68,7 @@ public class MsgClientFactory { log.info("SSLContext initialized. "); } - return ((App2ZusePort)proxy); + return ((T)proxy); } private TLSClientParameters setupTLSParams(SSLType ssl) { |