diff options
author | Christof Rabensteiner <christof.rabensteiner@iaik.tugraz.at> | 2019-07-03 14:30:34 +0200 |
---|---|---|
committer | Christof Rabensteiner <christof.rabensteiner@iaik.tugraz.at> | 2019-07-03 14:30:34 +0200 |
commit | 8bcd9c265198e8d46e2ec862ca6e0cb47838bd7f (patch) | |
tree | 22b177782fb2e79474c16bd334b57eb8438cce42 /src | |
parent | 95a7e8bf69dae83fd569b8dece7236ab02729bca (diff) | |
download | moa-zs-8bcd9c265198e8d46e2ec862ca6e0cb47838bd7f.tar.gz moa-zs-8bcd9c265198e8d46e2ec862ca6e0cb47838bd7f.tar.bz2 moa-zs-8bcd9c265198e8d46e2ec862ca6e0cb47838bd7f.zip |
Soap Client: Enable MTOM Per Default
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/at/gv/egiz/moazs/msg/ClientFactory.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/java/at/gv/egiz/moazs/msg/ClientFactory.java b/src/main/java/at/gv/egiz/moazs/msg/ClientFactory.java index 6729015..c2ad4a7 100644 --- a/src/main/java/at/gv/egiz/moazs/msg/ClientFactory.java +++ b/src/main/java/at/gv/egiz/moazs/msg/ClientFactory.java @@ -5,6 +5,7 @@ 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 javax.xml.ws.soap.SOAPBinding; import org.apache.cxf.configuration.jsse.TLSClientParameters; import org.apache.cxf.endpoint.Client; import org.apache.cxf.frontend.ClientProxy; @@ -19,6 +20,7 @@ import org.springframework.stereotype.Component; import javax.annotation.Nullable; import javax.net.ssl.SSLContext; +import javax.xml.ws.BindingProvider; import static at.gv.zustellung.app2mzs.xsd.KeyStoreType.keyStoreTypeBuilder; @@ -57,6 +59,10 @@ public class ClientFactory { Client client = ClientProxy.getClient(proxy); HTTPConduit http = (HTTPConduit) client.getConduit(); + var bindingProvider = (BindingProvider) proxy; + SOAPBinding binding = (SOAPBinding) bindingProvider.getBinding(); + binding.setMTOMEnabled(true); + var httpClientPolicy = new HTTPClientPolicy(); httpClientPolicy.setConnectionTimeout(params.getConnectionTimeout().longValueExact()); httpClientPolicy.setReceiveTimeout(params.getReceiveTimeout().longValueExact()); |