Looks like you renamed pageId to commentOwnerId in RemoteCommand.java which breaks compatibility for clients. I think all you needed to do was leave the field name the same and add the new accessor functions with the better terminology. Please revert this change for 4.1.1! Also, no where is there a mention in JIRA or elsewhere that this change took place!

      Specifically:

      1. If using a client based on < 4.1 wsdl against Confluence 4.1 you get
        org.xml.sax.SAXException: Invalid element in org.swift.common.soap.confluence.RemoteComment - commentOwnerId
        
      2. If using a client based on 4.1 wsdl against a Confluence < 4.1 you get
        Remote error: org.xml.sax.SAXException: Invalid element in com.atlassian.confluence.rpc.soap.beans.RemoteComment - commentOwnerId
        

            [CONFSERVER-24194] SOAP incompatibility introduced in 4.1 - addComment

            Bob Swift added a comment -

            Sounds good, thanks .

            Bob Swift added a comment - Sounds good, thanks .

            Hi Bob,

            You make a fair point. We agree this would be better for the community if this breaking API change was reverted. Further, we noticed that the corresponding change of pageId -> commentOwnerId was not made for our RPC API so this would make sense for the sake of consistency.

            This revert is estimated to ship with Confluence 4.1.3 (as Confluence 4.1.2 just went out the door). We ask for your patience in the mean time.

            Cheers,
            Dave

            dave (Inactive) added a comment - Hi Bob, You make a fair point. We agree this would be better for the community if this breaking API change was reverted. Further, we noticed that the corresponding change of pageId -> commentOwnerId was not made for our RPC API so this would make sense for the sake of consistency. This revert is estimated to ship with Confluence 4.1.3 (as Confluence 4.1.2 just went out the door). We ask for your patience in the mean time. Cheers, Dave

            Bob Swift added a comment - - edited

            Hmmm... you are more of an expert on the internals than I am. However, I have always used Confluence (and JIRA for that matter) wsdl without modification and it has always worked across multiple releases with the obvious exceptions of new capabilities. For instance 4.0 wsdl against 3.x releases (3.1 - 3.5) and 4.0 introduced significant changes. So, I don't understand how that has worked over the last 6 years without running into this issue . I suppose I don't know for sure though that any new fields/getters/setters were added either. Perhaps there were no fields addedMy other question would be then is why not revert the whole change and leave it totally compatible with previous release? The change added no new capability and I thought SOAP API improvements were minimal at this point (not that I agree with that mind you). I can certainly look into fudging the wsdl too.

            Bob Swift added a comment - - edited Hmmm... you are more of an expert on the internals than I am. However, I have always used Confluence (and JIRA for that matter) wsdl without modification and it has always worked across multiple releases with the obvious exceptions of new capabilities. For instance 4.0 wsdl against 3.x releases (3.1 - 3.5) and 4.0 introduced significant changes. So, I don't understand how that has worked over the last 6 years without running into this issue . I suppose I don't know for sure though that any new fields/getters/setters were added either. Perhaps there were no fields addedMy other question would be then is why not revert the whole change and leave it totally compatible with previous release? The change added no new capability and I thought SOAP API improvements were minimal at this point (not that I agree with that mind you). I can certainly look into fudging the wsdl too.

            No. The problem is not with the renaming of the field. Introducing the accessors getCommentOwnerId() and setCommentOwnerId() is sufficient to cause the problem. This is because Introspector.getBeanInfo(RemoteComment.class) will acknowledge "commentOwnerId" as a property. As such this property will get written out to the SOAP complex type and appear in the WSDL.

            If you want to use the remote beans in the com.atlassian.confluence.rpc.soap package in your client, you must be using the WSDL for the same version of Confluence.

            If you want your confluence-CLI client to work with an older version of Confluence with an old WSDL, then you will need to introduce your own beans that are compatible with the WSDL of the version you communicating with. I noticed you have already have some generated beans in the package org.swift.common.soap.confluence).

            dave (Inactive) added a comment - No. The problem is not with the renaming of the field. Introducing the accessors getCommentOwnerId() and setCommentOwnerId() is sufficient to cause the problem. This is because Introspector.getBeanInfo(RemoteComment.class) will acknowledge "commentOwnerId" as a property. As such this property will get written out to the SOAP complex type and appear in the WSDL. If you want to use the remote beans in the com.atlassian.confluence.rpc.soap package in your client, you must be using the WSDL for the same version of Confluence. If you want your confluence-CLI client to work with an older version of Confluence with an old WSDL, then you will need to introduce your own beans that are compatible with the WSDL of the version you communicating with. I noticed you have already have some generated beans in the package org.swift.common.soap.confluence).

            Bob Swift added a comment -

            Dave, the code is at https://bitbucket.org/bob_swift/confluence-cli. The specific location is 1255. The problem isn't with using pageId, the problem is the compatibility in using it with client/server being at different levels with the respective errors. There was no need to change the underlying name which i think is the heart of the problem. Just adding the new methods would have served the same purpose without breaking this use case.

            Bob Swift added a comment - Dave, the code is at https://bitbucket.org/bob_swift/confluence-cli . The specific location is 1255 . The problem isn't with using pageId, the problem is the compatibility in using it with client/server being at different levels with the respective errors. There was no need to change the underlying name which i think is the heart of the problem. Just adding the new methods would have served the same purpose without breaking this use case.

            Bob,

            If you want backwards compatibility, why not just continue using "pageId"?

            Extract from the 4.1 WSDL:

               <complexType name="RemoteComment">
                <sequence>
                 <element name="commentOwnerId" type="xsd:long"/>
                 <element name="content" nillable="true" type="xsd:string"/>
                 <element name="created" nillable="true" type="xsd:dateTime"/>
                 <element name="creator" nillable="true" type="xsd:string"/>
                 <element name="id" type="xsd:long"/>
                 <element name="modified" nillable="true" type="xsd:dateTime"/>
                 <element name="modifier" nillable="true" type="xsd:string"/>
                 <element name="pageId" type="xsd:long"/>
                 <element name="parentId" type="xsd:long"/>
                 <element name="title" nillable="true" type="xsd:string"/>
                 <element name="url" nillable="true" type="xsd:string"/>
                </sequence>
               </complexType>
            

            "pageId" is very much still there. We did rename the field in RemoteComment, but the accessors for getPageId() and setPageId() are very much there (just deprecated).

            Failing this, can you please provide the actual code containing the soap request and a fuller stack trace.

            dave (Inactive) added a comment - Bob, If you want backwards compatibility, why not just continue using "pageId"? Extract from the 4.1 WSDL: <complexType name= "RemoteComment" > <sequence> <element name= "commentOwnerId" type= "xsd: long " /> <element name= "content" nillable= " true " type= "xsd:string" /> <element name= "created" nillable= " true " type= "xsd:dateTime" /> <element name= "creator" nillable= " true " type= "xsd:string" /> <element name= "id" type= "xsd: long " /> <element name= "modified" nillable= " true " type= "xsd:dateTime" /> <element name= "modifier" nillable= " true " type= "xsd:string" /> <element name= "pageId" type= "xsd: long " /> <element name= "parentId" type= "xsd: long " /> <element name= "title" nillable= " true " type= "xsd:string" /> <element name= "url" nillable= " true " type= "xsd:string" /> </sequence> </complexType> "pageId" is very much still there. We did rename the field in RemoteComment, but the accessors for getPageId() and setPageId() are very much there (just deprecated). Failing this, can you please provide the actual code containing the soap request and a fuller stack trace.

            Bob Swift added a comment -

            No, Confluence CLI is based on SOAP.

            Bob Swift added a comment - No, Confluence CLI is based on SOAP.

            Hi Bob,

            Are you able to use the RPC (non soap) version of the call instead?

            Vincent Choy (Inactive) added a comment - Hi Bob, Are you able to use the RPC (non soap) version of the call instead?

              dave@atlassian.com dave (Inactive)
              bob.swift@charter.net Bob Swift
              Affected customers:
              0 This affects my team
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: