Hello everyone,
We've recently updated to Jira DC 8.20.7 on our Staging Environment, which comes bundled with Java 11. We're currently using Scriptrunner (Post Functions) to connect and upload documents to a SOAP service and a SR custom REST Endpoint to retrieve the documents afterwards via SOAP.
This worked nicely with javax.xml.soap, but as this is no longer bundled with Java 11, we've switched to jakarta.xml.soap from the maven repo.
However, this creates a curious error:
Inside a postfunction that is triggered manually by a user via Workflow step, we can use the jakarta SOAP classes normally. Everything works as before.
HOWEVER,
inside the Scriptrunner console, as well as inside a REST Endpoint, we get the error that the SOAP Connection Factory is not found.
jakarta.xml.soap.SOAPException: Unable to create SOAP connection factory: Error while searching for service [jakarta.xml.soap.SOAPConnectionFactory]
at jakarta.xml.soap.SOAPConnectionFactory.newInstance(SOAPConnectionFactory.java:58)
at jakarta.xml.soap.SOAPConnectionFactory$newInstance.call(Unknown Source)
So basically, the code below works in a post function when I push a workflow button, but not when I paste it into the console/REST Endpoint:
import jakarta.xml.soap.*
SOAPConnectionFactory factory = SOAPConnectionFactory.newInstance();
( no type checking errors are displayed)
How can we fix this? We extracted the jar files from the package (https://search.maven.org/artifact/jakarta.xml.ws/jakarta.xml.ws-api/4.0.0/jar ) into WEB-INF/lib - are we missing a step? Do they need to be installed properly? If yes, how?