Forums

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

Scriptrunner console - How to use groovy-wslite

Christof Hurst _kreuzwerker_
July 29, 2020

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

1 answer

Suggest an answer

Log in or Sign up to answer
0 votes
Martin Bayer _MoroSystems_ s_r_o__
Community Champion
August 5, 2021

Hi @serge calderara , it must be wrong request sent by your customer. I would check his request and compare it with your request. Can you share your postman and your customer's postmand screenshots?

serge calderara
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 Champions.
August 5, 2021

hello @Martin Bayer _MoroSystems_ s_r_o__ , I have configure myself the postman request at customer site remotely so I am 100% sure it is the same.

The only difference between is the network infrastructure only 

Martin Bayer _MoroSystems_ s_r_o__
Community Champion
August 5, 2021

I am not networking expert but maybe some network device in a chain is changing headers in outcomming http request? Can you check with them?

And did yo use postman or dofferent client at customer site?

serge calderara
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 Champions.
August 5, 2021

we solve it, it was due to cookies

Manasa Nallareddy
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 6, 2025

Hi @serge calderara ,

We are also facing the same issue can you please help us that how did you solve the issue.

Manasa Nallareddy
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 7, 2025

Hi @serge calderara ,

Please help us with the solution

TAGS
AUG Leaders

Atlassian Community Events