Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,551,790
Community Members
 
Community Events
184
Community Groups

Scriptrunner console - How to use groovy-wslite

Edited

Hi,

I want to implement a Webservice Client at one customer but I'm not able to use the @Grab command. At other customers it works but not for the special on. 

My sample code is

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

def client = new SOAPClient('http://www.thomas-bayer.com/axis2/services/BLZService?wsdl')
def response = client.send(SOAPAction:'http://www.thomas-bayer.com/axis2/services/BLZService') {
  body {
    getBank(xmlns:'http://thomas-bayer.com/blz/') {
      mkp.yieldUnescaped "<blz>66050101</blz>"
      }
  }
}
// result will be "Karlsruhe, Baden"
return response.getBankResponse.details.ort

The error is

The script could not be compiled: <pre>org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: General error during conversion: Error grabbing grapes -- /home/jira/.groovy/grapes/resolved-caller-all-caller-working33.xml (No such file or directory)

I found some documentation but I can manage it to work.

I also tried a custom plugin with resolved dependency in POM but I have no knowledge how to configure the plugin modules correctly and how to fetch with @WithPlugin and @PluginComponent 

Can anybody help?

Berst regards

Christof

2 answers

Hello @Christof Hurst _kreuzwerker_ ,

did you manage to use wslite in your Scriptrunenr script and if so how did you go about it?

No, for this installation it didn't work. I developed my own small request method.

0 votes
Peter-Dave Sheehan
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Jul 29, 2020

Just a guess here but does the customer's jira instance have proper outbound connectivity to the internet?

There could be some networking issues preventing groovy from accessing the package repository

Maybe. But how do I know what is wrong in the connectivity?

At the moment I don't blame it on the connectivity but on the missing user home directory. It seems that @Grab tries to create .groovy directory in users home but there is no user home depending on the OS distribution system

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events