Uploaded image for project: 'Jira Cloud'
  1. Jira Cloud
  2. JRACLOUD-13698

RemoteWorklog doesn not deserialize in .Net

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Won't Fix
    • Ecosystem
    • Jira 3.11 Entrprise running on Windows 3003 R2, .Net 2.0
    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

    Description

      NOTE: This suggestion is for JIRA Cloud. Using JIRA Server? See the corresponding suggestion.

      I get the following error when I try to recieve a response that should be formatted as a RemoteWorklog:

      System.InvalidCastException was caught
      Message="Unable to cast object of type 'System.Xml.XmlNode[]' to type 'StarNet.Jira.Library.Jira.RemoteWorklog'."
      Source="StarNet.Jira.Library"
      StackTrace:
      at StarNet.Jira.Library.Jira.JiraSoapServiceService.addWorklogAndAutoAdjustRemainingEstimate(String in0, String in1, RemoteWorklog in2)
      at StarNet.Jira.Library.Service.AddWorkLogToIssue(String issueKey, RemoteWorklog workLog)

      After closer analysis the main issue here is that the SOAP response has the following definition for the Worklog namespace:
      xsi:type="ns3:IssueServiceImpl$RemoteWorklogImpl"
      But in .Net the '$' character is not valid in xsi type descriptions.

      To get around this I have re-written the RPC for our live server to return a Long value as the RemoteWorklog.id.
      This is generally more practiacl anyway, though I would really like to get the whole object for the sake continuity as I cannot be sure how the Service will modify the Worklog after updates.

      I have attached the diff file for anyone interested in similar functionality. (there are a few other features in this diff file for your pleasure also!)
      *Please Note that these changes will break the standard test scripts.

      further structural issues:
      RemoteWorklog object has readonly properties, this doesn't directly affect how the object is comsumed at the client end but with a severe lack of documentation it is impossible to know which fields are expected to be changed when the object is passed as a parameter to the Soap Service.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              e6bbb697abf9 Christopher Schaller
              Votes:
              9 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: