Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-4020

wsdl2js generated javascript code has memory leak

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.4.3, 2.5.1
    • None
    • JavaScript Client
    • None
    • Windows 7 64-bit

    • Unknown

    Description

      I run wsdl2js.bat from cxf 2.4.3 against my wsdl and xsd, but I get a null pointer exception (https://issues.apache.org/jira/browse/CXF-3891). I was able to "fix" this so that the javascript client code was generated correctly and I was able to use it successfully. The application I'm writing uses polling and eventually I noticed a significant memory leak.

      I downloaded cxf 2.5.1 and ran that wsdl2js against my wsdl and xsd. It compiled correctly but caused errors when I tried to use it (https://issues.apache.org/jira/browse/CXF-4019). I compared the javascript client code generated from 2.4.3 and 2.5.1 and can see why the 2.5.1 client code is causing errors, but basically the two client versions were identical. Therefore, even though I can't run the 2.5.1 code I'm fairly certain the memory leak is still there.

      I also did not find the cxf-utils.js in the 2.5.1 distribution.

      I was able to fix this problem by replacing:
      this.client = new CxfApacheOrgClient(this.jsutils);
      with
      this.client = this.client==null ? new CxfApacheOrgClient(this.jsutils) : this.client;

      This fixed the memory leak but prevents me from calling two webservices at the same time.

      Attachments

        1. OnTrack.wsdl
          7 kB
          Joe Godleski
        2. OnTrack.xsd
          5 kB
          Joe Godleski

        Activity

          People

            Unassigned Unassigned
            ixeldog Joe Godleski
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: