Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-16119

SOAP API should be compatible with .NET Framework 3/4

    XMLWordPrintable

Details

    • We collect Confluence 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 Confluence Server. Using Confluence Cloud? See the corresponding suggestion.

      You're using overloads for operations ("getPage" is only one example):

      <wsdl:operation name="getPage" parameterOrder="in0 in1 in2">
      <wsdl:input message="impl:getPageRequest" name="getPageRequest"/>
      <wsdl:output message="impl:getPageResponse" name="getPageResponse"/>
      <wsdl:fault message="impl:InvalidSessionException" name="InvalidSessionException"/>
      <wsdl:fault message="impl:RemoteException" name="RemoteException"/>
      </wsdl:operation>

      <wsdl:operation name="getPage" parameterOrder="in0 in1">
      <wsdl:input message="impl:getPageRequest1" name="getPageRequest1"/>
      <wsdl:output message="impl:getPageResponse1" name="getPageResponse1"/>
      <wsdl:fault message="impl:InvalidSessionException" name="InvalidSessionException"/>
      <wsdl:fault message="impl:RemoteException" name="RemoteException"/>
      </wsdl:operation>

      But, it's not supported (at least) by .NET Framework 3.0/3.5. I guess it'd be much better to give distinct names for such operations (getPage and getPageById for example).

      For testing please use SvcUtil.exe from .NET FW 3. not wsdl.exe from .NET 2.0 (which is almost depricated).

      For the wsdl from above SvcUtil creates the following code (C#). Please notice two method getPage and getPage1. It's impossible to call a service via getPage1 method because server side doesn't know such method.
      So in general the result client .net code is much more complex than it could be (notice wrappers and messagecontracts). I can understand that you guys from another world (Java), but it'd be nice to have good interoperability with Confluence on .NET platform, wouldn't it?

      The result code (excepts):
      // CODEGEN: Generating message contract since the wrapper namespace (http://soap.rpc.confluence.atlassian.com) of message getPageRequest does not match the default value (http://confluence.atlassian.com/rpc/soap-axis/confluenceservice-v1)
      [System.ServiceModel.OperationContractAttribute(Action="", ReplyAction="*")]
      [System.ServiceModel.XmlSerializerFormatAttribute(Style=System.ServiceModel.OperationFormatStyle.Rpc, Use=System.ServiceModel.OperationFormatUse.Encoded)]
      [System.ServiceModel.ServiceKnownTypeAttribute(typeof(RemoteException))]
      [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Vector))]
      [System.ServiceModel.ServiceKnownTypeAttribute(typeof(RemotePermission))]
      [System.ServiceModel.ServiceKnownTypeAttribute(typeof(RemoteNodeStatus))]
      [System.ServiceModel.ServiceKnownTypeAttribute(typeof(RemotePageHistory))]
      [System.ServiceModel.ServiceKnownTypeAttribute(typeof(RemoteContentPermission))]
      [System.ServiceModel.ServiceKnownTypeAttribute(typeof(AbstractRemotePageSummary))]
      [System.ServiceModel.ServiceKnownTypeAttribute(typeof(RemoteSpaceSummary))]
      [System.ServiceModel.ServiceKnownTypeAttribute(typeof(RemoteSearchResult))]
      ConfluenceInterop.getPageResponse getPage(ConfluenceInterop.getPageRequest request);

      // CODEGEN: Generating message contract since the wrapper namespace (http://soap.rpc.confluence.atlassian.com) of message getPageRequest1 does not match the default value (http://confluence.atlassian.com/rpc/soap-axis/confluenceservice-v1)
      [System.ServiceModel.OperationContractAttribute(Action = "", ReplyAction = "*")]
      [System.ServiceModel.XmlSerializerFormatAttribute(Style = System.ServiceModel.OperationFormatStyle.Rpc, Use = System.ServiceModel.OperationFormatUse.Encoded)]
      [System.ServiceModel.ServiceKnownTypeAttribute(typeof(RemoteException))]
      [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Vector))]
      [System.ServiceModel.ServiceKnownTypeAttribute(typeof(RemotePermission))]
      [System.ServiceModel.ServiceKnownTypeAttribute(typeof(RemoteNodeStatus))]
      [System.ServiceModel.ServiceKnownTypeAttribute(typeof(RemotePageHistory))]
      [System.ServiceModel.ServiceKnownTypeAttribute(typeof(RemoteContentPermission))]
      [System.ServiceModel.ServiceKnownTypeAttribute(typeof(AbstractRemotePageSummary))]
      [System.ServiceModel.ServiceKnownTypeAttribute(typeof(RemoteSpaceSummary))]
      [System.ServiceModel.ServiceKnownTypeAttribute(typeof(RemoteSearchResult))]
      ConfluenceInterop.getPageResponse1 getPage1(ConfluenceInterop.getPageRequest1 request);

      [System.Diagnostics.DebuggerStepThroughAttribute()]
      [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
      [System.ServiceModel.MessageContractAttribute(WrapperName="getPage", WrapperNamespace="http://soap.rpc.confluence.atlassian.com", IsWrapped=true)]
      public partial class getPageRequest
      {

      [System.ServiceModel.MessageBodyMemberAttribute(Namespace="", Order=0)]
      public string in0;

      [System.ServiceModel.MessageBodyMemberAttribute(Namespace="", Order=1)]
      public string in1;

      [System.ServiceModel.MessageBodyMemberAttribute(Namespace="", Order=2)]
      public string in2;

      public getPageRequest()
      {
      }

      public getPageRequest(string in0, string in1, string in2)

      { this.in0 = in0; this.in1 = in1; this.in2 = in2; }

      }

      [System.Diagnostics.DebuggerStepThroughAttribute()]
      [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
      [System.ServiceModel.MessageContractAttribute(WrapperName="getPage1", WrapperNamespace="http://soap.rpc.confluence.atlassian.com", IsWrapped=true)]
      public partial class getPageRequest1
      {

      [System.ServiceModel.MessageBodyMemberAttribute(Namespace="", Order=0)]
      public string in0;

      [System.ServiceModel.MessageBodyMemberAttribute(Namespace="", Order=1)]
      public long in1;

      public getPageRequest1()
      {
      }

      public getPageRequest1(string in0, long in1)

      { this.in0 = in0; this.in1 = in1; }

      }

      [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
      public partial class ConfluenceSoapServiceClient : System.ServiceModel.ClientBase<ConfluenceInterop.ConfluenceSoapService>, ConfluenceInterop.ConfluenceSoapService
      {
      [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
      ConfluenceInterop.getPageResponse ConfluenceInterop.ConfluenceSoapService.getPage(ConfluenceInterop.getPageRequest request)

      { return base.Channel.getPage(request); }

      public ConfluenceInterop.RemotePage getPage(string in0, string in1, string in2)

      { ConfluenceInterop.getPageRequest inValue = new ConfluenceInterop.getPageRequest(); inValue.in0 = in0; inValue.in1 = in1; inValue.in2 = in2; ConfluenceInterop.getPageResponse retVal = ((ConfluenceInterop.ConfluenceSoapService)(this)).getPage(inValue); return retVal.getPageReturn; }

      [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
      ConfluenceInterop.getPageResponse1 ConfluenceInterop.ConfluenceSoapService.getPage1(ConfluenceInterop.getPageRequest1 request)

      { return base.Channel.getPage1(request); }

      public ConfluenceInterop.RemotePage getPage1(string in0, long in1)

      { ConfluenceInterop.getPageRequest1 inValue = new ConfluenceInterop.getPageRequest1(); inValue.in0 = in0; inValue.in1 = in1; ConfluenceInterop.getPageResponse1 retVal = ((ConfluenceInterop.ConfluenceSoapService)(this)).getPage1(inValue); return retVal.getPageReturn; }

      }

      Attachments

        Issue Links

          Activity

            People

              barconati BillA
              0ce0564d52d9 Sergei Dorogin
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: