Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to use SOAP Web Services in jira using Script Runner?

Maikes
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 10, 2019

Dearcolleagues from Atlassian_ Community, 

I'm new to Jira, and I would like to know if there is a possibility to to use SOAP Web Services in jira using Script Runner. 

Someone can help ? 

 

Regards Maikes 

1 answer

0 votes
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 10, 2019

Do you mean call other system's SOAP APIs or implement a SOAP interface in Jira?

Maikes
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 10, 2019

Hi @Nic Brough -Adaptavist- . I men both options! 

I know that SOAP ans XML-RPC were depreciated! 

SOAP and XML-RPC API Deprecation Notice, https://developer.atlassian.com/server/jira/platform/soap-and-xml-rpc-api-deprecation-notice/

Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 10, 2019

Ok, so

  • Outgoing - yes SR can easily make SOAP calls to other systems.
  • Incoming - not directly.  You would need to write an entire SOAP style interaction, and I don't know that you could get it to "listen" the same way XML-RPC does.  You might have to provide REST end-points to tell it to listen to the next SOAP message

I would strongly recommend not bothering - use the REST interface instead, it's a lot nicer than the old SOAP stuff.

Maikes
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 10, 2019

Thanks for your time @Nic Brough -Adaptavist- ! 

Could you please provide me information about the topics you had mentioned? 

I couldn't find any information about that!!  

Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 11, 2019

For getting SR to call out to SOAP services, I've used https://www.baeldung.com/groovy-web-services in the past.

For calling the standard Jira REST APIs, start at https://developer.atlassian.com/server/jira/platform/rest-apis/

And then if you find the Jira REST APIs lacking, you can write your own in ScriptRunner - https://scriptrunner.adaptavist.com/latest/jira/rest-endpoints.html

Like Johannes likes this
Johannes
Contributor
February 20, 2020

Hi @Nic Brough -Adaptavist- ,

I am currently also trying to access a SOAP service via ScriptRunner.

Do you have some sample code how you managed to get it running?

I have tried it with the following, but I receive this error:

java.lang.NoClassDefFoundError: groovy/lang/GroovyObject

 

@Grab('com.github.groovy-wslite:groovy-wslite:1.1.2')
import wslite.soap.*

def url = "http://www.dataaccess.com/webservicesserver/numberconversion.wso"
def soapClient = new SOAPClient(url)

def message = new SOAPMessageBuilder().build({
body {
NumberToWords(xmlns: "http://www.dataaccess.com/webservicesserver/") {
ubiNum(123)
}
}
})
def response = soapClient.send(message.toString());
def words = response.NumberToWordsResponse

 

ScriptRunner is using groovy version 2.4.15

 

Thanks a lot

Johannes

Lars Swart
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 30, 2020

Hi Johannes,

did you get any further?

 

I'm also trying to call a SOAP via Scriptrunner

Johannes
Contributor
December 4, 2020

Hi Lars,

no, unfortunately not.

We ended up using a REST endpoint ;)

Suggest an answer

Log in or Sign up to answer