Wildfly 16 - JAX-WS RI

175 views
Skip to first unread message

Daniel Novo

unread,
May 3, 2023, 12:07:25 PM5/3/23
to WildFly
Hi everyone,

How can i use jax-ws ri instead of apache cxf in wildfly 16?

Thanks

--
--------------
Daniel Novo

James Perkins

unread,
May 3, 2023, 7:10:12 PM5/3/23
to WildFly
WildFly it tested and passes the TCK with Apache CXF. I'm not sure how easy it would be to replace the underlying implementation.

Alessio Soldano

unread,
May 4, 2023, 9:31:08 AM5/4/23
to WildFly
This is not something we regularly test; as James said WildFly is EE compliant via the JBossWS -  Apache CXF integration. As a consequence the only option for relying on a different JAX-WS implementation, including the RI, is to try disabling the webservices subsystem in WildFly, making it behave more like a plain servlet container (think about Tomcat for example). On recent WildFly versions, you might want to rely on Galleon to achieve that. Alternatively, you can disable the subsystems you're not interested in loading by specifying that in a jboss-deployment-structure.xml descriptor. Your deployment would clearly have to provide the JAX-WS implementation you're interested in using.
You can have a look at the "noIntegration" tests in the JBossWS-CXF testsuite for a similar scenario, see [1] and [2].

Cheers


--
You received this message because you are subscribed to the Google Groups "WildFly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wildfly+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/wildfly/CAGE9ZAVAgWEaj_DqpKp-AwGVHT6HhrZt%3D_YV4OAiMzi5zNUWNA%40mail.gmail.com.


--

Alessio Soldano

Manager, Software Engineering

Red Hat

Daniel Novo

unread,
May 15, 2023, 7:28:51 AM5/15/23
to Alessio Soldano, WildFly
Hi Alessio

Sorry for the delay, let me try to explain the reason i asked this. I'm facing an issue on several customers with my application running on wildfly-16.0.0.Final with openjdk 8 (jdk8u212).

This application consumes several country legal services (social security).
The web service clients were generated with wsimport and we use wildfly available implementation (apache cxf) to invoke them.
These web services use basic authentication (http header Authorization=Basic XXXXXXXX) to identify de legal entity (the customer) when consuming the service.
The user / password is retrieved from the database and can have multiple entities on the same application.
Sometimes, it seems the Authorization header is ignored by the service provider, and even if i force a wrong password the request is successfully consumed, or in some cases the customer detected that the request was associated to another entity.
I enabled the apache cxf logging in standalone.xml ( the org.apache.cxf.logging.enabled ), and verified that the Authorization header is correct with the information i have on the database.
I tried to use wireshark to see the communications but the endpoint uses SSL (https), so i cannot decrypt the traffic to check if there is some kind of bug. On a clean boot/after a application server restart, everything works fine.
After some time, can be days, this behaviour starts to happen.

I also upgraded to wildfly-24.0.1.Final and jdk8u372 but the issue remains. I was never able to reproduce this in a quality environment.

I hope I wasn't too confusing, but any ideias how to tackle this would be great.

Thank you



--
--------------
Daniel Novo

Alessio Soldano

unread,
May 18, 2023, 8:29:28 AM5/18/23
to Daniel Novo, WildFly
Hi Daniel,
it's almost impossible to provide a verified answer here without being able to reproduce/debug the issue. Anyway, if I were to guess what the problem there could be, I would suggest you have a look at the JBossWS documentation to try excluding issues with unexpected Apache CXF Bus instances selection in JAX-WS clients provided by JBossWS while running in-container. See https://jbossws.github.io/documentation/6.2.0.Final/JBossWS-CXF/#apache-cxf-integration , in particular the "Bus selection strategies for JAXWS clients" in section 5.10.3. I suspect the selection of the Bus at runtime might play a role in the issue there, with a client instance configured for a different/previous execution being used while you expected a new one to be used, or something along these lines. Just a guess anyway.

Cheers

Daniel Novo

unread,
May 18, 2023, 10:08:15 AM5/18/23
to Alessio Soldano, WildFly
Hi Alessio,

Before reading your email, i was testing setting the property cxf.client.connection with value "close". Not sure at this moment if  fixed my issue.

Anyway, i will try to explore your tip (bus selection).

Let me ask you, can i use system properties (standalone.xml) to choose the bus strategy like this:

<system-properties>
   <property name="org.jboss.ws.cxf.jaxws-client.bus.strategy" value="NEW_BUS"/>    
</system-properties>

I really appreciate your help, thank you!
--
--------------
Daniel Novo

Daniel Novo

unread,
May 24, 2023, 12:46:49 PM5/24/23
to Alessio Soldano, WildFly
Hi Alessio,

At this moment I am still facing the same issue I described in the initial post.

I'm not sure if my configuration is being used or ignored. I tried to enable several log's but the log messages don't give me any clue.

<logger category="org.jboss.ws.jaxws-client">
<level name="FINEST"/>
</logger>
<logger category="org.apache.cxf">
<level name="FINEST"/>
</logger>
<logger category="org.apache.cxf.bus">
<level name="FINEST"/>
</logger>
<logger category="org.apache.cxf.jaxws">
<level name="FINEST"/>
</logger>
<logger category="org.apache.cxf.configuration">
<level name="FINEST"/>
</logger>
<logger category="org.apache.cxf.transport.http">
<level name="FINEST"/>
</logger>
<logger category="org.apache.cxf.transport.https">
<level name="FINEST"/>
</logger>

As i mention before i tried these two configurations on my standalone.xml file (<system-properties>)

<property name="cxf.client.connection" value="close"/>
<property name="org.jboss.ws.cxf.jaxws-client.bus.strategy" value="NEW_BUS"/>

Not sure if this is the right way...

I also tried to call this JBossWSBusFactory.clearDefaultBusForAnyClassLoader(null); before every client invocation. 

Another test was adding the web service feature MyService service = new  MyService(new AddressingFeature(false), new org.jboss.wsf.stack.cxf.client.UseNewBusFeature());

Am I doing something wrong? Is there any log to check which bus strategy is enabled?

Thanks

--
--------------
Daniel Novo
Reply all
Reply to author
Forward
0 new messages