Remote page creation for confluence using jira script runner plugin.

import org.swift.common.soap.confluence.ConfluenceSoapServiceServiceLocator

def locator = new ConfluenceSoapServiceServiceLocator()

def service = locator.getConfluenceserviceV2(new URL(“http://localhost:8090/confluence/rpc/soap-axis/confluenceservice-v1″))

def token = service.login(“admin”, “password”)

def page = new RemotePage (

content: “groovy_working”,

creator: “admin”,

title: “groovy”,

space: “groovy”,

homePage: false,

created: Calendar.getInstance(),

modifier: “admin”,

version: 1,

modified: Calendar.getInstance(),

)

service.storePage(token, page)

I am using the above code where I need to create automatic page in confluence for a project for any issue created under that project in JIRA.

I have downloaded groovyrunner plugin. and I could use the script runner plugin in my JIRA successfully . But whenever I am trying to run the above code I am getting result as ”

org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: Script3.groovy: 7: unable to resolve class RemotePage @ line 7, column 12. def page = new RemotePage ( ^ 1 error “….
The URL above corresponds the one of the confluence on my local server

1 answer

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

1,205 views 23 10
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you