Re: Statically linking Windows OpenSSL in HTTPSSLChannel
Hi Wayne, I think the library is listed as part of the dependent libraries parameter in the link options. When starting up AXIS, the library loader will attempt to load the dependent libraries. The HTTPSSLChannel DLL is dynamically loaded from within AXIS. The AXIS LoadLibrary function will use the usual Microsoft search criteria to look for dependent libraries using the contents of the PATH environment variable. If you have DB2 already up and running (using something like ODBC and SQL to connect to it), (hopefully on a different thread or process ;-)), then you should be able to change the environment path before running your client so that the correct OpenSSL library is found, loaded and run. As far as I know, there is no existing parameter that will statically link the OpenSSL libraries, but you can quite easily do this yourself by changing the link options. Both options should work. It really just depends on your preference. Regards, Fred Preston. Wayne Johnson <[EMAIL PROTECTED]> 27/04/2007 19:16 Please respond to "Apache AXIS C User List" To axis-c cc Subject Staticly linking Windows OpenSSL in HTTPSSLChannel We have an interesting problem. Our app uses both DB2 and Axis. DB2 automatically loads it's copy of OpenSSL's libeay32.dll. When we attempt to load HTTPSSLChannel.dll, it sees DB2's libeay32.dll already loaded and attempts to use it. Since they're different versions, and we have no control over what version DB2 is using, we're toast. At this point, we're looking at linking Axis statically with the OpenSSL library (like the UNIX platforms do). Anyone see any issues with this? Don't suppose there is a build parameter that does this? --- Wayne Johnson, | There are two kinds of people: Those 3943 Penn Ave. N. | who say to God, "Thy will be done," Minneapolis, MN 55412-1908 | and those to whom God says, "All right, (612) 522-7003 | then, have it your way." --C.S. Lewis Ahhh...imagining that irresistible "new car" smell? Check out new cars at Yahoo! Autos. Unless stated otherwise above: IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
Re: Invalid access to memory location
Hi Tobias, You must use the /MD flag when building any application or DLL that will use the Axis code. Given that everything is built with the /MD flag, everything will work fine. If you get a DLOPEN FAILED error when loading the parser library this must be because you have either changed the PATH environment variable, moved a 'dependent' library or altered the contents of axiscpp.conf file. You may also need to check that the xerces and parser DLLs are both on the path. I'm not quite sure what you are referring to when you say in item 2 that "We built a dll version with __stdcall convention which causes problems.". Have you changed something inside the axis build? If you modify the calling convention for any method/function within axis, you are almost certain to run into problems. Have you tried turning on trace to see if that gives you any additional information? Regards, Fred Preston. "Tobias Schoofs" <[EMAIL PROTECTED]> 09/02/2007 11:33 Please respond to "Apache AXIS C User List" To cc Subject Invalid access to memory location Hi, we're facing strange problems with a dll using axis-c (1.6b) on win32 machine. 1) We built a simple exe using the Calculator client class which works well. 2) We built a dll version with __stdcall convention which causes problems. - We first built the dll without the /MD compiler flag. It worked but with strange effects. (Memory was overwritten during the instantiation of the Calculator class.) - we than built the dll with /MD flag which resulted in the following error: exception in calclib: DLOPEN FAILED in loading parser library Failed to load parser within server engine: Error Message='Invalid access to memory location. 'Error Code='998' Load lib error='' The code of the dll is: int __stdcall add(int pOne, int pTwo) { char *tst = NULL; Calculator *calc = NULL; // static memory overwrites the stack!!! int rc = 0; try { calc = new Calculator(); rc = calc->add(pOne, pTtwo); delete calc; return rc; } catch (exception &e) { printf("exception in calclib: %s\n", e.what()); return -1; } } Caller: int main() { int rc = 0; int one = 10; int two = 35; try { rc = add(one, two); } catch (exception &e) { printf("Exception in calc: %s\n", e.what()); return -1; } if (rc > 0) { // it's just a simple test, so we're using values > 0 only printf("Result: %d\n", rc); return 0; } else { printf("Error: %d\n", rc); return -1; } } The header for both: extern "C" int __stdcall add(int, int); >From the makefile: calclib.obj: calclib.cpp Calculator.hpp cl -c /MD /DWIN32 -GX /Ic:\ts\axis\include calclib.cpp calc.obj: calc.cpp cl -c -GX /MD /DWIN32 \ calc.cpp Calculator.obj: Calculator.cpp Calculator.hpp cl -c -GX /MD /DWIN32 /Ic:\ts\axis\include Calculator.cpp calclib: calclib.obj Calculator.obj cl /LD /MD calclib.obj \ Calculator.obj \ c:\\ts\\axis\\lib\\axis\\axis_client.lib \ /link /EXPORT:add \ /NODEFAULTLIB:"libc.lib" calc: calc.obj cl /MD \ calclib.lib calc.obj \ /link /NODEFAULTLIB:"libc.lib" Any ideas? Tank you, Tobias - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Unless stated otherwise above: IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
SSL
Hi All, Is anyone using OpenSSL at the moment and if so, what steps where required to make it work? Regards, Fred Preston.
Re: Is there any guide about how to use Axis-C to call HTTPS web service?
Hi Rose, No you do not need to use SetSecure for OpenSSL. I do not know how to set the root-CA certificate, I assume that this is described in the OpenSSL documentation. Regards, Fred Preston. "Rose Knain" <[EMAIL PROTECTED]> 08/06/2006 03:45 Please respond to "Apache AXIS C User List" To axis-c-user@ws.apache.org cc Subject Re: Is there any guide about how to use Axis-C to call HTTPS web service? Should I call SetSecure to set root-CA certificate? How can Axis-C verify HTTPS server's certificate? Thanks! -Rose >From: Fred Preston <[EMAIL PROTECTED]> >Reply-To: "Apache AXIS C User List" >To: "Apache AXIS C User List" >Subject: Re: Is there any guide about how to use Axis-C to call HTTPS web >service? >Date: Tue, 6 Jun 2006 12:49:16 +0100 > >Hi Rose, > To use SSL you have to do a couple of things. First is to add the >following line to your axiscpp.conf file:- > >Channel_HTTP_SSL:/ > > An example of this in a Windows environment would be as follows:- > >Channel_HTTP_SSL:C:\ws-axis\c\bin\HTTPSSLChannel.dll > > Next you need to ensure that the OpenSSL library files are on your >path. For example in Windows, you will require two libraries;- >libeay32.dll and ssleay.dll. You may need to down-load these files (they >are available from the OpenSSL website). > > Once you have changed the config file and made these two files >available on your path, you should be able to use SSL. From a client >application viewpoint, this should just mean adding a 's' to the http >qualifier, i.e. 'https://...' instead of 'http://...'. > >Regards, > >Fred Preston. > > > > >"Rose Knain" <[EMAIL PROTECTED]> >05/06/2006 23:07 >Please respond to >"Apache AXIS C User List" > > >To >axis-c-user@ws.apache.org >cc > >Subject >Is there any guide about how to use Axis-C to call HTTPS web service? > > > > > > >Hi, > >Now I can successfully call HTTP web service by Axis-C. But I failed to >call >HTTPS web servcie. > >Is there any guide about how to use Axis-C to call HTTPS web service? e.g. > >How to set properties (e.g. SecureInfo) for axiscpp.conf. I want to use >openSSL for Axis-C HTTPS. > >Best Regards, >Rose > >_ >FREE pop-up blocking with the new MSN Toolbar ? get it now! >http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/ > > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > > _ On the road to retirement? Check out MSN Life Events for advice on how to get there! http://lifeevents.msn.com/category.aspx?cid=Retirement - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Is there any guide about how to use Axis-C to call HTTPS web service?
Hi Rose, To use SSL you have to do a couple of things. First is to add the following line to your axiscpp.conf file:- Channel_HTTP_SSL:/ An example of this in a Windows environment would be as follows:- Channel_HTTP_SSL:C:\ws-axis\c\bin\HTTPSSLChannel.dll Next you need to ensure that the OpenSSL library files are on your path. For example in Windows, you will require two libraries;- libeay32.dll and ssleay.dll. You may need to down-load these files (they are available from the OpenSSL website). Once you have changed the config file and made these two files available on your path, you should be able to use SSL. From a client application viewpoint, this should just mean adding a 's' to the http qualifier, i.e. 'https://...' instead of 'http://...'. Regards, Fred Preston. "Rose Knain" <[EMAIL PROTECTED]> 05/06/2006 23:07 Please respond to "Apache AXIS C User List" To axis-c-user@ws.apache.org cc Subject Is there any guide about how to use Axis-C to call HTTPS web service? Hi, Now I can successfully call HTTP web service by Axis-C. But I failed to call HTTPS web servcie. Is there any guide about how to use Axis-C to call HTTPS web service? e.g. How to set properties (e.g. SecureInfo) for axiscpp.conf. I want to use openSSL for Axis-C HTTPS. Best Regards, Rose _ FREE pop-up blocking with the new MSN Toolbar – get it now! http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can I use Axis-C for http transport?
Hi Bo, If you just want something to handle sockets then I would just use HTTPChannel as this has the basic communication parts such as open, close, read and write. If you want something more than that you will need to look at the HTTPTransport code and extract the methods that are relevant to your needs. The trouble with the transport layer is that it was written expecting HTTP headers and SOAP messages so some of the existing code will probably not be a good fit! As John says, some people have done this, but of course it is outside the scope of this project. You may also want to look at the server code which is written slightly differently (one difference is that the transport reads the complete message before passing it ('SimpleAxisTransport::readFromClient' in server) on whereas the client returns only what has been received up to that point ('HTTPTransport::getBytes' in client)). Regards, Fred Preston. "Bo Xie" <[EMAIL PROTECTED]> 30/05/2006 22:59 Please respond to "Apache AXIS C User List" To axis-c-user@ws.apache.org cc Subject Can I use Axis-C for http transport? Hi all, I found there were HTTPTransport.dll and HTTPChannel.dll in axis-c-1.6b-Win32-trace-bin\bin directory. My question is: Can I use Axis-C for http transport? e.g., like windows API "URLDownloadToFile"[1] or libcurl[2]? If Yes, how to do it? Is there any sample source code? Reference 1. http://msdn.microsoft.com/library/default.asp?url=""> 2. http://curl.haxx.se/libcurl/ Thank you very much! Best Regards, Xie, Bo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: A question about AXIS c++ project status
Hi Yair, Axis C/C++ is still being developed and there will be a new release (1.6) available soon. There is still a nightly build that is available from the website and the code is in SVN. Regards, Fred Preston. "Yair Zaslavsky" <[EMAIL PROTECTED]> 21/05/2006 16:56 Please respond to "Apache AXIS C User List" To cc Subject A question about AXIS c++ project status Good day, My company (Imagine communications) is looking for several alternatives to implement C++ web services and clients. I was under the impression that the development of Axis C++ was terminated, but today I looked again at your site and saw that you released a build at 3/3/2006. Can you please clarify for us the current status of the Axis c++ project? Thanks in advance, Yair Zaslavsky Management systems software engineer Imagine communications
Re: Re: Re: Conversion fault
Hi Magnus, The problem you describe is to do with scope. Because the string sString is a local variable, like all local variables it will be created on the stack. When the method ends (i.e returns), the content of the stack is lost and consequently, any local variables declared within the method will also be lost. To make your returned object persist outside of the scope of the method it must have been declared elsewhere. Such variables could be static or public/private member variables of the class or passed to the method in the parameter list. Regards, Fred Preston. "Magnus Karlsson" <[EMAIL PROTECTED]> 09/05/2006 13:40 Please respond to "Apache AXIS C User List" To "Apache AXIS C User List" cc Subject Re: Re: Re: Conversion fault More problems (same issue): I've tried conversion with c_str() but something won't work here. Example below gives a null-string as a result: xsd__string Test::getData() { std::string sString; sString = "Test"; return (char *) sString.cStr(); } How come? Best regards Magnus > Från: "Magnus Karlsson" <[EMAIL PROTECTED]> > Till: "Apache AXIS C User List" > Rubrik: Re: Re: Conversion fault > Datum: Mon, 8 May 2006 09:50:12 + (GMT) Thanks! /Magnus > Från: Fred Preston <[EMAIL PROTECTED]> > Till: "Apache AXIS C User List" > Rubrik: Re: Conversion fault > Datum: Mon, 8 May 2006 10:33:33 +0100 Hi Magnus, xsd__string is simply a char *. To convert from one to the other do the following:- xsd__string pXSD_String = "Test"; std::string sString; // Converting from xsd__string to std::string // Because the string class has overridden the '=' operator, you can simply assign an xsd__string to a string. sString = pXSD_String; // Converting from std::string to xsd__string. // The c_str() method converts the contents of the string object to a const char *. This can then be assigned to the xsd__string variable. pXSD_String = (char *) sString.c_str(); Regards, Fred Preston. "Magnus Karlsson" <[EMAIL PROTECTED]> 08/05/2006 09:35 Please respond to "Apache AXIS C User List" To axis-c-user@ws.apache.org cc Subject Conversion fault I'm using Axis C++ 1.6b for Windows (XP Professional). I'd like to know how conversion is done from std::string to axiscpp::xsd__string? I want to use ordinary string management (std::string) but when I try to cast an std::string to axiscpp::xsd__string I get "error C240: 'type cast' : cannot convert from 'std:string' to 'axiscpp::xsd_string'. Would it be better to skip xsd__strings and not use them at all? Best regards Magnus
Re: Conversion fault
Hi Magnus, xsd__string is simply a char *. To convert from one to the other do the following:- xsd__string pXSD_String = "Test"; std::string sString; // Converting from xsd__string to std::string // Because the string class has overridden the '=' operator, you can simply assign an xsd__string to a string. sString = pXSD_String; // Converting from std::string to xsd__string. // The c_str() method converts the contents of the string object to a const char *. This can then be assigned to the xsd__string variable. pXSD_String = (char *) sString.c_str(); Regards, Fred Preston. "Magnus Karlsson" <[EMAIL PROTECTED]> 08/05/2006 09:35 Please respond to "Apache AXIS C User List" To axis-c-user@ws.apache.org cc Subject Conversion fault I'm using Axis C++ 1.6b for Windows (XP Professional). I'd like to know how conversion is done from std::string to axiscpp::xsd__string? I want to use ordinary string management (std::string) but when I try to cast an std::string to axiscpp::xsd__string I get "error C240: 'type cast' : cannot convert from 'std:string' to 'axiscpp::xsd_string'. Would it be better to skip xsd__strings and not use them at all? Best regards Magnus
Re: LINK fatal error LNK1561
Hi Magnus, There should be three files on the Calculator Client side. Two that are generated by the WSDL2Ws tool (Calculator.cpp and Calcuator.hpp) and one that should be copied from ws-axis\c\samples\client\calculator (Client.cpp). The client application (Client.cpp) contains the 'main' method. Looking at the error information for LNK1561, it is suggesting that you do not have a 'main' method for the application (as it is not a library) and this would suggest that you have not built with Client.cpp. If you have included both the cpp's and hpp file, it should build... I have used your command line 'cl' command and it builds without error (I know this doesn't help you, but I just wanted to test that I could build the project :-) as I haven't done it for a while). When I remove Client.cpp I get the same error as you are seeing... Regards, Fred Preston. "Magnus Karlsson" <[EMAIL PROTECTED]> 02/05/2006 10:57 Please respond to "Apache AXIS C User List" To axis-c-user@ws.apache.org cc Subject Re: Re: LINK fatal error LNK1561 Hi Fred, I've already managed the server compilation without any trouble. Every single possible variable is set (I think :=), including the AXISCPP_DEPLOY variable. Compiling command is the one on the home page, i.e. (with correct installation directories) cl *cpp /GX /MD /D "WIN32" /I/include /link/lib/axis/axis_client.lib /OUT:"Calculator.exe" I use Visual C++ .NET 2003. Best regards Magnus Karlsson -Original Message- From: Fred Preston <[EMAIL PROTECTED]> To: "Apache AXIS C User List" Date: Tue, 2 May 2006 10:33:00 +0100 Subject: Re: LINK fatal error LNK1561 Hi Magnus, There could be several answers to this question, but without any detail I can only guess as to what might be causing this error... The questions would be;- Are you building the Client as a "Win32 Console Project"? If so, you also have to remember to set the following build options:- Project-> (project) Properties...->C++->Code Generation->Runtime Library must be set to "/MD" (Multi-threaded DLL) and Project-> (project) Properties...->Linker->Input->Additional Dependencies must include the Axis Client library (axis_client.dll). Have you set the AXISCPP_DEPLOY environment variable and downloaded the associated prerequisite software and put the path of those libraries into your PATH environment variable? The error itself does point to either the wrong type of project or a missing library. Without more information, it is difficult to narrow the problem... Regards, Fred Preston. "Magnus Karlsson" <[EMAIL PROTECTED]> 02/05/2006 10:10 Please respond to "Apache AXIS C User List" To axis-c-user@ws.apache.org cc Subject LINK fatal error LNK1561 I've installed Axis C++ along with Apache Web Server on Windows XP Professional. Now, I'm trying to build the client calculator example, but it ends up with following error message: Creating library Calculator.lib and object Calculator.exp LINK : fatal error LNK1561: entry point must be defined Does anyone know how to get around this problem? Please, help me anyone! Magnus Karlsson Prästbolsgatan 4D 587 33 Linköping 013-210052, 070-7315374 Magnus Karlsson Prästbolsgatan 4D 587 33 Linköping 013-210052, 070-7315374
Re: LINK fatal error LNK1561
Hi Magnus, There could be several answers to this question, but without any detail I can only guess as to what might be causing this error... The questions would be;- Are you building the Client as a "Win32 Console Project"? If so, you also have to remember to set the following build options:- Project-> (project) Properties...->C++->Code Generation->Runtime Library must be set to "/MD" (Multi-threaded DLL) and Project-> (project) Properties...->Linker->Input->Additional Dependencies must include the Axis Client library (axis_client.dll). Have you set the AXISCPP_DEPLOY environment variable and downloaded the associated prerequisite software and put the path of those libraries into your PATH environment variable? The error itself does point to either the wrong type of project or a missing library. Without more information, it is difficult to narrow the problem... Regards, Fred Preston. "Magnus Karlsson" <[EMAIL PROTECTED]> 02/05/2006 10:10 Please respond to "Apache AXIS C User List" To axis-c-user@ws.apache.org cc Subject LINK fatal error LNK1561 I've installed Axis C++ along with Apache Web Server on Windows XP Professional. Now, I'm trying to build the client calculator example, but it ends up with following error message: Creating library Calculator.lib and object Calculator.exp LINK : fatal error LNK1561: entry point must be defined Does anyone know how to get around this problem? Please, help me anyone! Magnus Karlsson Prästbolsgatan 4D 587 33 Linköping 013-210052, 070-7315374
Re: problem loading libaxiscpp_mod.so on AIX 5.1
Hi Antoine, Yes Axis uses version 2.2.0. Regards, Fred Preston. "Antoine Galataud" <[EMAIL PROTECTED]> 08/03/2006 10:29 Please respond to "Apache AXIS C User List" To: "Apache AXIS C User List" cc: Subject: Re: problem loading libaxiscpp_mod.so on AIX 5.1 With which version of xerces did you compile on AIX ? 2.2.0 ? Because for the moment, I get problems while linking in AxisXMLParser : [cc] ld: 0711-317 ERROR: Undefined symbol: .xercesc_2_2::XMLString::transcode(const unsigned short*) [cc] ld: 0711-317 ERROR: Undefined symbol: .xercesc_2_2::XMLString::replicate(const char*) [cc] ld: 0711-317 ERROR: Undefined symbol: xercesc_2_2::InputSource::setEncoding(const unsigned short*) [cc] ld: 0711-317 ERROR: Undefined symbol: xercesc_2_2::InputSource::setPublicId(const unsigned short*) [cc] ld: 0711-317 ERROR: Undefined symbol: xercesc_2_2::InputSource::setSystemId(const unsigned short*) [cc] ld: 0711-317 ERROR: Undefined symbol: .xercesc_2_2::XMLPlatformUtils::Initialize(const char*) seems xerces lib version is wrong, or - more difficult to resolv - compiled with gcc or something else (but not with xlC). 2006/3/8, Antoine Galataud < [EMAIL PROTECTED]>: 32 bit system ! The other libs are correctly opened and the loader section is read without any problem. Very strange... I'm currently trying to build AIX release from source, I'll give you feedback as soon as possible... If you see any other reasons for this problem, tell me ! Thanks 2006/3/8, John Hawkins <[EMAIL PROTECTED]>: These files are built and tested in an AIX 5.2 system so it might be backwards compatibility issues. Are you using this in a 64bit system or 32? They are 32 bit libs. "Antoine Galataud" <[EMAIL PROTECTED]> 08/03/2006 09:19 Please respond to "Apache AXIS C User List" <axis-c-user@ws.apache.org> To "Apache AXIS C User List" <axis-c-user@ws.apache.org> cc Subject Re: problem loading libaxiscpp_mod.so on AIX 5.1 Hi, some more details : libaxiscpp_mod.so seems to be the only "corrupted" library in the lib/axis folder; if i do a "dump -Hv" on any other lib, it gives me something like : libaxis_server.so: ***Loader Section*** Loader Header Information VERSION# #SYMtableENT #RELOCent LENidSTR 0x0001 0x0730 0x3602 0x00a3 #IMPfilID OFFidSTR LENstrTBL OFFstrTBL 0x0006 0x000334b8 0x0001631e 0x0003355b ***Import File Strings*** INDEX PATH BASE MEMBER 0 /usr/lib/threads:/usr/lpp/xlopt:/usr/vacpp/lib:/usr/lib:/lib 1 libC.a shr.o 2 libC.a ansi_32.o 3 libc_r.a shr.o 4 libpthreads.a shr_comm.o 5 libpthreads.a shr_xpg5.o What's wrong with this one ? Thanks 2006/3/7, Antoine Galataud <[EMAIL PROTECTED]>: > Hi ! > > I solved all of my problems on Solaris 8 platform, and want to thank > everybody for that. > Now, I must test Axis-c on AIX 5.1 ! (I will end my story with Linux, > I bet it will be easier). > > I reproduced every installation steps I created with Solaris, but for > rs6000 arch (environment variables, apache, ...). I took 1.6a.n binary > release for AIX. > > I put libaxiscpp_mod.so in libexec directory, then got this error : > > Cannot load /home/antgalat/apache-rs6000/libexec/libaxiscpp_mod.so > into server: > 0509-022 Cannot load module > /home/antgalat/apache-rs6000/libexec/libaxiscpp_mod.so. > 0509-108 The .loader section does not exist. > > I guess it's a newbie question, i'm not familiar with AIX ! > > Thanks in advance > > -- > Antoine Galataud > [EMAIL PROTECTED] > Département Architecture des Systèmes d'Information > INSA - Rouen > -- Antoine Galataud [EMAIL PROTECTED] Département Architecture des Systèmes d'Information INSA - Rouen -- Antoine Galataud [EMAIL PROTECTED] Département Architecture des Systèmes d'Information INSA - Rouen -- Antoine Galataud [EMAIL PROTECTED] Département Architecture des Systèmes d'Information INSA - Rouen
Re: http/get
Hi Rob, So you have something like time... char * pszUrlForZippedExplainationTextFromDictionary = webServiceDictionary->getURLForExplainationText( "english", "word"); And you then want to use the returned URL (I assume it is an ftp site (e.g. ftp://myDictionary/english/word)) to retrieve the file. This is outside the scope of Axis but you could use code snippets from the Transport/Channel code to provide you with a socket to the URL. I assume there is a ftp protocol for downloading files and if this is the case you would need to know what that was before you could download the file. A quick look around the web suggests that there are several solutions to this (try typing 'ftp protocol "How a browser retrieves a file"' into your favourite web search engine), but whether there is one solution that will work cross platforms... Regards, Fred Preston. Rob Redmon <[EMAIL PROTECTED]> 03/03/2006 15:23 Please respond to "Apache AXIS C User List" To: Apache AXIS C User List cc: Subject: http/get First, sorry if this isn't the venue for this question. I'm using axis libraries to invoke a webservice via a generated stub. This web service returns a http url to my result (a zip file). What's the easiest way to then in my C++ program retrieve this file? Retrieving it to the local directory and not not in memory would be just fine. I can then perform a system call to unzip Are there some components in the axis library that my help? The solution need to work both in linux and winxp. Thanks for any help! Rob -- Rob Redmon NOAA/NGDC 325 Broadway E/GC2 Boulder, Colorado 80305 Tel: (303) 497-4331 Fax: (303) 497-6513 [EMAIL PROTECTED] "Engineering is the art of making what you want from things you can get."
Re: java.util.NoSuchElementException from WSDL2Ws
Hi Parvez, For the moment, make the part something like this... Add:- Then, change the getVersionRequest message to be... It means that when you use the web service getVersion you will have to supply an input parameter, but you can make it zero, e.g. webService->getVersion( 0); Not great, but at least it will work :-) Regards, Fred Preston. Parvez shah <[EMAIL PROTECTED]> 03/03/2006 11:53 Please respond to "Apache AXIS C User List" To: Apache AXIS C User List cc: Subject: Re: java.util.NoSuchElementException from WSDL2Ws Thanks for the help .. just one more thing .. OT Request (how do i set part on method which takes no argument .. i did google on it but came up with no result) Parvez Fred Preston wrote: Hi Parvez, The reason why your WSDL is causing WSDL2Ws to fail is because it currently does not support a message that does not have any parts. For example, getVersionResponse:- is fine, but getVersionRequest:- because it does not have any parts, fails. I have looked into which part of WSDL2Ws would need to change for this to work and the change is quite trivial. But, for the moment, this is a known problem. I will raise a JIRA (if one has not already been raised) to add this to the list of things that needs to be fixed. Regards, Fred Preston. Parvez shah <[EMAIL PROTECTED]> 03/03/2006 09:49 Please respond to "Apache AXIS C User List" To: Apache AXIS C User List cc: Subject: Re: java.util.NoSuchElementException from WSDL2Ws does anyone has any pointer to this problem... Parvez shah wrote: Hi, I am using axis-c-1.6a.n-Win32 on win 2000 I am getting following error while running java org.apache.axis.wsdl.wsdl2ws.WSDL2Ws SystemStatus.wsdl -lc++ -sclient java.util.NoSuchElementException at java.util.HashMap$HashIterator.nextEntry(Unknown Source) at java.util.HashMap$ValueIterator.next(Unknown Source) at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.addDocumentStyleInputMessageToMethodInfo(Unknown Source) at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.setMethodInfo(Unknown Source) at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.getServiceInfo(Unknown Source) at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.generateWrappers(Unknown Source) at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.main(Unknown Source) Code generation failed. Please see errors above The same wsdl i tried using with wsdl2java and gSOAP, and i dont get any error can any one point me on what's the error or what should i look for coz error stack trace is not telling me any thing Parvez "http://xml.apache.org/xml-soap" xmlns:impl="urn:services.ws.core.collabnet.com" xmlns:intf="urn:services.ws.core.collabnet.com" xmlns:tns1="urn:exception.ws.core.collabnet.com" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> "http://www.w3.org/2001/XMLSchema"> "http://www.w3.org/2001/XMLSchema"> "http://schemas.xmlsoap.org/soap/http"/> "http://www.soltest3.maa.collab.net/axis/services/ws-sec-min/ws/SystemStatus"/>
Re: java.util.NoSuchElementException from WSDL2Ws
Hi Parvez, The reason why your WSDL is causing WSDL2Ws to fail is because it currently does not support a message that does not have any parts. For example, getVersionResponse:- is fine, but getVersionRequest:- because it does not have any parts, fails. I have looked into which part of WSDL2Ws would need to change for this to work and the change is quite trivial. But, for the moment, this is a known problem. I will raise a JIRA (if one has not already been raised) to add this to the list of things that needs to be fixed. Regards, Fred Preston. Parvez shah <[EMAIL PROTECTED]> 03/03/2006 09:49 Please respond to "Apache AXIS C User List" To: Apache AXIS C User List cc: Subject: Re: java.util.NoSuchElementException from WSDL2Ws does anyone has any pointer to this problem... Parvez shah wrote: Hi, I am using axis-c-1.6a.n-Win32 on win 2000 I am getting following error while running java org.apache.axis.wsdl.wsdl2ws.WSDL2Ws SystemStatus.wsdl -lc++ -sclient java.util.NoSuchElementException at java.util.HashMap$HashIterator.nextEntry(Unknown Source) at java.util.HashMap$ValueIterator.next(Unknown Source) at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.addDocumentStyleInputMessageToMethodInfo(Unknown Source) at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.setMethodInfo(Unknown Source) at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.getServiceInfo(Unknown Source) at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.generateWrappers(Unknown Source) at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.main(Unknown Source) Code generation failed. Please see errors above The same wsdl i tried using with wsdl2java and gSOAP, and i dont get any error can any one point me on what's the error or what should i look for coz error stack trace is not telling me any thing Parvez "http://xml.apache.org/xml-soap" xmlns:impl="urn:services.ws.core.collabnet.com" xmlns:intf="urn:services.ws.core.collabnet.com" xmlns:tns1="urn:exception.ws.core.collabnet.com" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> "http://www.w3.org/2001/XMLSchema"> "http://www.w3.org/2001/XMLSchema"> "http://schemas.xmlsoap.org/soap/http"/> "http://www.soltest3.maa.collab.net/axis/services/ws-sec-min/ws/SystemStatus"/>
RE: SSL Client
Hi Iwan, Did you get SSL working? Also, you should not be downloading the Axis code from CVS repository as this abandoned months ago and the new Axis repository is now in SVN (it should all be on the Apache web site :-) ). From your code snippets, it looks like you are using quite an old version of the code and it could be that some of your problems have already been resolved when you try the latest code extracted from SVN repository :-) Regards, Fred Preston. Iwan Tomlow <[EMAIL PROTECTED]> 21/02/2006 07:57 Please respond to "Apache AXIS C User List" To: "'Apache AXIS C User List'" cc: "'axis-c-dev@ws.apache.org'" Subject: RE: SSL Client One thing I forgot to mention: to prevent the crash, I also had to change the following in xml\XMLParserXerces.cpp: Ln 79: const AnyElement* XMLParserXerces::next(bool isCharData) { bool bCanParseMore = false; if(!m_bFirstParsed) { - m_pParser->parseFirst(*m_pInputSource, m_ScanToken); - m_bFirstParsed = TRUE; + m_bFirstParsed = m_pParser->parseFirst(*m_pInputSource, m_ScanToken); + if (!m_bFirstParsed) + return NULL; } Kind regards, Iwan Tomlow -Original Message- From: Iwan Tomlow [mailto:[EMAIL PROTECTED] Sent: dinsdag 21 februari 2006 8:53 To: 'Apache AXIS C User List' Cc: 'axis-c-dev@ws.apache.org' Subject: RE: SSL Client Hello, Just to let you know I managed to get the SSL configured using vc\transport\Axis3\HTTPSSLChannel. However, I think I stumbled over a bug in the transport layer, because the Axis-client was always crashing when using SSL. Can't seem to access the CVS-sources at the moment, so I don't know if it has been noticed and fixed already, so I'll post it here. Debugging showed the Xerces-parser was using bogus data to throw a UTF8FormatException, so the following code in ClientAxisEngine.cpp failed: Ln 223: int nSoapVersion = m_pDZ->getVersion (); if (nSoapVersion == VERSION_LAST) /* version not supported */ { Status = AXIS_FAIL; // return AXIS_FAIL; The status was indeed AXIS_FAIL, but because the return-statement is commented out, the subsequent call to "m_pDZ->getHeader ();" caused a crash in the Xerces parser. I finally tracked it down to what I think is a bug in the getBytes() in axis3/HTTPTransport.cpp (Ln 588). Probably because of using SSL, what I was receiving after the HTTP-header was always a first chunk containing *only* the chunk size + CRLF, nothing more. This caused the following code to never execute extra reads to really get any of the chunk data: //There might be chunk extensions in there too but we may not need them unsigned int endOfChunkData = m_strReceived.find( "\r\n"); // make sure we have read at least some part of the message if ( endOfChunkData == std::string::npos) { endOfChunkData was 3 in this case (data was "4db\r\n"), and data was never read. I tried to fix it like this, which worked for me (not at all sure that this is a complete and trustworhty fix); this should make sure at least some of the actual chunk data is read before continuing: // make sure we have read at least some part of the message - if( endOfChunkData == std::string::npos) + std::string::size_type nLen = m_strReceived.length (); + if ( endOfChunkData == std::string::npos || + endOfChunkData + 2 >= nLen ) { iIterationCountdown = 100; do { m_pszRxBuffer [0] = '\0'; *m_pActiveChannel >&g
Assistance running examples with ssl
Hi Jason, The error is due to no data being received by the client before it times out (roughly 10 seconds). This, as you point out is probably due to the client not liking the server certification and so it ignores the message. Unfortunately, OpenSSL does not appear to trap this condition so the error message is rather obscure. The SSL examples used to work fine (I have not tested them recently), but if it is because the certificate is not being recognised, then it may not be a client side problem. I would be interested if anyone has had these sorts of problems... You might just want to check the URL, specifically the port number, just in case! Regards, Fred Preston. Jason Musgrave <[EMAIL PROTECTED]> 27/10/2005 22:27 Please respond to "Apache AXIS C User List" To axis-c-user@ws.apache.org cc Subject Assistance running examples with ssl Hello, I now have the AXIS-C calculator example client talking to a java server instance. The clients are on windows & AIX 5.2 and both are working fine with http. However when I submit over https I get an error on both platforms: "Exception : HTTPTransportException:Input streaming error while getting data Timed out waiting for HTTP header message (1)." (It's shouldn't be a time out, it comes back instantly) My question is: what has anyone done to get the examples to work with SSL. I've been assuming the error message I keep getting is because the client openssl configuration doesn't like the server cert... (which is self signed). So I've been trying to get that openssl on the client to recognize the signing cert as trusted. I haven't found anyone else online with a similar problem, so... what did you do? Was it this complicated? thanks, Jason Musgrave
Re: Exception received from with AXIS-C & SS
Hi Jason, The config file looks fine although I would not mix debug and non-debug libraries (I prefer to use the non-debug versions with a non-debug client application (don't forget to use the /MD option on your compiler when building the application)). If you are not getting a reply (I assume this from the exception information about not getting a HTTP header), I would first look at the URL and whether SSL has been enabled on your server. But because you have already checked these, and you know they work with 'normal' http and https with a java client I am at a bit of a loss. Looking at the exception that is thrown, I can explain a little about the transport side... Axis is waiting for the corresponding response message and getBytes is responsible for pulling the message from the socket. AXIS_TRANSPORT_STATUS HTTPTransport::getBytes( char * pcBuffer, int * piSize) throw (AxisException, HTTPTransportException) Within getBytes, the code enters a loop that will wait for data to arrive on the socket. do { // Read whatever part of the response message that has arrived at the active // channel socket. m_pszRxBuffer[0] = '\0'; *m_pActiveChannel >> m_pszRxBuffer; // Add the new message part to the received string. m_strReceived += m_pszRxBuffer; // Do iteration processing. if( strlen( m_pszRxBuffer) > 0) { iIterationCount = 100; } else { iIterationCount--; } // Check for beginning and end of HTTP header. if( m_strReceived.find( ASCII_S_HTTP) != std::string::npos && m_strReceived.find( ASCII_S_CRLFCRLF) != std::string::npos) { bHTTPHeaderFound = true; } } while( !bHTTPHeaderFound && iIterationCount > 0); If no data arrives within about 10 seconds or so then the iteration count will have dropped to zero and an exception will be thrown. (NB: The code has changed recently and the messages have also changed, but this is where Axis is failing.) // If the HTTP header was not found in the given number of iterations then // throw an exception. if( iIterationCount == 0) { throw HTTPTransportException( SERVER_TRANSPORT_INPUT_STREAMING_ERROR, "Timed out waiting for HTTP header message."); } So this brings me back to my original though that the request message is being sent, but no response message is being received. This could be because the server is not responding (we know this is not correct because your java application works well) or because openSSL has thrown it away as an invalid message for what ever reason. Unfortunately, if this is the case, openSSL does not tell the Axis so we have no way of knowing or trapping this situation. Here is the SSLChannel code... int HTTPSSLChannel::ReadFromSocket( const char * pszRxBuffer) nByteRecv = SSL_read( m_sslHandle, (void *) pszRxBuffer, BUF_SIZE - 1); Looking at the description (http://www.openssl.org/docs/ssl/SSL_read.html) we could add a little more information to the basic exception message and I will raise a JIRA to do so, but it looks to me as if SSL is just not recognising your response message or the response message is not getting through. I'm wondering if this could be because maybe you have different, versions of openSSL at client and server that are somehow incompatible? Regards, Fred Preston. Jason Musgrave <[EMAIL PROTECTED]> 13/10/2005 20:20 Please respond to "Apache AXIS C User List" To: axis-c-user@ws.apache.org cc: Subject: Exception recieved from with AXIS-C & SS Hello, I am running Axis-C 1.5 using Openssl 0.9.8... (All on windows 2k Terminal server). The calculator example. I'm trying run against an 1.2.1 java axis instance running in apache tomcat on AIX. (a tweaked calculator example.) It works fine on HTTP... it adds 10 & 5 and gets 15. (It also works fine with a java axis client on both http & https.) It fails with AXIS-C with the following message Exception : HTTPTransportException:Input streaming error while getting data Time d out waiting for HTTP header message (1). ### A Snippet of my axis conf file. XMLParser:AxisXMLParserXerces.dll Transport_http:HTTPTransport_D.dll #Transport_http:HTTPTransport.dll Channel_HTTP:HTTPChannel.dll Channel_HTTP_SSL:HTTPSSLChannel_D.dll using --> Transport_http:HTTPTransport.dll I only see: Unknown exception has occured So, my question is: where am I screwing up? Is my OPENSSL setup wrong, or have I built / configed the ssl channel stuff wrong? Please let me know if there is any more Information I can provide.
Re: Is DataHandler supported?
Hi Rodrigo, There are handlers in Axis C++, but they are not fully implemented. I would guess what you are looking for is not yet supported by handlers. Regards, Fred Preston. Rodrigo Ruiz <[EMAIL PROTECTED]> 04/10/2005 15:12 Please respond to "Apache AXIS C User List" To: Apache AXIS C User List cc: Subject: Is DataHandler supported? Hi all, I am trying to generate C++ stubs for a service running in Axis Java, and I am getting errors related to DataHandler parameters. The error is: unregisterd type {http://xml.apache.org/xml-soap}DataHandler refered The service uses rpc style, and SOAP 1.2 encoding. I have mail.jar and activation.jar in the classpath. Are DataHandlers supported in Axis-C++? Do I have to do something special? Thanks in advance, Rodrigo Ruiz
Re: Axis C++ client for SAPBC
Hi Florin, AXISCPP_HOME is used to find the axiscpp.conf file that contains information on explicitly where to find the associated DLLs. The problem is that these DLLs use other DLLs and the location of these DLLs needs to be on your path. For example, AxisXMLParserXerces.dll relies on xerces-c_2_2_0.dll (I think it also works with other, newer versions, but lets not go into that now!). If the xerces DLL is not on the path then AxisXMLParserXerces.dll will load then immediately unload and will to the user look like it has not loaded. Infact it did load, but could not load the libraries that it is dependant on and so therefore immediately unloaded I hope this makes things a little clearer :-) Regards, Fred Preston. John Hawkins/UK/[EMAIL PROTECTED] 03/10/2005 08:40 Please respond to "Apache AXIS C User List" To: "Apache AXIS C User List" cc: Subject: Re: Axis C++ client for SAPBC OK, What version of xerces are you running (it needs to be 2.2.0)? - and can you cut and paste your config file her pls. thanks, John. Pico Florin <[EMAIL PROTECTED]> 03/10/2005 08:01 Please respond to "Apache AXIS C User List" To Apache AXIS C User List cc Subject Re: Axis C++ client for SAPBC Hello! I've tried to execute my client AXIS C++ for SAP BC from VC6.0 and I've received the same execption: even I've set up the AXISCPP_HOME enviroment variable to the path of axiscpp.conf. Can somebody help me to pass this error? Thank you! Florin Samisa Abeysinghe <[EMAIL PROTECTED]> wrote: axiscpp.conf file is required by the client to locate the transport and parser. It should be located in AXISCPP_HOME (this envioronment variable must be set by you) Samisa... Pico Florin wrote: > Hi! > I've tried to create a client that sends SOAP messages to SAPBC > using AXIS C++. Running my code I've received this error: > "Exception : DLOPEN FAILED in loading parser library" > > I've understood that this problem could appear when the axiscpp.conf > is not well configured. > Firstly, in my case where this file should be located? Because in your > examples you have some specifications just for Apache servers. Is this > file needed for all the clients that we want to implement? > Secondly, I will show you how I've tried to connect to SAP BC in > order to see if the buss ines is OK: > > > InteropTestPortType::InteropTestPortType() > :Stub(" ", APTHTTP1_1) > { > m_pCall->setEndpointURI("http://localhost:/soap"); > } > InteropTestPortType::~InteropTestPortType() > { > } > > /*Methods corresponding to the web service methods*/ > /* > * This method wrap the service method echoString > */ > xsd__string InteropTestPortType::echoString(xsd__string Value0) > { > xsd__string Ret = NULL; > const char* pcCmplxFaultName; > try > { > if (AXIS_SUCCESS != m_pCall->initialize(CPP_RPC_PROVIDER)) > return Ret; > m_pCall->setTransportProperty(SOAPACTION_HEADER , "base#echoString"); > m_pCall->setSOAPVersion(SOAP_VER_1_1); > m_pCall->setOperation("SOAPRPCTESTCLIENT", "SCANDLOG"); > applyUserPreferences(); > m_pCall->addParameter((void*)&Value0, "xml", XSD_STRING); > if (AXIS_SUCCESS == m_pCall->invoke()) > { > if(AXIS_SUCCESS == m_pCall->checkMessage("hello", "SCANDLOG")) > { > Ret = m_pCall->getElementAsString("_return", 0); > } > } > > m_pCall->unInitialize(); > return Ret; > } > catch(AxisException& e) > { > int iExceptionCode = e.getExceptionCode(); > if(AXISC_NODE_VALUE_MISMATCH_EXCEPTION != iExceptionCode) > { > > m_pCall->unInitialize(); > throw base_AxisClientException(e.what()); > } > ISoapFault* pSoapFault = (ISoapFault*) > m_pCall->checkFault("Fault","http://localhost/axis/base" ); > if(pSoapFault) > { > > m_pCall->unInitialize(); > throw base_AxisClientException(pSoapFault); > } > else throw; > } > } > > //base > > int main(int argc, char* argv[]) > { > > try > { > & lt; BR>> InteropTestPortType ws; > > printf("invoking echoString...\n"); > //testing echoString > AxisChar* pachEchoStringResult = ws.echoString("hello world"); > printf("pachEchoStringResult\n"); > > } > catch(AxisException& e) > { > printf("Exception : %s\n", e.what()); > } > catch(exception& e) > { > printf("Unknown exception has occured\n"); > } > catch(...) > { > printf("Unknown exception has occured\n"); > } > return 0; > } > Thank you, > F. > > > Yahoo! Messenger > > NEW - crystal clear PC to PC calling worldwide with voicemail > Yahoo! Messenger NEW - crystal clear PC to PC calling worldwide with voicemail Yahoo! Messenger NEW - crystal clear PC to PC calling worldwide with voicemail
RE: /MD and /MT compiler options on MSVC6
Hi Lilantha, Thanks for the info. The /MD /MT distinction is not as clear as I thought... The anomaly still remains though and the root of the problem seems to be passing memory pointers across DLL boundaries (i.e where objects are created in one DLL and used by another, because the heaps are different, the object cannot be deleted by the user). I thought about passing the object back to its creator for deletion, but this could be messy. The other though I had was to create the object where it is to be used and then to pass the pointer to the creator/populator method, but this is even more messy. Have you experienced these sorts of problems with Axis or have you been building your applications with the /MD flag rather than the /MT flag? Thanks also for the info on your project. It's always helpful to know how others are using Axis ;-) Best Regards, Fred Preston. "Lilantha Darshana" <[EMAIL PROTECTED]> 09/26/2005 02:39 PM Please respond to "Apache AXIS C User List" To: "Apache AXIS C User List" cc: Subject: RE: /MD and /MT compiler options on MSVC6 Hi Fred, It seems you are referring to MSVS .NET reference pages since, the URLs you have given: 1. http://msdn.microsoft.com/library/default.asp?url=""> MSDN Home > MSDN Library > Development Tools and Languages > Visual Studio .NET > Visual C++ > Building a C/C++ Program > C/C++ Building Reference > Compiling a C/C++ Program > Compiler Options > Compiler Options Listed Alphabetically 2. http://msdn.microsoft.com/library/default.asp?url=""> MSDN Home > MSDN Library > Development Tools and Languages > Visual Studio .NET > Visual C++ > Reference > Visual C++ Libraries > Run-Time Library Reference Instead of above URLs please refer to: MSVC6 reference pages at: http://msdn.microsoft.com/library/default.asp?url=""> and http://msdn.microsoft.com/library/default.asp?url=""> Options /MT & /MD are used for both DLLs and for executable binaries. Only difference is /MT links with thread safe versions of static libs and /MD links shared version of thread safe libs at runtime. I’m not pretty sure what exactly the cause for the test failure though. As a solution to the defect AXISCPP-149, how about having a destructor in the struct to delete m_Array member. According to my knowledge there are so many customers out there who use MSVC6 still. Example my project at Siebel, and we have not planned any soon to replace our version with MSVC7 since we have lots of customers who we need to support with the application developed with this version. Therefore I believe MS will continue to support that version for some time. Thanks -Lilantha From: Fred Preston [mailto:[EMAIL PROTECTED] Sent: Monday, September 26, 2005 5:16 AM To: Apache AXIS C User List Subject: RE: /MD and /MT compiler options on MSVC6 Hi Lilantha, I only have MSVC6 on my machine. I took the load library information from the MSVC information pages on the Microsoft website (see links in previous e-mail). This is the description for the /MD compiler option... Defines _MT and _DLL so that both multithread- and DLL-specific versions of the run-time routines are selected from the standard .h files. This option also causes the compiler to place the library name MSVCRT.lib into the .obj file. Applications compiled with this option are statically linked to MSVCRT.lib. This library provides a layer of code that allows the linker to resolve external references. The actual working code is contained in MSVCR71.DLL, which must be available at run time to applications linked with MSVCRT.lib. When /MD is used with _STATIC_CPPLIB defined (/D_STATIC_CPPLIB) it will cause the application to link with the static multithread Standard C++ Library (libcpmt.lib) instead of the dynamic version (msvcprt.lib) while still dynamically linking to the main CRT via msvcrt.lib. I don't think I've miss quoted... I agree with what you are saying, but here is my problem. When I run the tests using the build options used to build the DLL's, the majority run without a problem. But, when I run the same tests after building then with the /MT rather than the /MD option, I get exceptions. These exceptions must be down to the underlying differences between the compiler options and my point is;- The tests should not be built using the /MD flag as they are not DLLs. If the 'proper' flag is used to build these tests, then exceptions are caused because of the different linked libraries. If we have this incompatibility between libraries then this could potentially be a big problem for a customer and my suggestion was that either everything is built with the /MD flag or we do what a lot of customers have already done and mo
RE: /MD and /MT compiler options on MSVC6
Hi Lilantha, I only have MSVC6 on my machine. I took the load library information from the MSVC information pages on the Microsoft website (see links in previous e-mail). This is the description for the /MD compiler option... Defines _MT and _DLL so that both multithread- and DLL-specific versions of the run-time routines are selected from the standard .h files. This option also causes the compiler to place the library name MSVCRT.lib into the .obj file. Applications compiled with this option are statically linked to MSVCRT.lib. This library provides a layer of code that allows the linker to resolve external references. The actual working code is contained in MSVCR71.DLL, which must be available at run time to applications linked with MSVCRT.lib. When /MD is used with _STATIC_CPPLIB defined (/D_STATIC_CPPLIB) it will cause the application to link with the static multithread Standard C++ Library (libcpmt.lib) instead of the dynamic version (msvcprt.lib) while still dynamically linking to the main CRT via msvcrt.lib. I don't think I've miss quoted... I agree with what you are saying, but here is my problem. When I run the tests using the build options used to build the DLL's, the majority run without a problem. But, when I run the same tests after building then with the /MT rather than the /MD option, I get exceptions. These exceptions must be down to the underlying differences between the compiler options and my point is;- The tests should not be built using the /MD flag as they are not DLLs. If the 'proper' flag is used to build these tests, then exceptions are caused because of the different linked libraries. If we have this incompatibility between libraries then this could potentially be a big problem for a customer and my suggestion was that either everything is built with the /MD flag or we do what a lot of customers have already done and move up (as suggested in the Microsoft documentation) to MSVC7. (Do MS still support MSVC6 and if they do, how long will they continue to do so?). Regards, Fred Preston. "Lilantha Darshana" <[EMAIL PROTECTED]> 09/23/2005 09:45 PM Please respond to "Apache AXIS C User List" To: "Apache AXIS C User List" , axis-c-dev@ws.apache.org cc: Subject: RE: /MD and /MT compiler options on MSVC6 First question is why are you trying to link with both msvcrt and msvcr71 CRT libs at the same time? If we use /MT option that mean we link statically to multi-threaded library so the generated object file size is large. But if we use /MD we link to a static lib – having LoadLibrary() method and respective code to get the ProcAddress() of called functions – that is having only the tiny code for loading functions from a shared lib at runtime. So the final object code is small. Check your lib path and linker path to see whether you are using anything from .NET instead of all libs from MDVC6. Thanks -Lilantha From: Fred Preston [mailto:[EMAIL PROTECTED] Sent: Friday, September 23, 2005 7:16 AM To: axis-c-dev@ws.apache.org; axis-c-user@ws.apache.org Subject: /MD and /MT compiler options on MSVC6 Hi All, I'd like to discuss the /MD and /MT compiler options available on MSVC6. The AxisClient DLLs are built with the /MD option that instructs the DLLs to use both multi-threaded and DLL specific options within the standard header files. It also tells the compiler to put the MSVCRT.lib into the object file and applications are statically linked to it. The DLLs are dynamically linked to msvcprt.lib while still dynamically linked to the main C runtime via msvcrt.lib. Now, If I use the ant scripts to build one of the tests (such as AxisBench) it will build and run successfully. What I hadn't realised up to now is that when I use the ant scripts, it uses the same compiler options to build the tests as it does to build the Axis DLLs and so the tests are being built with the /MD compiler option. I am looking at AXISCPP-149, trying to work out the best way to clean up the 'delete ' problems with complex objects and needed to debug a couple of tests to see what is missing in the delete (this is a bit of an aside, but helps set the context). So I created a new MSVC project using the test generated framework for AxisBench and compiled the project using the 'normal' application build options (i.e. /MT for multi-threaded application). Now, using the /MT option causes the compiler to place the LIBCMT.lib into the object file. When the 'release' version of the application was built, it was immediately obvious that I had two different exe's because the ant built one was 56K whilst the MSVC built one was 208K. So what does this mean? Well, I've already said that the ant built exe runs, but the MSVC built one with the /MT option failed with th
/MD and /MT compiler options on MSVC6
Hi All, I'd like to discuss the /MD and /MT compiler options available on MSVC6. The AxisClient DLLs are built with the /MD option that instructs the DLLs to use both multi-threaded and DLL specific options within the standard header files. It also tells the compiler to put the MSVCRT.lib into the object file and applications are statically linked to it. The DLLs are dynamically linked to msvcprt.lib while still dynamically linked to the main C runtime via msvcrt.lib. Now, If I use the ant scripts to build one of the tests (such as AxisBench) it will build and run successfully. What I hadn't realised up to now is that when I use the ant scripts, it uses the same compiler options to build the tests as it does to build the Axis DLLs and so the tests are being built with the /MD compiler option. I am looking at AXISCPP-149, trying to work out the best way to clean up the 'delete ' problems with complex objects and needed to debug a couple of tests to see what is missing in the delete (this is a bit of an aside, but helps set the context). So I created a new MSVC project using the test generated framework for AxisBench and compiled the project using the 'normal' application build options (i.e. /MT for multi-threaded application). Now, using the /MT option causes the compiler to place the LIBCMT.lib into the object file. When the 'release' version of the application was built, it was immediately obvious that I had two different exe's because the ant built one was 56K whilst the MSVC built one was 208K. So what does this mean? Well, I've already said that the ant built exe runs, but the MSVC built one with the /MT option failed with the following messages:- Unknown Exception occurred. Unknown Exception occurred. Unknown Exception on clean up: Unknown Exception occurred. Unknown Exception on clean up: It is failing inside BenchDataType::Axis_Deserialize_BenchDataType( BenchDataType * param, IWrapperSoapDeSerializer * pIWSDZ) at the beginning of the method when it tries to delete 'count' which is an object that is passed back after being created within the deserialiser (across the DLL boundary? - more on this later...). This is because 'count' is not known to the heap and it reports the following error:- HEAP[AxisBench.exe]: Invalid Address specified to RtlFreeHeap( 0034, 0057B2D8) <-- obviously the numbers will change! So, I looked at the compiler options and discovered that ant was building the applications with the /MD option. When I tried this option, the exe size was the same and the application ran without a problem. So, what does this mean? I started with the libraries... Looking at http://msdn.microsoft.com/library/default.asp?url="" and http://msdn.microsoft.com/library/default.asp?url="" the LIBCMT.lib is a multi-threaded, static link library and MSVCRT.lib is a multi-threaded dynamic link library... "Humm, so what?", I thought, but I kept reading... The very last sentence of the "What problems exist if an application uses both msvcrt and msvcr71?" is very revealing, "...If your DLLs pass CRT resources across the library boundary, you will encounter issues with mismatched CRTs...". I would take this to be memory issues, such as heap, etc. And it finishes with "...recompile your project with Visual C++ .NET.". So, we have potential problems with different libraries using MSVC6 and Microsoft is suggesting that if we are finding problems, then we need to move to '.NET' which I think implies that we should move to MSVC7 (which can be found on MSVC 2003 .NET). Interesting... RECOMMENDATIONS: 1. If you are having similar problems as I did running AxisClient, try using the /MD rather than /MT compiler flag. 2. AxisClient should be built using MSVC7 to avoid future library inconsistencies. Regards, Fred Preston.
RE: Trying to run simple Calculator sample client program
Hi Kon Kam King, Chinthana C. Dinapala's note yesterday "RE: Most of the test are failing", says that he as tested with xerces-c2_6 as well as xerces-c2_2_0 ("I have tested and its working fine for us. Both with xerces-c2_2_0 and xerces-c2_6 it’s working fine."). If you cannot successfully download 2_2_0 it would be worth trying to use 2_6. I also note that you are building using MSVC 7. All of our builds are currently built using MSVC 6 and there are some problems that we are uncovering/investigating between mixing 6 and 7. Some produce compiler warnings (as you have discovered) and other areas produce errors. For the moment, ignore the warnings as it seems to be resolving them correctly. The AxisClient_D.dll is the debug version of the AxisClient.dll (this is also true of transport and channel dlls). Check the link options in your application build to make sure that you have specified AxisClient.lib rather than AxisClient_D.lib. If you have specified '_D', it will look for AxisClient_D.dll. Regards, Fred Preston. "Kon Kam King, France" <[EMAIL PROTECTED]> 09/12/2005 12:08 PM Please respond to "Apache AXIS C User List" To: "Apache AXIS C User List" cc: Subject: RE: Trying to run simple Calculator sample client program Hi, Thanks for your help. I downloaded again with your link. But I still have a problem with Winzip complaining it cannot open the file it’s an invalid archive. I also have a bubble when I point to the file saying bad zip file or it may be part of a spanned zip file. I am looking at my build under Microsoft Visual C++. I see the following warnings (C4251) at compile. Can they be source of errors at run time? : Calculator.cpp c:\axis-c-1.5\axis-c-1-5-win32\include\axis\client\Call.hpp(484) : warning C4251: 'axiscpp::Call::m_strProxyHost' : class 'std::basic_string<_Elem,_Traits,_Ax>' needs to have dll-interface to be used by clients of class 'axiscpp::Call' with [ _Elem=char, _Traits=std::char_traits, _Ax=std::allocator ] c:\axis-c-1.5\axis-c-1-5-win32\include\axis\client\Stub.hpp(698) : warning C4251: 'axiscpp::Stub::m_viCurrentSOAPHeaderBlock' : class 'std::vector<_Ty>::iterator' needs to have dll-interface to be used by clients of class 'axiscpp::Stub' with [ _Ty=axiscpp::IHeaderBlock * ] c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\vector(200) : see declaration of 'std::vector<_Ty>::iterator' with [ _Ty=axiscpp::IHeaderBlock * ] c:\axis-c-1.5\axis-c-1-5-win32\include\axis\client\Stub.hpp(713) : warning C4251: 'axiscpp::Stub::m_viCurrentSOAPMethodAttribute' : class 'std::vector<_Ty>::iterator' needs to have dll-interface to be used by clients of class 'axiscpp::Stub' with [ _Ty=axiscpp::IAttribute * ] c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\vector(200) : see declaration of 'std::vector<_Ty>::iterator' with [ _Ty=axiscpp::IAttribute * ] c:\axis-c-1.5\axis-c-1-5-win32\include\axis\AxisException.hpp(176) : warning C4275: non dll-interface class 'exception' used as base for dll-interface class 'axiscpp::AxisException' c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\exception(39) : see declaration of 'exception' Also on one link it seemed looks for Axis_Client_D;dll, which I don’t find in the extract/bin. Can these be causing the error? Thanks, France From: Fred Preston [mailto:[EMAIL PROTECTED] Sent: Monday, September 12, 2005 12:35 PM To: Apache AXIS C User List Subject: RE: Trying to run simple Calculator sample client program Hi Kon Kam King, I have just downloaded xerces_2_2_0 from http://archive.apache.org/dist/xml/xerces-c/Xerces-C_2_2_0/ (incidentally, http://archive.apache.org/dist/xml/xerces-c/ contains all of the builds from the original 1_0_0 !). Regards, Fred Preston. "Kon Kam King, France" <[EMAIL PROTECTED]> 09/09/2005 04:42 PM Please respond to "Apache AXIS C User List" To: "Apache AXIS C User List" cc: Subject: RE: Trying to run simple Calculator sample client program Fred, Thanks for your answer. I am having trouble opening the xerces-c_2_2_0 from the archive site. Could you please send me a copy of xerces-c_2_2_0.dll Thanks, France From: Fred Preston [mailto:[EMAIL PROTECTED] Sent: Friday, September 09, 2005 3:14 PM To: Apache AXIS C User List Subject: RE: Trying to run simple Calculator sample client program Hi Kon Kam King, All of the DLLs (LIBs for Linux & AIX) must be on the path. Don't forget that XERCES also needs to be on the path as does OpenSSL (if you are using SSL). Reference to the
RE: Trying to run simple Calculator sample client program
Hi Kon Kam King, I have just downloaded xerces_2_2_0 from http://archive.apache.org/dist/xml/xerces-c/Xerces-C_2_2_0/ (incidentally, http://archive.apache.org/dist/xml/xerces-c/ contains all of the builds from the original 1_0_0 !). Regards, Fred Preston. "Kon Kam King, France" <[EMAIL PROTECTED]> 09/09/2005 04:42 PM Please respond to "Apache AXIS C User List" To: "Apache AXIS C User List" cc: Subject: RE: Trying to run simple Calculator sample client program Fred, Thanks for your answer. I am having trouble opening the xerces-c_2_2_0 from the archive site. Could you please send me a copy of xerces-c_2_2_0.dll Thanks, France From: Fred Preston [mailto:[EMAIL PROTECTED] Sent: Friday, September 09, 2005 3:14 PM To: Apache AXIS C User List Subject: RE: Trying to run simple Calculator sample client program Hi Kon Kam King, All of the DLLs (LIBs for Linux & AIX) must be on the path. Don't forget that XERCES also needs to be on the path as does OpenSSL (if you are using SSL). Reference to the 'parser library' means that it can't find xerces. Be sure that you have the correct version of xerces and it is on the PATH environment variable (all this information should either be in the documentation or web site (i.e for xerces, I use xerces-c_2_2_0.dll). Regards, Fred Preston. "Kon Kam King, France" <[EMAIL PROTECTED]> 09/09/2005 10:49 Please respond to "Apache AXIS C User List" To: "Apache AXIS C User List" cc: Subject: RE: Trying to run simple Calculator sample client program When I run outside of debugger, I get the error: DLOPEN failed in loading parser library. The procedure being executed is : Calculator::Calculator(const char* pchEndpointUri, AXIS_PROTOCOL_TYPE eProtocol) :Stub(pchEndpointUri, eProtocol) { } Is the parser Xerces lib missing or in error? How do I check that? Can somebody help? Thanks -Original Message- From: Kon Kam King, France Sent: Monday, September 05, 2005 4:15 PM To: 'Apache AXIS C User List' Subject: Trying to run simple Calculator sample client program I have built the Calculator sample with Vc++ with Axis-C 1.5. I run the client under the debugger, and I get the following At execution of line 79 Calculator ws (endpoint): 'Calculator_D.exe': Loaded 'C:\axis-c-1.5\axis-c-1-5-win32\bin\Calculator_D.exe', Symbols loaded. 'Calculator_D.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll', No symbols loaded. 'Calculator_D.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll', No symbols loaded. 'Calculator_D.exe': Loaded 'C:\axis-c-1.5\axis-c-1-5-win32\bin\AxisClient.dll', No symbols loaded. 'Calculator_D.exe': Loaded 'C:\WINDOWS\system32\msvcp60.dll', No symbols loaded. 'Calculator_D.exe': Loaded 'C:\WINDOWS\system32\msvcrt.dll', No symbols loaded. HEAP[Calculator_D.exe]: Invalid Address specified to RtlFreeHeap( 0031, 10080F0C ) Unhandled exception at 0x7c822583 in Calculator_D.exe: User breakpoint. First-chance exception at 0x77e55dea in Calculator_D.exe: Microsoft C++ exception: axiscpp::AxisEngineException @ 0x0012f8b4. First-chance exception at 0x77e55dea in Calculator_D.exe: Microsoft C++ exception: [rethrow] @ 0x. The program '[5144] Calculator_D.exe: Native' has exited with code 0 (0x0). What's wrong or missing? Thanks, France
RE: Trying to run simple Calculator sample client program
Hi Kon Kam King, All of the DLLs (LIBs for Linux & AIX) must be on the path. Don't forget that XERCES also needs to be on the path as does OpenSSL (if you are using SSL). Reference to the 'parser library' means that it can't find xerces. Be sure that you have the correct version of xerces and it is on the PATH environment variable (all this information should either be in the documentation or web site (i.e for xerces, I use xerces-c_2_2_0.dll). Regards, Fred Preston. "Kon Kam King, France" <[EMAIL PROTECTED]> 09/09/2005 10:49 Please respond to "Apache AXIS C User List" To: "Apache AXIS C User List" cc: Subject: RE: Trying to run simple Calculator sample client program When I run outside of debugger, I get the error: DLOPEN failed in loading parser library. The procedure being executed is : Calculator::Calculator(const char* pchEndpointUri, AXIS_PROTOCOL_TYPE eProtocol) :Stub(pchEndpointUri, eProtocol) { } Is the parser Xerces lib missing or in error? How do I check that? Can somebody help? Thanks -Original Message- From: Kon Kam King, France Sent: Monday, September 05, 2005 4:15 PM To: 'Apache AXIS C User List' Subject: Trying to run simple Calculator sample client program I have built the Calculator sample with Vc++ with Axis-C 1.5. I run the client under the debugger, and I get the following At execution of line 79 Calculator ws (endpoint): 'Calculator_D.exe': Loaded 'C:\axis-c-1.5\axis-c-1-5-win32\bin\Calculator_D.exe', Symbols loaded. 'Calculator_D.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll', No symbols loaded. 'Calculator_D.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll', No symbols loaded. 'Calculator_D.exe': Loaded 'C:\axis-c-1.5\axis-c-1-5-win32\bin\AxisClient.dll', No symbols loaded. 'Calculator_D.exe': Loaded 'C:\WINDOWS\system32\msvcp60.dll', No symbols loaded. 'Calculator_D.exe': Loaded 'C:\WINDOWS\system32\msvcrt.dll', No symbols loaded. HEAP[Calculator_D.exe]: Invalid Address specified to RtlFreeHeap( 0031, 10080F0C ) Unhandled exception at 0x7c822583 in Calculator_D.exe: User breakpoint. First-chance exception at 0x77e55dea in Calculator_D.exe: Microsoft C++ exception: axiscpp::AxisEngineException @ 0x0012f8b4. First-chance exception at 0x77e55dea in Calculator_D.exe: Microsoft C++ exception: [rethrow] @ 0x. The program '[5144] Calculator_D.exe: Native' has exited with code 0 (0x0). What's wrong or missing? Thanks, France
Fw: Closing a secure channel
Hi Bruce, Using your own SSL puts your problem too far out of scope for me to really know what is going on and to be able to provide useful support. It sounds like you are doing the right sort of things, but as I do not have your environment or bespoke transport/channel code I feel that there is not a lot more I can help you with at this time... Best regards, Fred Preston. Bruce McHaffie <[EMAIL PROTECTED]> 07/25/2005 06:23 PM Please respond to "Apache AXIS C User List" To: "'Apache AXIS C User List'" cc: Subject: RE: Closing a secure channel Hi Fred, very sorry for not replying sooner. I bought a dog and then went on vacation, and then went to the JavaOne conference. :-) A1. Yes, I am using a different (not OpenSSL) library for this. I had to write an adapter layer to match your API. A2. Let me describe my application first: In my scenario the Axis client is being called by a multithreaded application. libaxis_cpp.so gets loaded once at startup, then multiple call objects are instantiated simultaneously on different threads (all pointing to the same web service). If the target protocol is https, then each call object loads my SSL channel module, which in effect is only loaded once, and passes in the socket it wants protected. Then the call objects start writing to and reading from their respective sockets. So, I guess what you say to avoid ("do not try to have simultaneous SSL communication on different threads") is exactly what I am doing :-(. But unlike OpenSSL, the SSL library I am using (from Entrust) does support multithreading. Am I right in thinking that the Axis client (and the Axis2 transport layer) supports multithreading against a single web service? If it does, then shouldn't I be able to use a threadsafe SSL library to set up multiple simultaneous SSL connections? Or am I just inviting problems with this design? As for the pool -- the issue for me was that when the call object passes data to the SSL library (or reads data from it), I need to know which instance is making the call. It would be nice if I could rely on the socket descriptor, but that is not passed in the call to SSLRead (or closeSSLChannel for that matter). So my workaround is to keep a list of thread IDs and open sockets in my SSL library. When a thread comes in to read or write I use the thread ID to fish out the correct socket descriptor. This list of socket descriptors indexed by thread IDs is what I call the "pool". Probably not a good term for it. As an aside I actually started out nailing up a single SSL connection and synchronizing access to it, but ran into problems with the Apache connector, which seemed unable to keep both sides of its connection (one to the client and one to the app server) alive. Also the socket==0 idea didn't work because the pSock variable I was holding onto gets released when the call is destroyed. Instead I changed the destructor of the SecureChannel class to close the channel. Bruce. -Original Message- From: Fred Preston [mailto:[EMAIL PROTECTED] Sent: June 22, 2005 6:23 AM To: Apache AXIS C User List Subject: RE: Closing a secure channel Hi Bruce, Just reading your email. I'm having difficulty trying to get my head around your solution... I was wondering if you could explain in more detail the following bits:- 'my SSL library' Q1. Do you have your own SSLLibrary (i.e. different from OpenSSL?) 'socket == 0 on all existing connection objects (which I keep in a pool)' Q2. To have access to the socket (m_Sock) you need to have added code in channel.cpp/SecureChannel.cpp. In the base code, there can only be one socket open per instance of the channel object. Every time that Axis2Transport::flushOutput() is called, the open() method will be called in the channel instance (normal or secure). SecureChannel::open() ends up calling Channel::open() that will close down the previously open socket before creating a new socket of the appropriate type. Thus there is no need to keep a pool of sockets for a channel, because only one will ever be active. (Where are you keeping the 'pool' and what are connection objects?) If you have more than one web service active then you can have multiple instances of a channel object. Each object will have its own active socket. In this case you will have multiple active sockets. I believe that OpenSSL is not multi-threaded and requires mutexes. These have not been used on Axis2 so you will have to be careful that you do not try to have simultaneous SSL communication on different threads as this may lead to unexpected behaviour. Regards, Fred Preston. Bruce McHaffie <[EMAIL PROTECTED]> 06/20/2005 03:38 PM Please respond to "Apache AXIS C User List" To: "'Apache AXIS C Use
RE: Closing a secure channel
Hi Bruce, Just reading your email. I'm having difficulty trying to get my head around your solution... I was wondering if you could explain in more detail the following bits:- 'my SSL library' Q1. Do you have your own SSLLibrary (i.e. different from OpenSSL?) 'socket == 0 on all existing connection objects (which I keep in a pool)' Q2. To have access to the socket (m_Sock) you need to have added code in channel.cpp/SecureChannel.cpp. In the base code, there can only be one socket open per instance of the channel object. Every time that Axis2Transport::flushOutput() is called, the open() method will be called in the channel instance (normal or secure). SecureChannel::open() ends up calling Channel::open() that will close down the previously open socket before creating a new socket of the appropriate type. Thus there is no need to keep a pool of sockets for a channel, because only one will ever be active. (Where are you keeping the 'pool' and what are connection objects?) If you have more than one web service active then you can have multiple instances of a channel object. Each object will have its own active socket. In this case you will have multiple active sockets. I believe that OpenSSL is not multi-threaded and requires mutexes. These have not been used on Axis2 so you will have to be careful that you do not try to have simultaneous SSL communication on different threads as this may lead to unexpected behaviour. Regards, Fred Preston. Bruce McHaffie <[EMAIL PROTECTED]> 06/20/2005 03:38 PM Please respond to "Apache AXIS C User List" To: "'Apache AXIS C User List'" cc: Subject: RE: Closing a secure channel Thanks Fred. I will fix up the destructor. My original problem was that my SSL library didn't get notified when the channel closed a socket. I'm working around that now by testing for socket == 0 on all existing connection objects (which I keep in a pool) whenever openSSLConnection() gets called. It's not pretty, but seems to work so far. If you can think of a reason why this would fail embarassingly please let me know :-). Bruce. -Original Message- From: Fred Preston [mailto:[EMAIL PROTECTED] Sent: June 17, 2005 6:23 AM To: Apache AXIS C User List Subject: RE: Closing a secure channel Hi Bruce, You're right. Axis2 SSL was a bit of a mess and that's why it was dropped. It works, but is untidy and unfinished. Looking at the Axis2Transport code, the currently loaded channel will be deleted (and it's destructor called) when the Axis2Transport is deleted (i.e when the web service is deleted). The openConnection and closeConnection do very little in Axis2Transport and unfortunately do not communicate with the underlying channel. I was hoping that there might be a 'back door' to getting the channel object and then be able to call methods on it, but there is not... Just to recap, all of the channel close socket communication happens on the destructor (as it does in channel::~Channel()). This is missing from the SSL channel. Thus, when the web service is deleted, the Axis2Transport will delete the currently active channel (before being deleted itself). This will call the channel destructor and if it is an SSL channel nothing happens because the destructor is empty. This will leave the SSL library open causing memory leaks. The only solution to your problem is, if you have the OpenSSLChannel project, add 'closeSecureSocket();' to the empty destructor method and rebuild. Regards, Fred Preston. Bruce McHaffie <[EMAIL PROTECTED]> 06/16/2005 04:24 PM Please respond to "Apache AXIS C User List" To: "'Apache AXIS C User List'" cc: Subject: RE: Closing a secure channel Hi Fred, thanks for the reply. That would work, except the destructor for the secure channel object (derived from Channel) is empty too. So when the channel object is destroyed in the transport destructor, the secure channel destructor gets called but doesn't do anything. So closeSSLChannel() doesn't get called when the transport object disappears. Neither does destroySSLChannelObject(), which is a shame because it would give my SSL library a chance to clean up after itself. In fact I'm not sure the SSL library gets unloaded at all. Or again, maybe I'm missing something. Bruce. PS: I'm looking at 1.5 now, but for this release I'm stuck with 1.4. -Original Message- From: Fred Preston [mailto:[EMAIL PROTECTED] Sent: June 16, 2005 6:08 AM To: Apache AXIS C User List Subject: Re: Closing a secure channel Hi Bruce, You should now be using AXIS3 transport. The reason why the method is empty is because the socket was not closed unt
RE: Closing a secure channel
Hi Bruce, You're right. Axis2 SSL was a bit of a mess and that's why it was dropped. It works, but is untidy and unfinished. Looking at the Axis2Transport code, the currently loaded channel will be deleted (and it's destructor called) when the Axis2Transport is deleted (i.e when the web service is deleted). The openConnection and closeConnection do very little in Axis2Transport and unfortunately do not communicate with the underlying channel. I was hoping that there might be a 'back door' to getting the channel object and then be able to call methods on it, but there is not... Just to recap, all of the channel close socket communication happens on the destructor (as it does in channel::~Channel()). This is missing from the SSL channel. Thus, when the web service is deleted, the Axis2Transport will delete the currently active channel (before being deleted itself). This will call the channel destructor and if it is an SSL channel nothing happens because the destructor is empty. This will leave the SSL library open causing memory leaks. The only solution to your problem is, if you have the OpenSSLChannel project, add 'closeSecureSocket();' to the empty destructor method and rebuild. Regards, Fred Preston. Bruce McHaffie <[EMAIL PROTECTED]> 06/16/2005 04:24 PM Please respond to "Apache AXIS C User List" To: "'Apache AXIS C User List'" cc: Subject: RE: Closing a secure channel Hi Fred, thanks for the reply. That would work, except the destructor for the secure channel object (derived from Channel) is empty too. So when the channel object is destroyed in the transport destructor, the secure channel destructor gets called but doesn't do anything. So closeSSLChannel() doesn't get called when the transport object disappears. Neither does destroySSLChannelObject(), which is a shame because it would give my SSL library a chance to clean up after itself. In fact I'm not sure the SSL library gets unloaded at all. Or again, maybe I'm missing something. Bruce. PS: I'm looking at 1.5 now, but for this release I'm stuck with 1.4. -Original Message- From: Fred Preston [mailto:[EMAIL PROTECTED] Sent: June 16, 2005 6:08 AM To: Apache AXIS C User List Subject: Re: Closing a secure channel Hi Bruce, You should now be using AXIS3 transport. The reason why the method is empty is because the socket was not closed until you deleted the web service which in turn would call the destructor on the transport object, closing and then deleting the channel object. Regards, Fred Preston. Bruce McHaffie <[EMAIL PROTECTED]> 06/15/2005 08:30 PM Please respond to "Apache AXIS C User List" To: "'Apache AXIS C User List'" cc: Subject: Closing a secure channel A 1.4 question for you: in axis2/SecureChannel.cpp the close() method doesn't do anything. Shouldn't it at least close the connection that is opened in the open() method? For instance: void SecureChannel::close() { m_pSSLChannel->closeSSLChannel() } Or am I missing something here? Thanks, Bruce.
Re: Closing a secure channel
Hi Bruce, You should now be using AXIS3 transport. The reason why the method is empty is because the socket was not closed until you deleted the web service which in turn would call the destructor on the transport object, closing and then deleting the channel object. Regards, Fred Preston. Bruce McHaffie <[EMAIL PROTECTED]> 06/15/2005 08:30 PM Please respond to "Apache AXIS C User List" To: "'Apache AXIS C User List'" cc: Subject: Closing a secure channel A 1.4 question for you: in axis2/SecureChannel.cpp the close() method doesn't do anything. Shouldn't it at least close the connection that is opened in the open() method? For instance: void SecureChannel::close() { m_pSSLChannel->closeSSLChannel() } Or am I missing something here? Thanks, Bruce.
RE: Axis C++ SSL problem
Hi Popa, I'm not familiar with IS, but it may well be that environment variables set whilst the current instance of IS is running will not be 'seen' by IS until it is run again. I know that if you change environment variables whilst running some programs they will not pick up the changes until they are next run (MSVC is definitely one such application). You will have to read the IS manuals to see if there is any information/examples on this subject... Regards, Fred Preston. Popa Horia <[EMAIL PROTECTED]> 05/24/2005 04:21 PM Please respond to "Apache AXIS C User List" To: "'Apache AXIS C User List'" cc: Subject: RE: Axis C++ SSL problem By unusual way I ment: create the conf file and the environment variable. It wasn't so easy for me to figure this out. It wasn't easy because I didn't use the conf file and without looking into the code i would never figure out how to do it. Still this doesn't solve me the issue of changing the environment for the AxisClient.dll: - I run the installer - I set the environment variable to point to the temp directory - I generate the conf file in the temp directory - Make a call to the Webservice. To set the environment variable I use SetEnvironmentVariable .The problem is that it seems like the AxisClient DLL doesn't see this variable. I know that each process gets a copy of the environment from the parent process. I don't know why this isn't working for DLLs. Any ideas ? Axis uses genenv call from C++ Runtime to read the AXISCPP_DEPLOY variable. From: Fred Preston [mailto:[EMAIL PROTECTED] Sent: 24 mai 2005 17:50 To: Apache AXIS C User List Subject: RE: Axis C++ SSL problem Hi Popa, This is something we are looking into (i.e. being able to set configuration information from the client application), but unfortunately, there are no commands at present to do this. Thus, you are stuck with having to configure Axis through the axiscpp.conf file :-(. If at all possible, could you elaborate on the unusual steps you have taken to get SSL working (in your e-mail you say, "AXIS works with SSL but you have to set it in a very unusual way.")? Regards, Fred Preston. Popa Horia <[EMAIL PROTECTED]> 05/24/2005 02:22 PM Please respond to "Apache AXIS C User List" To: "'Apache AXIS C User List'" cc: Subject: RE: Axis C++ SSL problem It got, thank you. Here is the ISSUE: i'm creating an installer with InstallShield. InstallShield decompress the files in a temporary directory. Now I have to set the environment variable AXISCPP_DEPLOY to point to the directory where Axis can find axiscpp.conf. This make things a little harder. It would be nice if you could specify with an API call the HTTPS DLL. To make things clear: AXIS works with SSL but you have to set it in a very unusual way. Thanks From: Fred Preston [mailto:[EMAIL PROTECTED] Sent: 24 mai 2005 15:36 To: axis-c-user@ws.apache.org Subject: Fw: Axis C++ SSL problem Hi Popa, I don't know if this message got through... Regards, Fred Preston. - Forwarded by Fred Preston/UK/IBM on 05/24/2005 01:33 PM ----- Fred Preston 05/24/2005 10:55 AM To: axis-c-user@ws.apache.org cc: From: Fred Preston/UK/[EMAIL PROTECTED] Subject: Axis C++ SSL problem Hi Popa, There could be several reasons why SSL is not working for you... The SSL channel library is only loaded when it is declared in the axiscpp.conf file. Check that your axiscpp.conf file contains the following line:- Channel_HTTP_SSL:\bin\HTTPGSKitChannel.dll When is the directory where you have installed Axis. You do not mention what type of exception is caught by your application. You should have a try...catch block around the web services code. Here is an example of the type of exception handling you should be using... try { WebService ws( pszEndpoint); cout << "WebService test returns " << ws.test( 0) << endl; } catch( SoapFaultException& sfe) { // Catch any SOAP fault cout << "SoapFaultException: " << sfe.getFaultCode() << " " << sfe.what() << endl; } catch( AxisException& e) { // Catch an AXIS exception cout << "AxisException: " << e.getExceptionCode() << " " << e.what() << endl; } catch( exception& e) { // Catch a general exception cout << "Unknown Exception: " << e.what() << endl; } catch( ...) { // Catch any other exception cout << "Unspecified Ex
RE: Axis C++ SSL problem
Hi Popa, This is something we are looking into (i.e. being able to set configuration information from the client application), but unfortunately, there are no commands at present to do this. Thus, you are stuck with having to configure Axis through the axiscpp.conf file :-(. If at all possible, could you elaborate on the unusual steps you have taken to get SSL working (in your e-mail you say, "AXIS works with SSL but you have to set it in a very unusual way.")? Regards, Fred Preston. Popa Horia <[EMAIL PROTECTED]> 05/24/2005 02:22 PM Please respond to "Apache AXIS C User List" To: "'Apache AXIS C User List'" cc: Subject: RE: Axis C++ SSL problem It got, thank you. Here is the ISSUE: i'm creating an installer with InstallShield. InstallShield decompress the files in a temporary directory. Now I have to set the environment variable AXISCPP_DEPLOY to point to the directory where Axis can find axiscpp.conf. This make things a little harder. It would be nice if you could specify with an API call the HTTPS DLL. To make things clear: AXIS works with SSL but you have to set it in a very unusual way. Thanks From: Fred Preston [mailto:[EMAIL PROTECTED] Sent: 24 mai 2005 15:36 To: axis-c-user@ws.apache.org Subject: Fw: Axis C++ SSL problem Hi Popa, I don't know if this message got through... Regards, Fred Preston. - Forwarded by Fred Preston/UK/IBM on 05/24/2005 01:33 PM - Fred Preston 05/24/2005 10:55 AM To: axis-c-user@ws.apache.org cc: From: Fred Preston/UK/[EMAIL PROTECTED] Subject: Axis C++ SSL problem Hi Popa, There could be several reasons why SSL is not working for you... The SSL channel library is only loaded when it is declared in the axiscpp.conf file. Check that your axiscpp.conf file contains the following line:- Channel_HTTP_SSL:\bin\HTTPGSKitChannel.dll When is the directory where you have installed Axis. You do not mention what type of exception is caught by your application. You should have a try...catch block around the web services code. Here is an example of the type of exception handling you should be using... try { WebService ws( pszEndpoint); cout << "WebService test returns " << ws.test( 0) << endl; } catch( SoapFaultException& sfe) { // Catch any SOAP fault cout << "SoapFaultException: " << sfe.getFaultCode() << " " << sfe.what() << endl; } catch( AxisException& e) { // Catch an AXIS exception cout << "AxisException: " << e.getExceptionCode() << " " << e.what() << endl; } catch( exception& e) { // Catch a general exception cout << "Unknown Exception: " << e.what() << endl; } catch( ...) { // Catch any other exception cout << "Unspecified Exception: " << endl; } Try these first and see how you get on... It could be the problem lies elsewhere, but any exception thrown will help to narrow the search area :-) Regards, Fred Preston. >is anyone there who can give me a clue Please > > _ > >From: Popa Horia [mailto:[EMAIL PROTECTED] >Sent: 23 mai 2005 10:37 >To: 'axis-c-user@ws.apache.org' >Subject: RE: Axis C++ SSL problem > > >I have to mention that i have user Axis 1.5 and Axis 1.6 20 May nightly >build > > _ > >From: Popa Horia [mailto:[EMAIL PROTECTED] >Sent: 21 mai 2005 10:09 >To: 'axis-c-user@ws.apache.org' >Subject: Axis C++ SSL problem > > > > Hi there, > > > I have a Java Axis server and i'm trying to connect with a stub >written in C++. It works fine on http but it failes on https. >I see when I run the program in debug mode that the HttpSSLChannel is never >loaded. The application failes at this line in the Stub: if (AXIS_SUCCESS != >m_pCall->initialize(CPP_DOC_PROVIDER)) return pReturn; > My Tomcat server is behind Apache 1.3.1 and i'm using MOD_JK to make >those applications talk to each other. My guess is that the request never >leaves my client. To prove this I have used a network sniffer and indeed, >the client dies before any request is sent to the server. Maybe I don't have >all the DDLs ?? I have installed openssl > The client runs on Windows. > > > Any help is appeciated. > > > thanks > > > > > > > >AEROSPACE INFORMATION CO., LTD. > virus-free and secure email >
Fw: Axis C++ SSL problem
Hi Popa, I don't know if this message got through... Regards, Fred Preston. - Forwarded by Fred Preston/UK/IBM on 05/24/2005 01:33 PM - Fred Preston 05/24/2005 10:55 AM To: axis-c-user@ws.apache.org cc: From: Fred Preston/UK/[EMAIL PROTECTED] Subject: Axis C++ SSL problem Hi Popa, There could be several reasons why SSL is not working for you... The SSL channel library is only loaded when it is declared in the axiscpp.conf file. Check that your axiscpp.conf file contains the following line:- Channel_HTTP_SSL:\bin\HTTPGSKitChannel.dll When is the directory where you have installed Axis. You do not mention what type of exception is caught by your application. You should have a try...catch block around the web services code. Here is an example of the type of exception handling you should be using... try { WebService ws( pszEndpoint); cout << "WebService test returns " << ws.test( 0) << endl; } catch( SoapFaultException& sfe) { // Catch any SOAP fault cout << "SoapFaultException: " << sfe.getFaultCode() << " " << sfe.what() << endl; } catch( AxisException& e) { // Catch an AXIS exception cout << "AxisException: " << e.getExceptionCode() << " " << e.what() << endl; } catch( exception& e) { // Catch a general exception cout << "Unknown Exception: " << e.what() << endl; } catch( ...) { // Catch any other exception cout << "Unspecified Exception: " << endl; } Try these first and see how you get on... It could be the problem lies elsewhere, but any exception thrown will help to narrow the search area :-) Regards, Fred Preston. >is anyone there who can give me a clue Please > > _ > >From: Popa Horia [mailto:[EMAIL PROTECTED] >Sent: 23 mai 2005 10:37 >To: 'axis-c-user@ws.apache.org' >Subject: RE: Axis C++ SSL problem > > >I have to mention that i have user Axis 1.5 and Axis 1.6 20 May nightly >build > > _ > >From: Popa Horia [mailto:[EMAIL PROTECTED] >Sent: 21 mai 2005 10:09 >To: 'axis-c-user@ws.apache.org' >Subject: Axis C++ SSL problem > > > > Hi there, > > > I have a Java Axis server and i'm trying to connect with a stub >written in C++. It works fine on http but it failes on https. >I see when I run the program in debug mode that the HttpSSLChannel is never >loaded. The application failes at this line in the Stub: if (AXIS_SUCCESS != >m_pCall->initialize(CPP_DOC_PROVIDER)) return pReturn; > My Tomcat server is behind Apache 1.3.1 and i'm using MOD_JK to make >those applications talk to each other. My guess is that the request never >leaves my client. To prove this I have used a network sniffer and indeed, >the client dies before any request is sent to the server. Maybe I don't have >all the DDLs ?? I have installed openssl > The client runs on Windows. > > > Any help is appeciated. > > > thanks > > > > > > > >AEROSPACE INFORMATION CO., LTD. > virus-free and secure email >
RE: RE: Axis C++ SSL problem
Hi Popa, To use SSL you have to have the SSL HTTP channel library. To use SSL you must specify it in the axiscpp.conf file. Your client application code does not need to change to use SSL. Axis looks at the URL and if you have specified https rather than http, then it will assume that you required SSL. Regards, Fred Preston. List: axis-c-user Subject: RE: RE: Axis C++ SSL problem From: Popa Horia Date: 2005-05-24 11:36:28 Message-ID: <429311bc.19103944.63ba.a31b () mx ! gmail ! com> [Download message RAW] I have tried that way too. The problem is that in the Call.cpp things are hardcoded. Axis will always look into [AXISCPP_DEPLOY]\axiscpp.conf for the key \ Channel_HTTP_SSL. If it doesn't file that key you cannot use SSL. NOTE: AXISCPP_DEPLOY - environment variable My axiscpp.conf: Channel_HTTP_SSL:C:\myprojects\axis-c-1-5-win32\bin\HTTPSSLChannel.d \ ll -Original Message- From: huagang [mailto:[EMAIL PROTECTED] Sent: 24 mai 2005 03:51 To: Apache AXIS C User List Subject: Re: RE: Axis C++ SSL problem I guess you should use the other constructor, StockQuoteService(const char* pchEndpointUri, AXIS_PROTOCOL_TYPE \ eProtocol=APTHTTP1_1); \ -         致 ç¤¼ï¼ â•ï¸¿ï¸¿ï¸¿â•®   huagang {/-â—Žâ—Ž-\}   [EMAIL PROTECTED] ( (oo) )   2005-05-24 ︶ 62125151-6226 æ‰æ™ºï¼Œå¾·ä¹‹èµ„也;德者,æ‰ä¹‹å¸ˆä¹Ÿ === 2005-05-23 20:35:04 您在æ¥ä¿¡ä¸å†™é“:=== > is anyone there who can give me a clue Please > > _ > > From: Popa Horia [mailto:[EMAIL PROTECTED] > Sent: 23 mai 2005 10:37 > To: 'axis-c-user@ws.apache.org' > Subject: RE: Axis C++ SSL problem > > > I have to mention that i have user Axis 1.5 and Axis 1.6 20 May nightly > build > > _ > > From: Popa Horia [mailto:[EMAIL PROTECTED] > Sent: 21 mai 2005 10:09 > To: 'axis-c-user@ws.apache.org' > Subject: Axis C++ SSL problem > > > > Hi there, > > > I have a Java Axis server and i'm trying to connect with a stub > written in C++. It works fine on http but it failes on https. > I see when I run the program in debug mode that the HttpSSLChannel is > never loaded. The application failes at this line in the Stub: if > (AXIS_SUCCESS != > m_pCall->initialize(CPP_DOC_PROVIDER)) return pReturn; > My Tomcat server is behind Apache 1.3.1 and i'm using MOD_JK to > make those applications talk to each other. My guess is that the > request never leaves my client. To prove this I have used a network > sniffer and indeed, the client dies before any request is sent to the > server. Maybe I don't have all the DDLs ?? I have installed openssl > The client runs on Windows. > > > Any help is appeciated. > > > thanks > > > > > > > > AEROSPACE銆€INFORMATION銆€CO., LTD. > virus-free and secure email > = = = = = = = = = = = = = = = = = = = = AEROSPACE INFORMATION CO., LTD. virus-free and secure email