SOAP client not working on Liferay 7.4 and Java 11SOAP client not working on Liferay 7.4 and Java 11https://liferay.dev/c/message_boards/find_thread?p_l_id=119785333&threadId=1215755212024-03-28T22:12:21Z2024-03-28T22:12:21ZRE: RE: SOAP client not working on Liferay 7.4 and Java 11Ruben Lopezhttps://liferay.dev/c/message_boards/find_message?p_l_id=119785333&messageId=1216459572023-02-08T22:01:03Z2023-02-07T16:20:59Z<p>Hi Christoph, thanks for your answer. I've tried that but,
unfortunately, it didn't solve the issue for me. </p>
<p>I've made some progress looking at this example here: https://gist.github.com/fabian-bouche-liferay/bf7fdfb7c3d02052f642314b1ae7549b</p>
<p>however, the issue I'm facing now is this one: </p>
<pre>
<strong>Caused by: javax.xml.soap.SOAPException: Unable to create message factory for SOAP: Unable to create SAAJ meta-factory: Provider com.sun.xml.internal.messaging.saaj.soap.SAAJMetaFactoryImpl not found</strong>
</pre>
<p> </p>
<p>I've tried by adding the saaj-impl dependency to my module, as stated here: https://help.liferay.com/hc/en-us/articles/11725669898125-Unable-to-create-message-factory-for-SOAP,</p>
<p>but it doesn't seem to make any difference. I think the SAAJ library
is not even picked up by Apache CXF.</p>Ruben Lopez2023-02-07T16:20:59ZRE: RE: SOAP client not working on Liferay 7.4 and Java 11Ruben Lopezhttps://liferay.dev/c/message_boards/find_message?p_l_id=119785333&messageId=1216459502023-02-08T22:00:56Z2023-02-07T16:15:19Z<p>Hi Zsigmond, thanks for your answer and sorry for the late reply. As
mentioned in the link shared below by Christoph Rabel, the issue is
related to the ProviderImpl not being available in Java 11.</p>
<p>I've been trying a number of things suggested in different threads
and posts, but I ended up dealing with a nightmare of conflicting dependencies.</p>
<p>The latest issue I'm facing is:</p>
<pre>
<strong>Caused by: javax.xml.soap.SOAPException: Unable to create message factory for SOAP: Unable to create SAAJ meta-factory: Provider com.sun.xml.internal.messaging.saaj.soap.SAAJMetaFactoryImpl not found
</strong>I've tried to fix it as suggested here, but it didn't work:
https://help.liferay.com/hc/en-us/articles/11725669898125-Unable-to-create-message-factory-for-SOAP
</pre>Ruben Lopez2023-02-07T16:15:19ZRE: SOAP client not working on Liferay 7.4 and Java 11Christoph Rabelhttps://liferay.dev/c/message_boards/find_message?p_l_id=119785333&messageId=1215816462022-11-28T21:02:07Z2022-11-26T08:42:17Z<p>I am not sure if it helps you, but we also had the "ProviderImpl
is gone" problem in Liferay. I discussed it with one of the
developers and opened a ticket for it, which describes how it could be
solved in 7.2. I am not sure if this still works in 7.4 or if it even
applies to your issue, but it is probably worthwile to try it:</p>
<p>https://issues.liferay.com/browse/LPS-98339</p>Christoph Rabel2022-11-26T08:42:17ZRE: SOAP client not working on Liferay 7.4 and Java 11Zsigmond Rabhttps://liferay.dev/c/message_boards/find_message?p_l_id=119785333&messageId=1215799212022-11-28T21:02:00Z2022-11-24T12:05:05Z<p>Hi Ruben,</p>
<p>Unfortunately, I'm not sure what the problem is exactly, however,
SOAP is not supported from 7.4 version anymore: <a href="https://learn.liferay.com/dxp/latest/en/installation-and-upgrades/upgrading-liferay/reference/maintenance-mode-and-deprecations-in-7-3.html#features-deprecated-in-7-3">https://learn.liferay.com/dxp/latest/en/installation-and-upgrades/upgrading-liferay/reference/maintenance-mode-and-deprecations-in-7-3.html#features-deprecated-in-7-3</a>.</p>
<p>You can re-anable with a property, however, you may be better to find
an alternative solution for that.</p>
<p>Regards,</p>Zsigmond Rab2022-11-24T12:05:05ZSOAP client not working on Liferay 7.4 and Java 11Ruben Lopezhttps://liferay.dev/c/message_boards/find_message?p_l_id=119785333&messageId=1215755202022-11-22T19:10:43Z2022-11-22T18:09:50Z<p>Hi,</p>
<p>I'm upgrading the code of a SOAP client to Liferay 7.4 running on
Java 11.I've been reading through loads of posts related to previous
versions of Liferay, however, I haven't been able to make this work yet.</p>
<p>The closest I've got so far is by
using org.apache.cxf.jaxws.spi.ProviderImpl instead of the previously
available com.sun.xml.internal.ws.spi.ProviderImpl. However, the issue
I'm facing now when I try to call the remote service is the following: <br />
<br />
<strong>javax.xml.ws.WebServiceException: Could not find wsdl:binding
operation info for web method getWSCTaxGetAccountDetails</strong></p>
<p>I've got to this point be following this interesting
thread https://liferay.dev/ask/questions/development/re-re-make-soap-client-ootb-in-liferay-7-3-and-java-11-1
and the code provided by Fabian Bouché, but it's not working for me on 7.4.</p>
<p>I've got a ServiceFactory which tries to instantiate the provider
before actually retrieving the service client class:</p>
<pre>
<code class="language-java">import javax.xml.ws.spi.Provider;
import org.apache.cxf.jaxws.spi.ProviderImpl;
@Activate
@Modified
public void activate(BundleContext bundleContext, Map<String, Object> properties) throws Exception {
ProviderImpl providerImpl = new ProviderImpl();
Dictionary<String, Object> providerProperties = new Hashtable<>();
bundleContext.registerService(Provider.class, providerImpl, providerProperties);
}</code></pre>
<p> </p>
<p>Does anyb