Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-13698

RemoteWorklog doesn not deserialize in .Net

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Won't Fix
    • None
    • None
    • Jira 3.11 Entrprise running on Windows 3003 R2, .Net 2.0
    • We collect Jira feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

    Description

      NOTE: This suggestion is for JIRA Server. Using JIRA Cloud? 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: