Unfortunately that didn't quite work as I fell into the trap of then
needing javax.jws.
However - I do now have it working, tho I did have to end up updating
the bundle that included the WSDL generation. In my custom distribution
I now have:
<feature name="smx3.cxf" description="SMX3 :: CXF"
version="${project.version}">
<bundle>mvn:jakarta.activation/jakarta.activation-api/2.1.2</bundle>
<bundle>mvn:jakarta.jws/jakarta.jws-api/3.0.0</bundle>
<bundle>mvn:jakarta.xml.bind/jakarta.xml.bind-api/4.0.0</bundle>
<bundle>mvn:jakarta.xml.ws/jakarta.xml.ws-api/4.0.1</bundle>
<bundle>mvn:jakarta.xml.soap/jakarta.xml.soap-api/3.0.1</bundle>
<feature version="3.6.2">cxf-core</feature>
<feature version="3.6.2">cxf-jaxws</feature>
<feature version="3.6.2">cxf-http</feature>
<feature version="3.6.2">cxf-specs</feature>
<feature version="3.6.2">cxf-wsdl</feature>
<feature version="3.6.2">cxf-databinding-jaxb</feature>
<feature version="3.6.2">cxf-bindings-soap</feature>
</feature>
It's possible I could trim some of the included <feature/>'s there as
they're transcluded by the others, but for now this works. This switches
to the jakarta.xml version of packages, which avoids the default export
of javax.xml. In the karaf-maven-plugin configuration, I had to set
<javase>11</javase> tho as it was a requirement for one of those bundles
(I forget which off hand), and for some reason I couldn't use
<javase>21</javase> as it claimed it wasn't a valid Java version.
On the service side, I had to add the following dependencies:
<dependency>
<groupId>jakarta.jws</groupId>
<artifactId>jakarta.jws-api</artifactId>
<version>3.0.0</version>
</dependency>
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<version>4.0.0</version>
</dependency>
<dependency>
<groupId>jakarta.xml.ws</groupId>
<artifactId>jakarta.xml.ws-api</artifactId>
<version>4.0.1</version>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>[2.3.1]</version>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>javax.xml.ws</groupId>
<artifactId>jaxws-api</artifactId>
<version>[2.3.1]</version>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
and updated cxf-codegen-plugin to 4.0.3. Interestingly, I couldn't find
any suitable replacements/updates for
org.jvnet.jaxb2_commons:jaxb2-fluent-api it's sibling XCJ extensions so
had to rewrite one wrapper service to match the changed code-gen.
But it seems to be working now. At least - the custom image
builds/verifies and starts up - I've not yet tried calling any of the
services yet. Tomorrows job.
Mark
On 6/11/23 8:44 pm, Grzegorz Grzybek wrote:
I think you should simply drop jakarta.xml.ws-api-2.3.3.jar
<https://repo1.maven.org/maven2/jakarta/xml/ws/jakarta.xml.ws-api/2.3.3/jakarta.xml.ws-api-2.3.3.jar>
into KARAF_HOME/lib/jdk9plus