Return-Path: Delivered-To: apmail-ws-axis-c-user-archive@www.apache.org Received: (qmail 61320 invoked from network); 22 Nov 2007 17:03:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 22 Nov 2007 17:03:35 -0000 Received: (qmail 82297 invoked by uid 500); 22 Nov 2007 17:03:21 -0000 Delivered-To: apmail-ws-axis-c-user-archive@ws.apache.org Received: (qmail 82285 invoked by uid 500); 22 Nov 2007 17:03:21 -0000 Mailing-List: contact axis-c-user-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: "Apache AXIS C User List" Reply-To: "Apache AXIS C User List" Delivered-To: mailing list axis-c-user@ws.apache.org Received: (qmail 82274 invoked by uid 99); 22 Nov 2007 17:03:21 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Nov 2007 09:03:21 -0800 X-ASF-Spam-Status: No, hits=-2.0 required=10.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [145.253.137.13] (HELO wic-zau-22.dbv-winterthur.de) (145.253.137.13) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Nov 2007 17:03:23 +0000 Received: from wic-zau-22.dbv-winterthur.de (localhost [127.0.0.1]) by localhost.dbv-winterthur.de (Postfix) with ESMTP id 2236247D1; Thu, 22 Nov 2007 18:12:21 +0100 (CET) X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C82D29.8921BC94" Subject: Long names and sharable images ... dll's Date: Thu, 22 Nov 2007 18:02:59 +0100 Message-ID: <55369AF6DCB7F84E82B389410504C3F104AFF8A3@WIC-CHMN-02.chres1.doleni.net> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Long names and sharable images ... dll's Thread-Index: AcgtKYjn7wa3mGtEQOSVq0m6XIsCbA== From: "Stadelmann Josef" To: "Apache AXIS C User List (E-Mail)" Cc: "Meg Watson (E-Mail)" , "Powell Hazzard (E-Mail)" , "Phil Hunt (E-Mail)" X-OriginalArrivalTime: 22 Nov 2007 17:03:00.0628 (UTC) FILETIME=[89A54D40:01C82D29] X-Virus-Checked: Checked by ClamAV on apache.org ------_=_NextPart_001_01C82D29.8921BC94 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi all, I run into the following problem and would like to know your good = approch. I have managed and built the apache axis2/c webservice engine and all = arround it on OpenVMS However I run into the following problem when the server populates its = conf_ctx . File-name-length and lengt of function names and procedure names are the = cause. Together the two should never be more then what OpenVMS old DECC = compiler allowes without the /name=3Dshorten switch (31 chars) why. as all works nice for static linking, the trouble starts when one has a = sharable images with a symbol vector based on a analysis of object = files. names are in this case cryptic I give you the example here AXP1>pipe ana/image [-.deploy.lib]axis2_http_sender.exe | search = sys$input "symbol:" symbol: ".$$ABS$$." symbol: "AXIS2_HTTP_TRANSPORT_SE300LI1H$" symbol: "AXIS2_HTTP_TRANSPORT_SE185ELDT$" symbol: "AXIS2_HTTP_TRANSPORT_SE1MJIDMO$" symbol: "AXIS2_HTTP_TRANSPORT_SE319PT59$" symbol: "AXIS2_HTTP_TRANSPORT_SE3J664R4$" symbol: "AXIS2_HTTP_TRANSPORT_SE328OQAQ$" symbol: "AXIS2_HTTP_TRANSPORT_SE241Q8CN$" symbol: "AXIS2_HTTP_TRANSPORT_SE04VT8SN$" symbol: "AXIS2_HTTP_SENDER_CREATE" symbol: "AXIS2_HTTP_SENDER_GET_P12FME5A$" symbol: "AXIS2_HTTP_SENDER_GET_T04IVVRJ$" symbol: "AXIS2_HTTP_SENDER_PROCE15NNCDV$" symbol: "AXIS2_HTTP_SENDER_GET_H0P3EPDO$" symbol: "AXIS2_HTTP_SENDER_FREE" symbol: "AXIS2_HTTP_SENDER_SET_H0U4U5JE$" symbol: "AXIS2_HTTP_SENDER_SET_OM_OUTPUT" symbol: "AXIS2_HTTP_SENDER_SET_CHUNKED" symbol: "AXIS2_HTTP_SENDER_UTIL_2HCJ96K$" symbol: "AXIS2_HTTP_SENDER_SEND" symbol: "AXIS2_HTTP_CLIENT_FREE_VOID_ARG" symbol: "AXIS2_HTTP_CLIENT_CREATE" symbol: "AXIS2_HTTP_CLIENT_FREE" symbol: "AXIS2_HTTP_CLIENT_GET_KEY_FILE" symbol: "AXIS2_HTTP_CLIENT_SET_KEY_FILE" symbol: "AXIS2_HTTP_CLIENT_GET_S2M8KNFD$" symbol: "AXIS2_HTTP_CLIENT_SET_S1H999U1$" symbol: "AXIS2_HTTP_CLIENT_SET_D02SRHTO$" symbol: "AXIS2_HTTP_CLIENT_CONNE3HJ4AKO$" symbol: "AXIS2_HTTP_CLIENT_GET_PROXY" symbol: "AXIS2_HTTP_CLIENT_SET_PROXY" symbol: "AXIS2_HTTP_CLIENT_GET_TIMEOUT" symbol: "AXIS2_HTTP_CLIENT_SET_TIMEOUT" symbol: "AXIS2_HTTP_CLIENT_GET_URL" symbol: "AXIS2_HTTP_CLIENT_SET_URL" symbol: "AXIS2_HTTP_CLIENT_GET_RESPONSE" symbol: "AXIS2_HTTP_CLIENT_RECIE1MRKQ8Q$" symbol: "AXIS2_HTTP_CLIENT_SEND" AXP1> What you see are all the symbolic names mangeled by compiler when the = /NAME switch is in use.=20 They are a construct of the object file name such as http_client.obj, = http_sender.obj and http_transport_sender.obj=20 used as prefix for the symbolic name to avoid name clashes among files, = wel done, and then followed by the often very=20 long function name i.e. "axis2_remove_instance()" as used with our = axis2_http_sender.exe=20 which is a DLL in OpenVMS called a shareable image. And we are going to write web services which will all become sharable = images !!!! To load a DLL in OpenVMS I use dlopen() and to get the procedure address = I use dlsym().=20 as dlopen() works and returns a handel to the DLL's name, keept for use = by dlsym(),=20 dlsym() falls flat as the axis2.log for the axis2_http_server NOW shows. = [Thu Nov 22 16:06:50 2007] [debug] = DSA5:[webservices.axis2.trunk.c.src.core.deployment]conf_builder.c;4(220)= no custom dispa? [Thu Nov 22 16:07:54 2007] [debug] = DSA5:[webservices.axis2.trunk.c.src.core.deployment]conf_builder.c;4(672)= dam_transport_n? [Thu Nov 22 16:09:46 2007] [debug] = DSA5:[webservices.axis2.trunk.c.util.src]class_loader.c;10(101) = IB-E-KEYNOTFOU, key not found The error gets NOT reported in ordinary axis2/C implementations, because = there is a bug.=20 But after I've found it, I have enhanced the code of the class_loader.c = as follow using dlerro() to return the status of dlsym(). #if !defined ( VMS ) create_funct =3D (CREATE_FUNCT) = AXIS2_PLATFORM_GETPROCADDR(dl_handler, AXIS2_CREATE_FUNCTION); if (!create_funct) { return NULL; // +++> returning here without a debug log = entry is an error!=20 // +++> given the case that dlsym() can not locate the function for = what ever reason i.e. my case } #else create_funct =3D (CREATE_FUNCT) = dlsym(dl_handler,"axis2_get_instance"); if (!create_funct) { // lets at least log the bug and then return - // how gets the bug one of the true causes logged below in = code // if we return here with 0 to our caller // this bug was costly AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, dlerror()); // +++> = now the error gets logged at least return NULL; } #endif Any hint very wellcome!=20 object file name of any loadable component including function/procedure = names should never be more then 31 characters. How is that with axis2/C On Open VMS=20 AXP> HELP / NAME shows us CC /NAMES /NAMES=3D(option1,option2) /NAMES=3D(UPPERCASE,TRUNCATED) (D) Option1 converts all definitions and references of external symbols and psects to the specified case: o /NAMES=3DUPPERCASE (default) converts to uppercase. o /NAMES=3DAS_IS leaves the case unchanged. Option2 controls whether or not long external names greater than 31 characters get truncated or shortened: o /NAMES=3DTRUNCATED (default) truncates long external names o /NAMES=3DSHORTENED shortens long external names. A shortened name consists of the first 23 characters of the name followed by a 7-character Cyclic Redundancy Check (CRC) computed by looking at the full name, and then a "$". The CRC is generated by calling lib$crc as follows: long initial_crc =3D -1; crc_result =3D lib$crc(good_crc_table, &initial_crc, ); where good_crc_table is: /* ** Default CRC table: ** ** This table was taken from Ada's generalized name generation ** algorithm. It represents a commonly used CRC polynomial ** known as AUTODIN-II. For more information see the VAX ** Macro OpenVMS documentation under the CRC VAX instruction. */ static const unsigned int good_crc_table[16] =3D {0x00000000, 0x1DB71064, 0x3B6E20C8, 0x26D930AC, 0x76DC4190, 0x6B6B51F4, 0x4DB26158, 0x5005713C, 0xEDB88320, 0xF00F9344, 0xD6D6A3E8, 0xCB61B38C, 0x9B64C2B0, 0x86D3D2D4, 0xA00AE278, 0xBDBDF21C}; By default, the compiler issues a warning and truncates the name to 31 characters. The /NAMES qualifier does not affect the names of the $ABS$, $BSS$, $CODE$, $DATA$, $LINK$, $LITERAL$, and $READONLY$ psects. Topic? Any hint wellcome. Is this my show-stopper for OpenVMS? Regards Josef.Stadelmann @axa-winterthur.ch ------_=_NextPart_001_01C82D29.8921BC94 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Long names and sharable images ... dll's

