Created
August 7, 2009 04:46
-
-
Save arnaudsj/163721 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# (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