It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

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

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

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/

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.

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!!  

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

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

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you