Hi all,

I run into the following problem = and would like to know your good approch.

I have managed and built the = apache axis2/c webservice engine and all arround it on OpenVMS

However I run into the following = problem when the server populates its conf_ctx .

File-name-length and lengt of = function names and procedure names are the cause.
Together the two should never be = more then what OpenVMS old DECC compiler allowes without the = /name=3Dshorten switch (31 chars)

why.

as all works nice for static = linking, the trouble starts when one has a sharable images with a symbol = vector based on a analysis of object files.

names are in this case cryptic I = give you the example here


AXP1>pipe ana/image = [-.deploy.lib]axis2_http_sender.exe | search sys$input = "symbol:"
         = ;       symbol: = ".$$ABS$$."
         = ;       symbol: = "AXIS2_HTTP_TRANSPORT_SE300LI1H$"
         = ;       symbol: = "AXIS2_HTTP_TRANSPORT_SE185ELDT$"
         = ;       symbol: = "AXIS2_HTTP_TRANSPORT_SE1MJIDMO$"
         = ;       symbol: = "AXIS2_HTTP_TRANSPORT_SE319PT59$"
         = ;       symbol: = "AXIS2_HTTP_TRANSPORT_SE3J664R4$"
         = ;       symbol: = "AXIS2_HTTP_TRANSPORT_SE328OQAQ$"
         = ;       symbol: = "AXIS2_HTTP_TRANSPORT_SE241Q8CN$"
         = ;       symbol: = "AXIS2_HTTP_TRANSPORT_SE04VT8SN$"
         = ;       symbol: = "AXIS2_HTTP_SENDER_CREATE"
         = ;       symbol: = "AXIS2_HTTP_SENDER_GET_P12FME5A$"
         = ;       symbol: = "AXIS2_HTTP_SENDER_GET_T04IVVRJ$"
         = ;       symbol: = "AXIS2_HTTP_SENDER_PROCE15NNCDV$"
         = ;       symbol: = "AXIS2_HTTP_SENDER_GET_H0P3EPDO$"
         = ;       symbol: = "AXIS2_HTTP_SENDER_FREE"
         = ;       symbol: = "AXIS2_HTTP_SENDER_SET_H0U4U5JE$"
         = ;       symbol: = "AXIS2_HTTP_SENDER_SET_OM_OUTPUT"
         = ;       symbol: = "AXIS2_HTTP_SENDER_SET_CHUNKED"
         = ;       symbol: = "AXIS2_HTTP_SENDER_UTIL_2HCJ96K$"
         = ;       symbol: = "AXIS2_HTTP_SENDER_SEND"
         = ;       symbol: = "AXIS2_HTTP_CLIENT_FREE_VOID_ARG"
         = ;       symbol: = "AXIS2_HTTP_CLIENT_CREATE"
         = ;       symbol: = "AXIS2_HTTP_CLIENT_FREE"
         = ;       symbol: = "AXIS2_HTTP_CLIENT_GET_KEY_FILE"
         = ;       symbol: = "AXIS2_HTTP_CLIENT_SET_KEY_FILE"
         = ;       symbol: = "AXIS2_HTTP_CLIENT_GET_S2M8KNFD$"
         = ;       symbol: = "AXIS2_HTTP_CLIENT_SET_S1H999U1$"
         = ;       symbol: = "AXIS2_HTTP_CLIENT_SET_D02SRHTO$"
         = ;       symbol: = "AXIS2_HTTP_CLIENT_CONNE3HJ4AKO$"
         = ;       symbol: = "AXIS2_HTTP_CLIENT_GET_PROXY"
         = ;       symbol: = "AXIS2_HTTP_CLIENT_SET_PROXY"
         = ;       symbol: = "AXIS2_HTTP_CLIENT_GET_TIMEOUT"
         = ;       symbol: = "AXIS2_HTTP_CLIENT_SET_TIMEOUT"
         = ;       symbol: = "AXIS2_HTTP_CLIENT_GET_URL"
         = ;       symbol: = "AXIS2_HTTP_CLIENT_SET_URL"
         = ;       symbol: = "AXIS2_HTTP_CLIENT_GET_RESPONSE"
         = ;       symbol: = "AXIS2_HTTP_CLIENT_RECIE1MRKQ8Q$"
         = ;       symbol: = "AXIS2_HTTP_CLIENT_SEND"
AXP1>

What you see are all the symbolic = names mangeled by compiler when the /NAME switch is in use.

They are a construct of the object = file name such as http_client.obj, http_sender.obj and = http_transport_sender.obj
used as prefix for the symbolic = name to avoid name clashes among files, wel done, and then followed by = the often very
long function name i.e. = "axis2_remove_instance()" as used with = our axis2_http_sender.exe
which is a = DLL in OpenVMS called a shareable image.

And we are = going to write web services which will all become sharable images = !!!!

To load a = DLL in OpenVMS I use dlopen() and to get the procedure address I use = dlsym().
as dlopen() = works and returns a handel to the DLL's name, keept for use by dlsym(), =
dlsym() = falls flat as the axis2.log for the axis2_http_server NOW shows. =

[Thu Nov 22 = 16:06:50 2007] [debug] = DSA5:[webservices.axis2.trunk.c.src.core.deployment]conf_builder.c;4(220)= no custom dispa♦

[Thu Nov 22 = 16:07:54 2007] [debug] = DSA5:[webservices.axis2.trunk.c.src.core.deployment]conf_builder.c;4(672)= dam_transport_n♦

[Thu Nov 22 = 16:09:46 2007] [debug] = DSA5:[webservices.axis2.trunk.c.util.src]class_loader.c;10(101) = IB-E-KEYNOTFOU, key not found

The error = gets NOT reported in ordinary axis2/C implementations, because there is = a bug.
But after = I've found it, I have enhanced the code of the class_loader.c as follow = using dlerro() to return the status of dlsym().


#if !defined = ( VMS )
        create_funct =3D = (CREATE_FUNCT) AXIS2_PLATFORM_GETPROCADDR(dl_handler,
           &n= bsp;    AXIS2_CREATE_FUNCTION);
        if = (!create_funct)
        {
            = return NULL;        // +++> = returning here without a debug log entry is an error!
        =         =         =         =         // +++> given the case that dlsym() can not = locate the function for what ever reason i.e. my case

        }
#else
        create_funct =3D = (CREATE_FUNCT) = dlsym(dl_handler,"axis2_get_instance");
        if = (!create_funct)
        {
            = // lets at least log the bug and then return -
            = // how gets the bug one of the true causes logged below in = code
            = // if we return here with 0 to our caller
            = // this bug was costly
            = AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, dlerror()); =         // +++> now the error gets = logged at least
            = return NULL;
        }
#endif


Any hint = very wellcome!

object file = name of any loadable component including function/procedure names should = never be more then 31 characters.

How is that = with axis2/C

On Open VMS =

AXP> HELP = / NAME  shows us

CC

  = /NAMES

        = /NAMES=3D(option1,option2)
        = /NAMES=3D(UPPERCASE,TRUNCATED) (D)

     Option1 converts all = definitions and references of external symbols
     and psects to the specified = case:

      o  = /NAMES=3DUPPERCASE (default) converts to uppercase.

      o  = /NAMES=3DAS_IS leaves the case unchanged.

     Option2 controls whether or = not long external names greater than 31
     characters get truncated or = shortened:

      o  = /NAMES=3DTRUNCATED (default) truncates long external names

      o  = /NAMES=3DSHORTENED shortens long external names.

         A = shortened name consists of the first 23 characters of the
         = name followed by a 7-character Cyclic Redundancy Check = (CRC)
         = computed by looking at the full name, and then a = "$".

         The = CRC is generated by calling lib$crc as follows:

         = long       initial_crc =3D = -1;
         = crc_result =3D lib$crc(good_crc_table,
         = ;            =          = &initial_crc,
         = ;            =          <descriptor of = string to CRC>);

         = where good_crc_table is:

         = /*
         ** = Default CRC table:
         = **
         = **  This table was taken from Ada's generalized name = generation
         = **  algorithm.  It represents a commonly used CRC = polynomial
         = **  known as AUTODIN-II.  For more information see the = VAX
         = **  Macro OpenVMS documentation under the CRC VAX = instruction.
         = */

         = ;    static const unsigned int good_crc_table[16] = =3D
         = ;            = {0x00000000, 0x1DB71064, 0x3B6E20C8, 0x26D930AC,
         = ;            =   0x76DC4190, 0x6B6B51F4, 0x4DB26158, 0x5005713C,
         = ;            =   0xEDB88320, 0xF00F9344, 0xD6D6A3E8, 0xCB61B38C,
         = ;            =   0x9B64C2B0, 0x86D3D2D4, 0xA00AE278, 0xBDBDF21C};

     By default, the compiler = issues a warning and truncates the name to
     31 = characters.

     The /NAMES qualifier does = not affect the names of the $ABS$, $BSS$,
     $CODE$, $DATA$, $LINK$, = $LITERAL$, and $READONLY$ psects.


Topic?


Any hint = wellcome. Is this my show-stopper for OpenVMS?
Regards
Josef.Stadelmann
@axa-winterthur.ch


------_=_NextPart_001_01C82D29.8921BC94--