DXP 7.2 || OSGI Always Importing from jar file in ROOT/WEB-INF/lib

thumbnail
Jamie Sammons, modified 2 Years ago. New Member Posts: 7 Join Date: 3/19/15 Recent Posts

In one of my recent projects on DXP 7.2, I was upgrading from javax.xml to jakarta.xml. In order to upgrade my Soap calls I imported jakarta.xml.soap-api version 2.0.1 as API and provided saaj-impl version 2.0.1 as its implementation. 

I added both these dependencies as compileInclude. When I was creating a MessageFactory it was always referring to com.sun.xml.internal.messaging.saaj.soap.SAAJMetaFactoryImpl inside saaj-impl that was present in web-inf/lib instead of referring to the one provided with the bundle.

I tried all the approaches specified here https://help.liferay.com/hc/en-us/articles/360028710272-Resolving-Third-Party-Library-Package-Dependencies without any solution. I have also taken a hint from https://liferay.dev/ask/questions/development/conflicting-libraries-3 as well.

Can anyone help me, where am  I going wrong?

Regards,

Ishaan

 

thumbnail
Jamie Sammons, modified 2 Years ago. Liferay Legend Posts: 14933 Join Date: 9/2/06 Recent Posts

If it is Service Builder-generated or other Liferay code it will never use your SOAP calls.

You can leverage SOAP to do your own client calls or service implementation, but Liferay's not going to do that for you.