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

The RPC Plugin includes a RemoteWorklogImpl type in the WSDL after returning from method that returns RemoteWorklog objects.

    XMLWordPrintable

Details

    Description

      The WSDL from the SOAP RPC plugin after a call to a method returning a RemoteWorkLog will include a RemoteWorklogImpl. This is an internal class that should not be exposed to SOAP.

      This problem should not cause any user visible problems, we are just exposing our implementation details as part of the WSDL which could make them harder to change later.

      I have been able to actually track down the cause of this issue. Basically, the RemoteWorklogImpl will not be seen until the first time a method with a RemoteWorklog is called. This is caused by a "feature" of Axis (our SOAP engine) in that it looks at the runtime type of the service result rather than its compile time type. For example:

      <?xml version="1.0" encoding="utf-8"?>
      
      <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
      	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      	<soapenv:Body>
      		<ns1:getWorklogsResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://soap.rpc.jira.atlassian.com">
      			<getWorklogsReturn soapenc:arrayType="ns2:RemoteWorklog[1]" xsi:type="soapenc:Array" xmlns:ns2="http://beans.soap.rpc.jira.atlassian.com" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
      				<getWorklogsReturn href="#id0"/>
      			</getWorklogsReturn>
      		</ns1:getWorklogsResponse>
      		<multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns3:RemoteWorklogImpl" 
      			xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns3="http://service.soap.rpc.jira.atlassian.com">
      			<author xsi:type="xsd:string">admin</author>
      			<comment xsi:type="xsd:string">This is a test</comment>
      			<created xsi:type="xsd:dateTime">2009-12-07T08:16:27.158Z</created>
      			<groupLevel xsi:type="xsd:string" xsi:nil="true"/>
      			<id xsi:type="xsd:string">10000</id>
      			<roleLevelId xsi:type="xsd:string" xsi:nil="true"/>
      			<startDate xsi:type="xsd:dateTime">2009-12-07T08:16:00.000Z</startDate>
      			<timeSpent xsi:type="xsd:string">3h</timeSpent>
      			<timeSpentInSeconds xsi:type="xsd:long">10800</timeSpentInSeconds>
      			<updateAuthor xsi:type="xsd:string">admin</updateAuthor>
      			<updated xsi:type="xsd:dateTime">2009-12-07T08:16:27.158Z</updated>
      		</multiRef>
      	</soapenv:Body>
      </soapenv:Envelope>
      

      Notice that even though the SOAP reply is a ns2:RemoteWorklog (the static interface type) AXIS actually sends back a subclass ns3:RemoteWorklogImpl (the actual runtime type). By doing this AXIS updates its internal structures such that the RemoteWorklogImpl now appears in the WSDL.

      This problem is related to JRA-13801. Tokes worked around the problem in JRA-13801 in a way that allowed .NET soap to work. I guess the complete solution would be to remove the RemoteWorklogImpl as we don't need it. We have to be careful with backwards compatibility.

      Attachments

        1. bad.wsdl
          244 kB
        2. good.wsdl
          245 kB

        Issue Links

          Activity

            People

              Unassigned Unassigned
              bbain bain
              Votes:
              3 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: