Skip to content

Instantly share code, notes, and snippets.

@arnaudsj
Created August 7, 2009 04:46
Show Gist options
  • Save arnaudsj/163721 to your computer and use it in GitHub Desktop.
Save arnaudsj/163721 to your computer and use it in GitHub Desktop.
# (Prerequesite) Install soaplib by running: easy_install soaplib
from soaplib.client import make_service_client
from soaplib.wsgi_soap import SimpleWSGISoapApp
from soaplib.service import soapmethod
from soaplib.serializers.primitive import String, Integer, Array
class JiraSOAPService(SimpleWSGISoapApp):
@soapmethod(String, String, _outVariableName="loginReturn", _returns=String)
def login(self,username,password):
pass
@soapmethod(String, _outVariableName="logoutReturn", _returns=String)
def logout(self, authToken):
pass
# Add here any other methods from the JiraSoapRPCPluginAPI: http://docs.atlassian.com/software/jira/docs/api/rpc-jira-plugin/latest/com/atlassian/jira/rpc/soap/JiraSoapService.html
if __name__=='__main__':
JiraSoapRPCUrl = 'http://localhost:8080/rpc/soap/jirasoapservice-v2'
jira_client = make_service_client(JiraSoapRPCUrl,JiraSoapService())
# Now let's grab a token
authToken = jira_client.login("testuser","password")
# Add here other calls to do what you want!
# Then logout!
print jira_client.logout(authToken)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment