Uploaded image for project: 'Axis-C++'
  1. Axis-C++
  2. AXISCPP-328

Axis methods exported from user dlls

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 1.4 Final
    • None
    • Basic Architecture
    • None
    • Windows

    Description

      I am raising this JIRA based on a discussion on the mailing list (see below). This is a bug because the external header files that Axis C++ ships should not contain __declspec(dllexport) since that makes Axis methods exported from application dlls. In other words if a user creates an application that uses (and dynamically links to) Axis C++ and builds that application into a dll, Axis C++ methods will be exported from the application's dll, which may not be what the user wanted. The solution to this is to remove __declspec(dllexport) from the external header files and tell the compiler/linker to export Axis methods from the AxisClient.dll by some other internal mechanism.
      Discussion from the mailing list follows....

      I changed
      #define STORAGE_CLASS_INFO __declspec(dllexport) in GDefine.hpp to
      #define STORAGE_CLASS_INFO
      now only my functions are exported as expected. Is this an acceptable
      solution though?

      Vince.

      ----Original Message----
      From: Mark Whitlock mark_whitlock@uk.ibm.com
      Sent: Tuesday, December 14, 2004 12:47 PM
      To: axis-c-user@ws.apache.org
      Subject: Fw: dll exports

      Hi,
      Methods are exported from the AxisClient.dll by setting
      __declspec(dllexport) on the class definition (look in Call.hpp and
      GDefine.hpp). I guess you are creating your own dll which dynamically
      links
      to the AxisClient.dll. I'm surprised that the methods which are exported
      from the AxisClient.dll are also exported from your dll. I don't know
      the
      answer but you could try

      • making sure you are dynamically linking to the AxisClient.dll not
        statically linking to it
      • see if there is another __declspec override that will "switch off"
        exporting a method
      • remove the __declspec(dllexport) from the axis public header files
        that
        you include
        If this last suggestion works then it looks like a bug in Axis.
        Mark
        Mark Whitlock
        IBM

      ----- Forwarded by Mark Whitlock/UK/IBM on 14/12/2004 17:40 -----

      "Jairam,

      Roopnaraine"

      <Roopnaraine.Jair
      To
      am@ca.com> "Apache AXIS C User List"

      <axis-c-user@ws.apache.org>

      14/12/2004 15:18
      cc

      Subject
      Please respond to RE: dll exports

      "Apache AXIS C

      User List"

      Can anyone provide some insights...?

      From: Jairam, Roopnaraine
      Sent: Thursday, December 09, 2004 10:32 AM
      To: axis-c-user@ws.apache.org
      Subject: dll exports

      Hi:

      I'm trying to build a dll which calls my axis java webservice everything
      has built ok and I'm able to call the webservice, the only thing is that
      when I look at the dll it has other functions exported besides the one's
      that I made. My question is how can I make the other functions not
      exported.

      ??0AxisException@axiscpp@@QAE@ABV01@@Z

      ??0AxisException@axiscpp@@QAE@XZ

      ??0Call@axiscpp@@QAE@ABV01@@Z

      ??0CallBase@axiscpp@@QAE@ABV01@@Z

      ??0CallBase@axiscpp@@QAE@XZ

      ??0TestSystem@@QAE@PBDW4AXIS_PROTOCOL_TYPE@@@Z

      ??0TestSystem@@QAE@XZ

      ??0TestSystemService_AxisClientException@@QAE@H@Z

      ??0TestSystemService_AxisClientException@@QAE@PAVISoapFault@axiscpp@@@Z

      ??0TestSystemService_AxisClientException@@QAE@PAVexception@@@Z

      ??0TestSystemService_AxisClientException@@QAE@PAVexception@@H@Z

      ??0TestSystemService_AxisClientException@@QAE@V?$basic_string@DU?$char_t
      ra
      its@D@std@@V?$allocator@D@2@@std@@@Z

      ??0TestSystemService_AxisClientException@@QAE@XZ

      ??0Stub@axiscpp@@QAE@ABV01@@Z

      ??1AxisException@axiscpp@@UAE@XZ

      ??1TestSystemService_AxisClientException@@UAE@XZ

      ??4AnyType@axiscpp@@QAEAAV01@ABV01@@Z

      ??4AxisException@axiscpp@@QAEAAV01@ABV01@@Z

      ??4Call@axiscpp@@QAEAAV01@ABV01@@Z

      ??4CallBase@axiscpp@@QAEAAV01@ABV01@@Z

      ??4Stub@axiscpp@@QAEAAV01@ABV01@@Z

      ??4xsd__base64Binary@axiscpp@@QAEAAV01@ABV01@@Z

      ??4xsd__hexBinary@axiscpp@@QAEAAV01@ABV01@@Z

      ??_7AxisException@axiscpp@@6B@

      ??_7Call@axiscpp@@6B@

      ??_7CallBase@axiscpp@@6B@

      ??_7Stub@axiscpp@@6B@

      ?getExceptionCode@TestSystemService_AxisClientException@@UAE?BHXZ

      ?getFault@TestSystemService_AxisClientException@@QAEPBVISoapFault@axiscp
      p@
      @XZ

      ?getMessage@TestSystemService_AxisClientException@@QAE?BV?$basic_string@
      DU
      ?$char_traits@D@std@@V?$allocator@D@2@@std@@H@Z

      ?getMessage@TestSystemService_AxisClientException@@QAE?BV?$basic_string@
      DU
      ?$char_traits@D@std@@V?$allocator@D@2@@std@@PAVexception@@@Z

      ?getSOAPSerializer@Call@axiscpp@@QAEPAVSoapSerializer@2@XZ

      ?getTransport@Call@axiscpp@@QAEPAVSOAPTransport@2@XZ

      ?registerTest@TestSystem@@QAEPAVRegistrationResults@@PAVClientTableRecor
      d@
      @PAVKeyTableRecord@@@Z

      ?verifyTest@TestSystem@@QAEPAVVerificationResults@@PADHUKeyTableRecord_A
      rr
      ayTag@@@Z

      ?what@TestSystemService_AxisClientException@@UAEPBDXZ

      Thanks

      Vince.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              whitlock Mark Whitlock
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated: