Gemini Community Support Site

This Gemini community support site can be used to find solutions to product issues. You can log in using Open Id, Google Profile and even Facebook. Feel free to ask a question or browse FAQs and documentation. Product tour videos are also available along with how-to videos demonstrating key Gemini capabilities.




Exception thrown by the target of an invocation - CreateIssue

api

Hello. I am upgrading our Gemini installation from version 2.0 to 3.5.4 and am running into a problem with the web services API.

We have a publicly facing web form written in .NET that uses the web services API to allow people to create issues for a small number of projects.

I upgraded the web form to use the new web services API, and whenever I try to create an issue I get the following exception:

Exception has been thrown by the target of an invocation.
at CounterSoft.Gemini.WebServices.BaseService.ThrowResponseException(WebResponse response) at CounterSoft.Gemini.WebServices.BaseService.ProcessResponse[T](String url, Object obj, RequestType requestType) at CounterSoft.Gemini.WebServices.BaseService.GetResponse[T](String url, Object o, RequestType r) at CounterSoft.Gemini.WebServices.IssuesService.CreateIssue(IssueEN issue) at geminirequestsIDART.btnSubmitClick(Object sender, EventArgs e) in c:\Users\gossep\Documents\Visual Studio 2008\WebSites***\geminirequests\IDART.aspx.cs:line 274

In an attempt to isolate the problem I created a test form that would create a simple web service request and submit it. I used the code from the btnCreateIssue_Click event handler in FormIssue.cs in the CounterSoft_Gemini_API_Samples_v3_5_4.zip download as a reference in building the test form.

The code I am using to create the request in the test form is below:

...
using CounterSoft.Gemini.Commons;
using CounterSoft.Gemini.WebServices;
...

    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        IssuesService issueService = new IssuesService("http://gemini.
.ca/gemini", "IssueCreator", "IssueCreator", "tsxzja68i8");

        IssueEN data = new IssueEN();

        IssueComponentEN[] iceComps = new IssueComponentEN[1];
        iceComps[0] = new IssueComponentEN();

        iceComps[0].ComponentID = 84;
        data.Components = iceComps;
        data.FixedInVersion = 0;
        data.IssueLongDesc = "Long description";
        data.IssuePriority = 1;
        data.IssueResolution = 1;
        data.IssueStatus = 1;
        data.IssueSummary = "Issue Summary";
        data.IssueType = 1;
        data.IssueSeverity = 1;
        data.ReportedBy = 1;
        data.RiskLevel = 1;
        data.Visibility = 1;
        data.VisibilityMemberType = GeminiConstant.SecurityMemberType.GlobalGroup;

        data.ProjectID = 10;

        try
        {
            data.IssueID = issueService.CreateIssue(data).IssueID;
        }
        catch (Exception ex)
        {
            Response.Write(ex.Message + "<br />" +
                ex.StackTrace + "<br />" +
                ex.InnerException);
        }
    }

This code, which was taken from the API samples, results in the same exception as the originally upgraded form.

Exception has been thrown by the target of an invocation.
at CounterSoft.Gemini.WebServices.BaseService.ThrowResponseException(WebResponse response) at CounterSoft.Gemini.WebServices.BaseService.ProcessResponse[T](String url, Object obj, RequestType requestType) at CounterSoft.Gemini.WebServices.BaseService.GetResponse[T](String url, Object o, RequestType r) at CounterSoft.Gemini.WebServices.IssuesService.CreateIssue(IssueEN issue) at geminirequests_WSTest.btnSubmit_Click(Object sender, EventArgs e) in c:\Users\gossep\Documents\Visual Studio 2008\WebSites\
***
\geminirequests\WSTest.aspx.cs:line 51

The InnerException is null in both cases. Can anyone provide any insight into what the problem could be?

Thanks,
Pablo

pablo
· 1
pablo
Replies (6)
helpful
0
not helpful

Please double check that the issue priority, type, visibility etc.. are valid ids.


Saar Cohen
· 5000
Saar Cohen
helpful
0
not helpful

Hello. Thank you for your reply. I apologize for not mentioning this in my original post.

I saw another post about this error message and that the cause there was invalid IDs that were being passed to the web service API methods.

I did verify that the following are all valid:

  • ComponentID (84) - valid ComponentID in geminicomponents and has the correct ProjectID (10)
  • ProjectID (10) - valid ProjectID in geminiprojects
  • Priority (1) - valid PriorityID in geminiissuepriorities
  • IssueResolution (1) - valid ResolutionID in geminiissueresolutions
  • IssueStatus (1) - valid StatusID in geminiissuestatus
  • IssueType (1) - valid TypeID in geminiissuetypes
  • IssueSeverity (1) - valid SeverityID in geminiissueserverity
  • ReportedBy (1) - valid UserID in geminiusers
  • RiskLevel (1) - valid RiskLevelID in gemini_issuerisklevels

Also, there is no Version for the project to which I am trying to add this issue, so 0 is being passed. I am also passing 1 for the Visibility. This is how it was done in the previous API. Has this changed?

Is there anything else you can think of that could be causing this problem?

Thanks,
Pablo


pablo
· 1
pablo
helpful
0
not helpful

Please make sure that you have a global group with the id of 1.

If it still does not work, please send a zip backup of your database to support at countersoft dot com


Saar Cohen
· 5000
Saar Cohen
helpful
0
not helpful

Hello. The global group with id 1 does exist.

Would it be possible for you to log in remotely to our server to look at the problem, doing so via a WebEx (other online collaboration tool) such that we can see what you are doing? Please let me know if that is possible and we can proceed from there.

Thanks,
Pablo


pablo
· 1
pablo
helpful
0
not helpful

Please send an email to support at countersoft dot com


Mark Wing
· 9108
Mark Wing
helpful
0
not helpful

Email has been sent. Additionally, I tested out some of the other web service API calls and they worked fine.

Thanks,
Pablo


pablo
· 1
pablo