diff options
author | Christof Rabensteiner <christof.rabensteiner@iaik.tugraz.at> | 2019-04-08 15:31:10 +0200 |
---|---|---|
committer | Christof Rabensteiner <christof.rabensteiner@iaik.tugraz.at> | 2019-04-08 15:31:10 +0200 |
commit | abbc1e1576b9ac43f71aff6e4ca7697dcb12154a (patch) | |
tree | 3f34ed331f4c5b7140a9b32425b31b805114a44d /src/main/java/at/gv/egiz/moazs/App2MzsServiceConfig.java | |
parent | 5975f5a96474dc129f282871f2d7d691cb0a52c9 (diff) | |
download | moa-zs-abbc1e1576b9ac43f71aff6e4ca7697dcb12154a.tar.gz moa-zs-abbc1e1576b9ac43f71aff6e4ca7697dcb12154a.tar.bz2 moa-zs-abbc1e1576b9ac43f71aff6e4ca7697dcb12154a.zip |
Update Codebase to Match MZS Schema Changes
- Important Fix: I forgot to annotate App2MzsService with @Service and
autowire the App2MzsService object when creating the endpoint
bean. For this reason, Spring did not autowire the dependencies in
App2MzsService and I ended up with NullPointerExceptions in the
testsuite.
- Updated some more namespaces
- Add objectFactory bean. objectfactory is autogenerated via the
cxf-code-generation plugin, so i cannot annotate it with @Component
or @Service. Alternative: create the @Bean by myself
- Update the validDeliveryRequest SOAP Message to match the mzs 2.0.0
scheme.
Diffstat (limited to 'src/main/java/at/gv/egiz/moazs/App2MzsServiceConfig.java')
-rw-r--r-- | src/main/java/at/gv/egiz/moazs/App2MzsServiceConfig.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/main/java/at/gv/egiz/moazs/App2MzsServiceConfig.java b/src/main/java/at/gv/egiz/moazs/App2MzsServiceConfig.java index 64e353d..578fecd 100644 --- a/src/main/java/at/gv/egiz/moazs/App2MzsServiceConfig.java +++ b/src/main/java/at/gv/egiz/moazs/App2MzsServiceConfig.java @@ -1,5 +1,6 @@ package at.gv.egiz.moazs; +import at.gv.e_government.reference.namespace.zustellung.mzs.app2mzs_.ObjectFactory; import org.apache.cxf.Bus; import org.apache.cxf.jaxws.EndpointImpl; import org.springframework.beans.factory.annotation.Autowired; @@ -14,12 +15,19 @@ public class App2MzsServiceConfig { @Autowired private Bus bus; + @Autowired + private App2MzsService app2mzsService; + @Bean public Endpoint endpoint() { - EndpointImpl endpoint = new EndpointImpl(bus, new App2MzsService()); + EndpointImpl endpoint = new EndpointImpl(bus, app2mzsService); endpoint.setAddress("/"); endpoint.publish(); return endpoint; } + @Bean + public ObjectFactory objectFactory() { + return new ObjectFactory(); + } } |