Uploaded image for project: 'Jira Server and Data Center'
  1. Jira Server and Data Center
  2. JRASERVER-23963

Creating Service Reference from JIRA WSDL in Visual Studio 2010 generates all methods void

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Low
    • Resolution: Won't Fix
    • Affects Version/s: 4.1.2
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Environment:

      JIRA 4.1.2#531
      Microsoft Visual Studio 2010
      Microsoft .NET FrameworkVisual Studio 2010
      Microsoft Windows 7

      Description

      I added a service reference using WSDL from our internal JIRA (https://jira.opentext.com/rpc/soap/jirasoapservice-v2?wsdl). It generated service proxy class with all methods with no arguments and returning nothing. For example:

      public void addActorsToProjectRole()

      { base.Channel.addActorsToProjectRole(); }

      [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
      public System.IAsyncResult BeginaddActorsToProjectRole(System.AsyncCallback callback, object asyncState)

      { return base.Channel.BeginaddActorsToProjectRole(callback, asyncState); }

      [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
      public void EndaddActorsToProjectRole(System.IAsyncResult result)

      { base.Channel.EndaddActorsToProjectRole(result); }

      private System.IAsyncResult OnBeginaddActorsToProjectRole(object[] inValues, System.AsyncCallback callback, object asyncState)

      { return this.BeginaddActorsToProjectRole(callback, asyncState); }

      I tried to add another service reference from http://jira.atlassian.com/rpc/soap/jirasoapservice-v2?wsdl with the same result. Turning on asynchronous methods did not help. Visual Studio logged 461 warnings after adding the reference. For example:

      Warning 1 Custom tool warning: Fault named RemoteException in operation getComment cannot be imported. Unsupported WSDL, the fault message part must reference an element. This fault message does not reference an element. If you have edit access to the WSDL document, you can fix the problem by referencing a schema element using the 'element' attribute. c:\users\ferdipr\documents\visual studio 2010\Projects\JiraTest\Service References\Jira2\Reference.svcmap 1 1 JiraTest

      Warning 2 Custom tool warning: The optional WSDL extension element 'body' from namespace 'http://schemas.xmlsoap.org/wsdl/soap/' was not handled.
      XPath: //wsdl:definitions[@targetNamespace='http://jira.atlassian.com/rpc/soap/jirasoapservice-v2']/wsdl:binding[@name='jirasoapservice-v2SoapBinding']/wsdl:operation[@name='getComment']/wsdl:input[@name='getCommentRequest'] c:\users\ferdipr\documents\visual studio 2010\Projects\JiraTest\Service References\Jira2\Reference.svcmap 1 1 JiraTest

      Warning 4 Custom tool warning: The optional WSDL extension element 'fault' from namespace 'http://schemas.xmlsoap.org/wsdl/soap/' was not handled.
      XPath: //wsdl:definitions[@targetNamespace='http://jira.atlassian.com/rpc/soap/jirasoapservice-v2']/wsdl:binding[@name='jirasoapservice-v2SoapBinding']/wsdl:operation[@name='getComment']/wsdl:fault[@name='RemoteException'] c:\users\ferdipr\documents\visual studio 2010\Projects\JiraTest\Service References\Jira2\Reference.svcmap 1 1 JiraTest

      I tried also adding a web reference and it worked. (Old SOAP service support originating from previous Visual Studio versions that is still available on Advanced Settings of a service reference. The new service references are probably based on WCF.)

      How to reproduce it:

      1. Create testing project "JiraTest" in Visual Studio 2010 based on WPF Application project type using .NET 4.0.
      2. Add a service reference using the URL http://jira.atlassian.com/rpc/soap/jirasoapservice-v2?wsdl.
      3. create an instance of the client proxy: new JiraTest.JiraSoapServiceClient().
      4. Browse the generated proxy class JiraSoapServiceClient and interface JiraSoapService and check the method prototypes.

      While the old-style web references serve as a workaround now, it is inconvenient not to be able to use the WCF.

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            prantlf Ferdinand Prantl
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: