Return-Path: Delivered-To: apmail-ws-axis-c-dev-archive@www.apache.org Received: (qmail 36819 invoked from network); 11 Jan 2005 00:04:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 11 Jan 2005 00:04:03 -0000 Received: (qmail 46742 invoked by uid 500); 11 Jan 2005 00:04:03 -0000 Delivered-To: apmail-ws-axis-c-dev-archive@ws.apache.org Received: (qmail 46717 invoked by uid 500); 11 Jan 2005 00:04:03 -0000 Mailing-List: contact axis-c-dev-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: List-Id: "Apache AXIS C Developers List" Reply-To: "Apache AXIS C Developers List" Delivered-To: mailing list axis-c-dev@ws.apache.org Received: (qmail 46701 invoked by uid 99); 11 Jan 2005 00:04:02 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from host95.edocs.com (HELO exchangehq1.edocs.com) (63.114.227.95) by apache.org (qpsmtpd/0.28) with ESMTP; Mon, 10 Jan 2005 16:04:02 -0800 Received: from exchangehq2.edocs.com ([172.25.100.123]) by exchangehq1.edocs.com with Microsoft SMTPSVC(5.0.2195.6713); Mon, 10 Jan 2005 19:03:55 -0500 X-MimeOLE: Produced By Microsoft Exchange V6.5.6944.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: Platform specific class Date: Mon, 10 Jan 2005 19:03:55 -0500 Message-ID: <361C4FBE90826D4C9295CD845EFB6F7E65561C@exchangehq2.edocs.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Platform specific class Thread-Index: AcT0NDfruwVZbKnaTj+ofr5B5jC9eQDNGBcA From: "Lilantha Darshana" To: "Apache AXIS C Developers List" X-OriginalArrivalTime: 11 Jan 2005 00:03:55.0549 (UTC) FILETIME=[0AA9ECD0:01C4F771] X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Let me make myself clear on what I said. We can have the suggested bridge pattern to make axis transparent from = platform=20 specific functions. i.e decouple an abstraction from its real = implementation. This would make things more manageable esp. when OS/HW or environment = (runtime lib etc) changes. Better option is to have layered architecture (PAL) and grow up = from it. This is not a short term answer, but is a long term solution. One question will crops up when we convert platform support to classes = as pointed by Nadir is: when we create C stubs if C stubs need these functions what = shall we do? My question is, can the generated C stubs be compiled by just using a C = compiler (none C++) and link it with axis libs? If not, my general assumption is: creating C = stubs does not=20 make much sense to me, if you do not have strong arguments of supporting = C stubs.=20 May be I have not heard of your perspectives on that(we can discuss)=20 We can create C++ stubs and call any external APIs from it - this = external API could=20 have been written by any language not just C. Often, with webservices we = would rather=20 require to call/access to external code written in different legacy = languages, eg. COBOL.=20 So, how you would suggest to call a service written in any other = language than C?=20 Therefore, my understanding is, if we additionally support C services = that=20 does not solve all requirements what ppl try to resolve by using = webservices these days. APR is just one of the good option if we need some OS/HW dependent = functions and make it transparent to axis when we impl. above design. So APR can be used to = impl. some=20 of the common functions in the base class. However, this is not = mandatory to go in to=20 any particular axis release, rather, is a thought whether we have any = complications=20 on using it. I'm afraid whether I could make much comment about APR = running on OS/400.=20 You IBM forks must know about it more than I do. Although, I have seen = that IBM provides APR with HTTP server for IBM iSeries server. So my assumption is at = least 90% is compatible. Functions like:=20 #define PLATFORM_STRTOASC( x ) ( x ) #define PLATFORM_ASCTOSTR( x ) ( x ) is required because we deal with ASCII/EBCDIC rather than with real = Unicode char sets So my strong suggestion is we need moving to use Unicode (with w_char) = in place of bytes (char), esp. in the Axis lib - In stubs we might want to support by giving some functions to convert back and forth - or make call to a platform = abstraction layer that=20 we try to introduce here to make this conversion. Thoughts please?? regards -Lilantha -----Original Message----- From: Nadir Amra [mailto:amra@us.ibm.com] Sent: Thursday, January 06, 2005 4:11 PM To: Apache AXIS C Developers List Subject: RE: Platform specific class Two things. First, the use of APR should be delayed until 1.6 or beyond because we=20 have too many things we need to get done for 1.5, at least from my=20 perspective. Major hurdle is I want to overcome is making code locale=20 sensitive. Adding APR to the mix would be too much to handle. Second, I do not think we can get rid of the platform header files that=20 includes defines and typedefs, etc. As far as making a platform class=20 with methods to say load library, get locale, etc...my only concern is = if=20 C code needed to access any platform-specific APIs. I know the AXIS=20 engine is purely C++, and if we can guarantee that C stubs do not need=20 access, then I would say yes going to the class implementation, although = I=20 am not sure it would not be overkill. I do not mind in 1.5 changing macros to functions if you feel it is=20 necessary. For example: In PlatformAutoSense.hpp, the APIs the platforms would need to implement = would be listed: extern "C" platform_loadlibray( ...) . . extern "C" platform_unloadlibrary(...) And the implementation of the code would be in the separate files for = each=20 platform, for example, \axis\axis-c\src\platforms\os400\PlatformSpecificOS400.cpp \axis\axis-c\src\platforms\aix\PlatformSpecificAIX.cpp . . . and in the ANT build, we can choose what platform cpp file to include=20 based on platform. In addition, this could be a separate DLL so that we do not have to=20 include in all DLLs used. Or, we can revisit this in a future release :-) and leave as-is. There = is not that much in the files at this point in time. John Hawkins =20 01/06/2005 04:58 AM Please respond to "Apache AXIS C Developers List" To "Apache AXIS C Developers List" cc Subject RE: Platform specific class Hi Lilantha, Good point - I'd forgotten about that project ! Yes, the library routines there are exactly what we are talking about = here e.g. they have a getErrorMessage equivelant and most of the other=20 functions that we have defined in our platform objects now. I can't see the equivelant of our -> #define PLATFORM_STRTOASC( x ) ( x ) #define PLATFORM_ASCTOSTR( x ) ( x ) in it but I might have missed it. If we were to use this library. We might still need some level of "Platform" object because our platform stuff has filenames in it (but = this is minor and is more architecture dependent than OS dependent between = Win and non-windows) and it might even be solved I perhaaps just didn't see=20 the routine in the APR ? I'm worried about using APR because it's quite big and they say they = have compiled it on windows and Unix. This may have ramifications for us as = we support OS400 - Nadir - thoughts please? It would be a big move to use APR and it might be better to do it slowly = - if at all depending on the OS400 issue. If OS400 has issues with APR (or indeed other architectures/platforms) then we could have a compromise = (not a great one but a way forward) of moving to the platform model as previously described but making the base class use APR. That way any functions we had issues with or architectures/platforms that could not = be supported using APR could overwrite the methods. It's not great because it means that for every APR function that does = not work on all platforms we have to wrapper. Thoughts please folks? John Hawkins =20 "Lilantha=20 Darshana"=20 "Apache AXIS C Developers List"=20 =20 05/01/2005 15:08 = cc=20 =20 = Subject=20 Please respond to RE: Platform specific class=20 "Apache AXIS C=20 Developers List"=20 =20 =20 =20 =20 +1 for a Bridge pattern to support. PAL - Platform Abstraction Layer. Can we think of using APR (http://apr.apache.org/) for some of impl. ? regards -Lilantha -----Original Message----- From: John Hawkins [mailto:HAWKINSJ@uk.ibm.com] Sent: Wednesday, January 05, 2005 6:38 AM To: Apache AXIS C Developers List Subject: Re: Platform specific class I was thinking of something like the following: (See attached file: Platform hierarchy.jpeg) As you can see the IPlatform interface has base implementations for = macros and pure virtual methods only. This makes it really clear what the platforms have to implement (with appropriate documentation at this=20 level). The architecture layer (Windows, Unix etc.) then has platform specific implementations of the methods and any overriding of the macros that may = be necessary. The platform specific layer (WINNT, AIX, HP_UX etc.) then has any more specific overrides that may be necessary over and above the architecture layer. The Platform factory is the key class it is set out something like this (Pseudo) -> class Platform { static IPlatform platform; #ifdef WIN32 platform =3D Win32Platform #endif /** * * returns the specific instance of Platform */ static IPlatform getplatform(); } Thoughts folks? John Hawkins Nadir Amra = To 04/01/2005 18:44 "Apache AXIS C Developers List" = cc Please respond to "Apache AXIS C = Subject Developers List" Re: Transport specific class I agree, and was thinking of doing that....although do we want a PlatformServices class or just individual APIs? Nadir K. Amra e-Business Technologies - IBM eServer i5/OS IBM Rochester, MN, (Tel. 507-253-0645, t/l 553-0645) Internet: amra@us.ibm.com John Hawkins 01/04/2005 12:40 PM Please respond to "Apache AXIS C Developers List" To axis-c-dev@ws.apache.org cc Subject Transport specific class Hi Folks, I've just been putting some error information into transport and = realised a few things. (I'm going to start another thread re other issue.) I just implemented a "getErrorMessage" piece of code which should have gone into the platform specifics but it was quite chunky and did not sit = easily with being a macro. The Platform specific files are not classes - this surprised me - would = it be better to have a platform interface that the specific classes = overrode with their implementation? I understand that the macros are probably = fine for most things but if we had a platform class it would be more explicit what each method had to achieve. These methods could also return values more explicitly? John Hawkins