Re: Configuring from Axis2.xml
vamsi krishna wrote: Hi Friends, In the src/core/engine/conf.c file we have the function by name axis2_conf_create, in which the phases are created and the respective handlers/dispatchers are being added. Here, I noticed that the phase names are being hardcoded and not being taken from the axis2.xml which is meant to cconfigure the name of the phases and other details. Can any one tell me the reason behind this hardcoding? Please also let me know why are the phase names not being taken from the axis2.xml. Why are you interested in this? I am curious about your use case? Samisa... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Why must the AXIS2C_HOME / client_home be set when using a client?
Supun Kamburugamuva wrote: Hi, AFAIK you don't need to specify the AXIS2C_HOME as an environment variable. Correct. All that is required is to provide the repo location. Using AXIS2C_HOME is only one way of doing that. Samisa... If you know where it is you can specify it when you create the client. Internally Axis2/C never use the AXISC_HOME environment variable. Axis2/C picks its configuration from this AXIS2C_HOME (I'm not referring to the env variable). It looks for the axis2.xml and modules folder in this location. So if you have modules like addressing, rampart you should put it under AXIS2C_HOME/modules folder. For the client side modules folder and axis2.xml are the only things that should be in the AXIS2C_HOME directory. Supun.. On Wed, Jul 2, 2008 at 12:48 PM, Lasse Knudsen [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hi, I am new to Axis2/C and I am trying to write a small client to verify if Axis2/C is fitting my needs. But what I am not understanding is why I need to set the AXIS2C_HOME for the client_home in my client code? My structure looks like: client folder | -- client.exe -- axiom.dll -- axis2_engine.dll -- etc. (all needed DLLs) When I am also setting the AXIS2C_HOME pointing to the Axis2/C repository then I have the DLLs twice on my harddrive drive. Isn't there a way to use a client only with the needed DLLs next to the client.exe? Why is the repository needed for the client? I don't want to install the whole Axis2/C repository when I am only using a client. Regards Lasse - To unsubscribe, e-mail: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] No virus found in this incoming message. Checked by AVG. Version: 8.0.101 / Virus Database: 270.4.3/1529 - Release Date: 7/1/2008 7:23 PM -- Samisa Abeysinghe Director, Engineering; WSO2 Inc. http://www.wso2.com/ - The Open Source SOA Company - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
SSL Client Authentication Failure
Hi, I am having trouble using an SSL Client with AXIS2C - basically, authentication appears to fail. I executed the following to obtain the server certificate... echo |\ openssl s_client -connect localhost:7547 21 |\ sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' cert.pem ..and got the following:- -BEGIN CERTIFICATE- MIIDFjCCAtSgAwIBAgIER6H2iDALBgcqhkjOOAQDBQAwbjEPMA0GA1UEBhMGQ2Fu YWRhMRAwDgYDVQQIEwdPbnRhcmlvMQ8wDQYDVQQHEwZPdHRhd2ExGDAWBgNVBAoT D05vcnRlbCBOZXR3b3JrczEMMAoGA1UECxMDSU1TMRAwDgYDVQQDEwdXTUc2MDAw MB4XDTA4MDEzMTE2MjU0NFoXDTA4MDQzMDE2MjU0NFowbjEPMA0GA1UEBhMGQ2Fu YWRhMRAwDgYDVQQIEwdPbnRhcmlvMQ8wDQYDVQQHEwZPdHRhd2ExGDAWBgNVBAoT D05vcnRlbCBOZXR3b3JrczEMMAoGA1UECxMDSU1TMRAwDgYDVQQDEwdXTUc2MDAw MIIBuDCCASwGByqGSM44BAEwggEfAoGBAP1/U4EddRIpUt9KnC7s5Of2EbdSPO9E AMMeP4C2USZpRV1AIlH7WT2NWPq/xfW6MPbLm1Vs14E7gB00b/JmYLdrmVClpJ+f 6AR7ECLCT7up1/63xhv4O1fnxqimFQ8E+4P208UewwI1VBNaFpEy9nXzrith1yrv 8iIDGZ3RSAHHAhUAl2BQjxUjC8yykrmCouuEC/BYHPUCgYEA9+GghdabPd7LvKtc NrhXuXmUr7v6OuqC+VdMCz0HgmdRWVeOutRZT+ZxBxCBgLRJFnEj6EwoFhO3zwky jMim4TwWeotUfI0o4KOuHiuzpnWRbqN/C/ohNWLx+2J6ASQ7zKTxvqhRkImog9/h WuWfBpKLZl6Ae1UlZAFMO/7PSSoDgYUAAoGBAJKVdCfsnmARwlgSMBKRLh4WyyzQ TubhCrNuu3qwZuCILkzmTk/kmH4uCkcFiZx5I7uYphlgkoVW2qHAZ5t17xhz30uD OilLCagWDPygT6wO2uZV1TruKmfEI7zYBGijDazNb2wV8wy1SwON38NC3nKeJf9X BgK6RCCGjcaa75FrMAsGByqGSM44BAMFAAMvADAsAhRWOjxC/Lpp/FGm+3QfLEUU NzoyvQIUfrBKhVVjCHNzuE4NxFb0zhluOMY= -END CERTIFICATE- My axis2.xml contents are... parameter name=SERVER_CERT/etc/nortel/apps/oam/configurationServer/security/cert.pem/parameter !--parameter name=KEY_FILE/path/to/client/certificate/chain/file/parameter-- !--parameter name=SSL_PASSPHRASEpassphrase/parameter-- The relevant logs as follows:- [Thu Jul 3 13:12:57 2008] [debug] http_transport_sender.c(246) ctx_epr: https://localhost:7547/services/ConfigurationServer [Thu Jul 3 13:12:57 2008] [debug] http_transport_sender.c(768) using axis2 native http sender. [Thu Jul 3 13:12:57 2008] [debug] http_sender.c(415) msg_ctx_id:484e90ce-4923-1dd1-20df-00145eecc23a [Thu Jul 3 13:12:57 2008] [info] [ssl client] Client certificate chain filenot specified [Thu Jul 3 13:12:57 2008] [debug] ssl/ssl_utils.c(190) [ssl client] SSL certificate verified against peer [Thu Jul 3 13:12:57 2008] [info] [ssl client] Client certificate chain filenot specified [Thu Jul 3 13:12:57 2008] [debug] ssl/ssl_utils.c(190) [ssl client] SSL certificate verified against peer [Thu Jul 3 13:12:57 2008] [error] http_sender.c(1293) HTTP Authentication failed [Thu Jul 3 13:12:57 2008] [error] http_sender.c(1399) Error occurred in transport [Thu Jul 3 13:12:57 2008] [error] engine.c(179) Transport sender invoke failed Any ideas or suggestions ? Many thanks. Andy
Axis2/C inside Eclipse
Hi, I am trying to learn about Axis2/C and I would like to use the Eclipse IDE since I am used to working with it in Java projects. Is there some documents regarding how to set an Eclipse project to work with Axis2/C inside Eclipse? I would like to try Axis2/C and its related projects (like Savan, Rampart, etc.) in the same environment. Any help would be greatly appreciated. Best regards, Mauricio Porto
Re: SSL Client Authentication Failure
Hi Andy, snip I am having trouble using an SSL Client with AXIS2C - basically, authentication appears to fail. [Thu Jul 3 13:12:57 2008] [debug] http_transport_sender.c(246) ctx_epr: https://localhost:7547/services/ConfigurationServer [Thu Jul 3 13:12:57 2008] [debug] http_transport_sender.c(768) using axis2 native http sender. [Thu Jul 3 13:12:57 2008] [debug] http_sender.c(415) msg_ctx_id:484e90ce-4923-1dd1-20df-00145eecc23a [Thu Jul 3 13:12:57 2008] [info] [ssl client] Client certificate chain filenot specified [Thu Jul 3 13:12:57 2008] [debug] ssl/ssl_utils.c(190) [ssl client] SSL certificate verified against peer [Thu Jul 3 13:12:57 2008] [info] [ssl client] Client certificate chain filenot specified [Thu Jul 3 13:12:57 2008] [debug] ssl/ssl_utils.c(190) [ssl client] SSL certificate verified against peer [Thu Jul 3 13:12:57 2008] [error] http_sender.c(1293) HTTP Authentication failed [Thu Jul 3 13:12:57 2008] [error] http_sender.c(1399) Error occurred in transport [Thu Jul 3 13:12:57 2008] [error] engine.c(179) Transport sender invoke failed snip The debug message SSL certificate verified against peer means that the SSL connection had successfully been established. However, the trouble you are having is about HTTP Authentication. Try pointing your browser to the URL provided, it should ask you for a username/password. That is a HTTP protocol level authentication mechanism which is different from SSL. You can provide HTTP authentication parameters as described in Axis2 Manual [1]. HTH. Dumindu. [1] http://ws.apache.org/axis2/c/docs/axis2c_manual.html#http_auth -- Dumindu Pallewela Cinergix - Share, Reuse, Innovate cinergix.com
Re: Axis2/C inside Eclipse
On Fri, Jul 4, 2008 at 12:18 AM, Mauricio Porto [EMAIL PROTECTED] wrote: Hi, I am trying to learn about Axis2/C and I would like to use the Eclipse IDE since I am used to working with it in Java projects. Is there some documents regarding how to set an Eclipse project to work with Axis2/C inside Eclipse? I would like to try Axis2/C and its related projects (like Savan, Rampart, etc.) in the same environment. Currently most of the developers are using vim, Microsoft Visual studio or Anjuta for developments works. AFAIK there is no any eclipse project for Axis2/C. And of course it'd be nice if we can have an eclipse project for Axis2/C. The information for available IDEs can be found here[1]. [1] - https://svn.apache.org/repos/asf/webservices/axis2/trunk/c/ides/ -Rajika Any help would be greatly appreciated. Best regards, Mauricio Porto -- comp.lang.c - http://groups.google.com/group/comp.lang.c/topics
Failed to load mod_rampart.dll
Hi, I am trying to add in authentication to my Axis2/c client. I downloaded the latest rampart C 1.2 and deployed to my axis2/c 1.4. I followed the samples from rampart C and added the following lines to my Axis2/C client. The client_home points to my Axis2/C installation: D:\Tools\axis2\axis2c-bin-1.4.0-win32 /*We need to specify the client's policy file location*/ if(client_home) { file_name = axutil_stracat(env, client_home, \\client_repo\\); policy_file = axutil_stracat(env, file_name, policy.xml ); AXIS2_FREE(env-allocator, file_name); file_name = NULL; }else{ printf(Client Home not Specified\n); printf(echo client invoke FAILED!\n); return 0; } /*Create the policy, from file*/ policy = neethi_util_create_policy_from_file(env, policy_file); if(policy_file){ AXIS2_FREE(env-allocator, policy_file); policy_file = NULL; } if(!policy) { printf(\nPolicy creation failed from the file. %s\n, policy_file); } stub = axis2_stub_create_SecureServiceService(env, client_home, address); if( NULL == stub ){ printf(Unable to create the stub with address='%s' and client_home='%s'.\n, address, client_home); if (env) { axutil_env_free((axutil_env_t *) env); env = NULL; } exit(1); } svc_client = axis2_stub_get_svc_client(stub, env ); options = axis2_stub_get_options( stub, env); if (NULL == options) { AXIS2_ERROR_SET(env-error, AXIS2_ERROR_INVALID_NULL_PARAM, AXIS2_FAILURE); AXIS2_LOG_ERROR(env-log, AXIS2_LOG_SI, options is null in stub); return NULL; } axis2_options_set_manage_session(options, env, AXIS2_TRUE); status = axis2_svc_client_set_policy(svc_client, env, policy); if(status == AXIS2_FAILURE) { printf(Policy setting failed\n); } The code seems to run smoothly, but I can't see the security header appear in the client request. I took at look at the log file generated and found that the rampart dll is not loaded correctly. --- [Thu Jul 03 15:23:33 2008] [debug] ..\..\src\core\deployment\dep_engine.c(1306) axis2_dep_engine_load_module_dll: DLL path is : D:\Tools\axis2\axis2c-bin-1.4.0-win32/modules/addressing/axis2_mod_addr.dll [Thu Jul 03 15:23:33 2008] [debug] ..\..\util\src\class_loader.c(141) Object loaded successfully [Thu Jul 03 15:23:33 2008] [debug] ..\..\src\core\deployment\dep_engine.c(1306) axis2_dep_engine_load_module_dll: DLL path is : D:\Tools\axis2\axis2c-bin-1.4.0-win32/modules/logging/axis2_mod_log.dll [Thu Jul 03 15:23:33 2008] [debug] ..\..\util\src\class_loader.c(141) Object loaded successfully [Thu Jul 03 15:23:33 2008] [debug] ..\..\src\core\deployment\dep_engine.c(1306) axis2_dep_engine_load_module_dll: DLL path is : D:\Tools\axis2\axis2c-bin-1.4.0-win32/modules/rampart/mod_rampart.dll [Thu Jul 03 15:23:33 2008] [error] ..\..\util\src\class_loader.c(161) dlerror reason: Something went wrong loading the DLL. If you happen to see this message, please note that getting the exact error form Windows is a TODO. And if possible please help fix it. :) [Thu Jul 03 15:23:33 2008] [error] ..\..\src\core\deployment\dep_engine.c(1424) Loading module description rampart failed [Thu Jul 03 15:23:33 2008] [error] ..\..\src\core\deployment\dep_engine.c(1588) Adding new module rampart to the deployment engine failed [Thu Jul 03 15:23:33 2008] [error] ..\..\src\core\deployment\repos_listener.c(136) Repository listener initialization failed [Thu Jul 03 15:23:33 2008] [debug] ..\..\src\core\phaseresolver\phase_holder.c(139) Add handler AddressingInHandler to phase Transport --- I verified that the dll does exist in the path indicated in the log file: D:\Tools\axis2\axis2c-bin-1.4.0-win32\modules\rampartdir Volume in drive D is Data Volume Serial Number is 40CF-E9CF Directory of D:\Tools\axis2\axis2c-bin-1.4.0-win32\modules\rampart 07/03/2008 02:22 PMDIR . 07/03/2008 02:22 PMDIR .. 09/19/2007 12:04 PM 515 module.xml 05/07/2008 05:13 PM 335,872 mod_rampart.dll 2 File(s)336,387 bytes 2 Dir(s) 56,762,257,408 bytes free Any idea how to troubleshoot or workaround the problem? Thanks! Yuan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Unable building Axis2C++ in VC6
Dear, I use the flowing direction to build Axis2c-1.4.0 client in VC6++ http://mail-archives.apache.org/mod_mbox/ws-axis-cvs/200803.mbox/[EMAIL PROTECTED] http://mail-archives.apache.org/mod_mbox/ws-axis-cvs/200803.mbox/[EMAIL PROTECTED] https://svn.apache.org/repos/asf/webservices/axis2/trunk/c/ides/vc6/axis2c/README.txt https://svn.apache.org/repos/asf/webservices/axis2/trunk/c/ides/vc6/axis2c/README.txt But i receive strange errors when generating axis2_engine.dll. Linking... Creating library Debug/axis2_engine.lib and object Debug/axis2_engine.exp http_transport_utils.obj : error LNK2001: unresolved external symbol [EMAIL PROTECTED] http_worker.obj : error LNK2001: unresolved external symbol [EMAIL PROTECTED] msg_ctx.obj : error LNK2001: unresolved external symbol [EMAIL PROTECTED] ../../../../build/deploy/lib/axis2_engine.dll : fatal error LNK1120: 2 unresolved externals Error executing link.exe. Now, i stuck with them. Could you please help me to solve this problem? Many Thanks, -- View this message in context: http://www.nabble.com/Unable-building-Axis2C%2B%2B-in-VC6-tp18271696p18271696.html Sent from the Axis - C++ - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Failed to load mod_rampart.dll
Yuan, Please check the following. -Whether you have engaged Rampart either pragmatically from your client code or in your axis2.xml -Whether the Security phase is there in your axis2.xml -Manjula. On Thu, 2008-07-03 at 15:52 -0700, yuanhuhu wrote: Hi, I am trying to add in authentication to my Axis2/c client. I downloaded the latest rampart C 1.2 and deployed to my axis2/c 1.4. I followed the samples from rampart C and added the following lines to my Axis2/C client. The client_home points to my Axis2/C installation: D:\Tools\axis2\axis2c-bin-1.4.0-win32 /*We need to specify the client's policy file location*/ if(client_home) { file_name = axutil_stracat(env, client_home, \\client_repo\\); policy_file = axutil_stracat(env, file_name, policy.xml ); AXIS2_FREE(env-allocator, file_name); file_name = NULL; }else{ printf(Client Home not Specified\n); printf(echo client invoke FAILED!\n); return 0; } /*Create the policy, from file*/ policy = neethi_util_create_policy_from_file(env, policy_file); if(policy_file){ AXIS2_FREE(env-allocator, policy_file); policy_file = NULL; } if(!policy) { printf(\nPolicy creation failed from the file. %s\n, policy_file); } stub = axis2_stub_create_SecureServiceService(env, client_home, address); if( NULL == stub ){ printf(Unable to create the stub with address='%s' and client_home='%s'.\n, address, client_home); if (env) { axutil_env_free((axutil_env_t *) env); env = NULL; } exit(1); } svc_client = axis2_stub_get_svc_client(stub, env ); options = axis2_stub_get_options( stub, env); if (NULL == options) { AXIS2_ERROR_SET(env-error, AXIS2_ERROR_INVALID_NULL_PARAM, AXIS2_FAILURE); AXIS2_LOG_ERROR(env-log, AXIS2_LOG_SI, options is null in stub); return NULL; } axis2_options_set_manage_session(options, env, AXIS2_TRUE); status = axis2_svc_client_set_policy(svc_client, env, policy); if(status == AXIS2_FAILURE) { printf(Policy setting failed\n); } The code seems to run smoothly, but I can't see the security header appear in the client request. I took at look at the log file generated and found that the rampart dll is not loaded correctly. --- [Thu Jul 03 15:23:33 2008] [debug] ..\..\src\core\deployment\dep_engine.c(1306) axis2_dep_engine_load_module_dll: DLL path is : D:\Tools\axis2\axis2c-bin-1.4.0-win32/modules/addressing/axis2_mod_addr.dll [Thu Jul 03 15:23:33 2008] [debug] ..\..\util\src\class_loader.c(141) Object loaded successfully [Thu Jul 03 15:23:33 2008] [debug] ..\..\src\core\deployment\dep_engine.c(1306) axis2_dep_engine_load_module_dll: DLL path is : D:\Tools\axis2\axis2c-bin-1.4.0-win32/modules/logging/axis2_mod_log.dll [Thu Jul 03 15:23:33 2008] [debug] ..\..\util\src\class_loader.c(141) Object loaded successfully [Thu Jul 03 15:23:33 2008] [debug] ..\..\src\core\deployment\dep_engine.c(1306) axis2_dep_engine_load_module_dll: DLL path is : D:\Tools\axis2\axis2c-bin-1.4.0-win32/modules/rampart/mod_rampart.dll [Thu Jul 03 15:23:33 2008] [error] ..\..\util\src\class_loader.c(161) dlerror reason: Something went wrong loading the DLL. If you happen to see this message, please note that getting the exact error form Windows is a TODO. And if possible please help fix it. :) [Thu Jul 03 15:23:33 2008] [error] ..\..\src\core\deployment\dep_engine.c(1424) Loading module description rampart failed [Thu Jul 03 15:23:33 2008] [error] ..\..\src\core\deployment\dep_engine.c(1588) Adding new module rampart to the deployment engine failed [Thu Jul 03 15:23:33 2008] [error] ..\..\src\core\deployment\repos_listener.c(136) Repository listener initialization failed [Thu Jul 03 15:23:33 2008] [debug] ..\..\src\core\phaseresolver\phase_holder.c(139) Add handler AddressingInHandler to phase Transport --- I verified that the dll does exist in the path indicated in the log file: D:\Tools\axis2\axis2c-bin-1.4.0-win32\modules\rampartdir Volume in drive D is Data Volume Serial Number is 40CF-E9CF Directory of D:\Tools\axis2\axis2c-bin-1.4.0-win32\modules\rampart 07/03/2008 02:22 PMDIR . 07/03/2008 02:22 PMDIR .. 09/19/2007 12:04 PM 515 module.xml 05/07/2008 05:13 PM 335,872 mod_rampart.dll 2 File(s)336,387 bytes 2 Dir(s) 56,762,257,408 bytes free Any
Re: Axis2/C inside Eclipse
On Fri, 2008-07-04 at 03:33 +0530, Rajika Kumarasiri wrote: On Fri, Jul 4, 2008 at 12:18 AM, Mauricio Porto [EMAIL PROTECTED] wrote: Hi, I am trying to learn about Axis2/C and I would like to use the Eclipse IDE since I am used to working with it in Java projects. Is there some documents regarding how to set an Eclipse project to work with Axis2/C inside Eclipse? I would like to try Axis2/C and its related projects (like Savan, Rampart, etc.) in the same environment. Currently there are no documentations on this. I have seen some developers using NetBeans , so Eclipse won't be a problem. Currently most of the developers are using vim, Microsoft Visual studio or Anjuta for developments works. AFAIK there is no any eclipse project for Axis2/C. And of course it'd be nice if we can have an eclipse project for Axis2/C. The information for available IDEs can be found here[1]. [1] - https://svn.apache.org/repos/asf/webservices/axis2/trunk/c/ides/ -Rajika Any help would be greatly appreciated. Best regards, Mauricio Porto -- comp.lang.c - http://groups.google.com/group/comp.lang.c/topics - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Failed to load mod_rampart.dll
Hi Yuan, This could also be a problem with openssl library. What is the version of openssl you are using? Are you using rampart binary version or source version? If it is binary version, it was compiled with openssl 0.9.8d. So you have to have either that version or version higher than that. Regards, Shankar. Manjula Peiris wrote: Yuan, Please check the following. -Whether you have engaged Rampart either pragmatically from your client code or in your axis2.xml -Whether the Security phase is there in your axis2.xml -Manjula. On Thu, 2008-07-03 at 15:52 -0700, yuanhuhu wrote: Hi, I am trying to add in authentication to my Axis2/c client. I downloaded the latest rampart C 1.2 and deployed to my axis2/c 1.4. I followed the samples from rampart C and added the following lines to my Axis2/C client. The client_home points to my Axis2/C installation: D:\Tools\axis2\axis2c-bin-1.4.0-win32 /*We need to specify the client's policy file location*/ if(client_home) { file_name = axutil_stracat(env, client_home, \\client_repo\\); policy_file = axutil_stracat(env, file_name, policy.xml ); AXIS2_FREE(env-allocator, file_name); file_name = NULL; }else{ printf(Client Home not Specified\n); printf(echo client invoke FAILED!\n); return 0; } /*Create the policy, from file*/ policy = neethi_util_create_policy_from_file(env, policy_file); if(policy_file){ AXIS2_FREE(env-allocator, policy_file); policy_file = NULL; } if(!policy) { printf(\nPolicy creation failed from the file. %s\n, policy_file); } stub = axis2_stub_create_SecureServiceService(env, client_home, address); if( NULL == stub ){ printf(Unable to create the stub with address='%s' and client_home='%s'.\n, address, client_home); if (env) { axutil_env_free((axutil_env_t *) env); env = NULL; } exit(1); } svc_client = axis2_stub_get_svc_client(stub, env ); options = axis2_stub_get_options( stub, env); if (NULL == options) { AXIS2_ERROR_SET(env-error, AXIS2_ERROR_INVALID_NULL_PARAM, AXIS2_FAILURE); AXIS2_LOG_ERROR(env-log, AXIS2_LOG_SI, options is null in stub); return NULL; } axis2_options_set_manage_session(options, env, AXIS2_TRUE); status = axis2_svc_client_set_policy(svc_client, env, policy); if(status == AXIS2_FAILURE) { printf(Policy setting failed\n); } The code seems to run smoothly, but I can't see the security header appear in the client request. I took at look at the log file generated and found that the rampart dll is not loaded correctly. --- [Thu Jul 03 15:23:33 2008] [debug] ..\..\src\core\deployment\dep_engine.c(1306) axis2_dep_engine_load_module_dll: DLL path is : D:\Tools\axis2\axis2c-bin-1.4.0-win32/modules/addressing/axis2_mod_addr.dll [Thu Jul 03 15:23:33 2008] [debug] ..\..\util\src\class_loader.c(141) Object loaded successfully [Thu Jul 03 15:23:33 2008] [debug] ..\..\src\core\deployment\dep_engine.c(1306) axis2_dep_engine_load_module_dll: DLL path is : D:\Tools\axis2\axis2c-bin-1.4.0-win32/modules/logging/axis2_mod_log.dll [Thu Jul 03 15:23:33 2008] [debug] ..\..\util\src\class_loader.c(141) Object loaded successfully [Thu Jul 03 15:23:33 2008] [debug] ..\..\src\core\deployment\dep_engine.c(1306) axis2_dep_engine_load_module_dll: DLL path is : D:\Tools\axis2\axis2c-bin-1.4.0-win32/modules/rampart/mod_rampart.dll [Thu Jul 03 15:23:33 2008] [error] ..\..\util\src\class_loader.c(161) dlerror reason: Something went wrong loading the DLL. If you happen to see this message, please note that getting the exact error form Windows is a TODO. And if possible please help fix it. :) [Thu Jul 03 15:23:33 2008] [error] ..\..\src\core\deployment\dep_engine.c(1424) Loading module description rampart failed [Thu Jul 03 15:23:33 2008] [error] ..\..\src\core\deployment\dep_engine.c(1588) Adding new module rampart to the deployment engine failed [Thu Jul 03 15:23:33 2008] [error] ..\..\src\core\deployment\repos_listener.c(136) Repository listener initialization failed [Thu Jul 03 15:23:33 2008] [debug] ..\..\src\core\phaseresolver\phase_holder.c(139) Add handler AddressingInHandler to phase Transport --- I verified that the dll does exist in the path indicated in the log file: D:\Tools\axis2\axis2c-bin-1.4.0-win32\modules\rampartdir Volume in drive D is Data Volume Serial Number is 40CF-E9CF Directory of D:\Tools\axis2\axis2c-bin-1.4.0-win32\modules\rampart 07/03/2008 02:22 PMDIR . 07/03/2008
Re: Unable building Axis2C++ in VC6
Hi, The unresolved symbols are from the file http_accept_record.c. It seems that the VC6 project doesn't include this file. So please add this file to the axis2_engine project. The file can be found at src\core\transport\http\common folder. Supun.. On Fri, Jul 4, 2008 at 7:37 AM, Tung.Nguyen [EMAIL PROTECTED] wrote: Dear, I use the flowing direction to build Axis2c-1.4.0 client in VC6++ http://mail-archives.apache.org/mod_mbox/ws-axis-cvs/200803.mbox/[EMAIL PROTECTED] http://mail-archives.apache.org/mod_mbox/ws-axis-cvs/200803.mbox/[EMAIL PROTECTED] https://svn.apache.org/repos/asf/webservices/axis2/trunk/c/ides/vc6/axis2c/README.txt https://svn.apache.org/repos/asf/webservices/axis2/trunk/c/ides/vc6/axis2c/README.txt But i receive strange errors when generating axis2_engine.dll. Linking... Creating library Debug/axis2_engine.lib and object Debug/axis2_engine.exp http_transport_utils.obj : error LNK2001: unresolved external symbol [EMAIL PROTECTED] http_worker.obj : error LNK2001: unresolved external symbol [EMAIL PROTECTED] msg_ctx.obj : error LNK2001: unresolved external symbol [EMAIL PROTECTED] ../../../../build/deploy/lib/axis2_engine.dll : fatal error LNK1120: 2 unresolved externals Error executing link.exe. Now, i stuck with them. Could you please help me to solve this problem? Many Thanks, -- View this message in context: http://www.nabble.com/Unable-building-Axis2C%2B%2B-in-VC6-tp18271696p18271696.html Sent from the Axis - C++ - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Unable building Axis2C++ in VC6
Hi, I just added ..\..\..\..\src\core\transport\http\common into include path, but it did not solve this issue. I think that axis2_engine project needs reference to a *.lib which contains http_accept_record.c implementation. But i don't know which one :-((!!! Any advice for this issue? Supun Kamburugamuva wrote: Hi, The unresolved symbols are from the file http_accept_record.c. It seems that the VC6 project doesn't include this file. So please add this file to the axis2_engine project. The file can be found at src\core\transport\http\common folder. Supun.. - What's going on? -- View this message in context: http://www.nabble.com/Unable-building-Axis2C%2B%2B-in-VC6-tp18271696p18273332.html Sent from the Axis - C++ - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Axis2 Client config location
Hi, Is there way to indicate where a standalone axis2 client should pick up it's configuration files (e.g. in axis1 this could be done using -Daxis.ClientConfigFile). Thanks, Brian __ FINEOS Corporation is the global brand name of FINEOS Corporation Limited and its affiliated group companies worldwide. The information contained in this e-mail is confidential, may be privileged and is intended only for the user of the recipient named above. If you are not the intended recipient or a representative of the intended recipient, you have received this e-mail in error and must not copy, use or disclose the contents of this e-mail to anybody else. If you have received this e-mail in error, please notify the sender immediately by return e-mail and permanently delete the copy you received. This e-mail has been swept for computer viruses. However, you should carry out your own virus checks. Registered in Ireland, No. 205721. http://www.FINEOS.com __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem with Axis2 client in JBoss 4 environment
Hi all, we have a problem in invoking a web service (exposed in Siebel CRM) in a JBoss environment. The client code is generated with Axis2 (with adb mapping). It works fine in a stand-alone environment. When we use the client in a web-app deployed on JBoss, a Socket exception occurs. We think that it's a library version problem (some libraries in Jboss/lib come in conflict with some Axis2 libs???). How can we solve it? Thanks in advance! The exception stack trace is the following: [HTTPSender] Unable to sendViaPost to url[http://..org/eai_ita/start.swe?SWEExtSource=WebServiceSWEExtCmd=ExecuteUserName=userPassword=password] java.net.SocketException: Software caused connection abort: recv failed at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:129) at java.io.BufferedInputStream.fill(BufferedInputStream.java:218) at java.io.BufferedInputStream.read(BufferedInputStream.java:237) at org.apache.commons.httpclient.HttpParser.readRawLine(HttpParser.java:78) at org.apache.commons.httpclient.HttpParser.readLine(HttpParser.java:106) at org.apache.commons.httpclient.HttpConnection.readLine(HttpConnection.java:1116) at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.readLine(MultiThreadedHttpConnectionManager.java:1413) at org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:1973) at org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1735) at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1098) at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398) at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346) at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:542) at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:189) at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75) at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:364) at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:208) at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:448) at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:401) at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228) at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163) at com.org.app.util.RG_spcWS_spcSR_spcInboundStub.Insert(RG_spcWS_spcSR_spcInboundStub.java:152) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to consume .Net ( with WSE3.0 security enabled ) web services using Java Client(Axis 1.3)
Dear all, I have to consume .Net web services( WSE 3.0 enabled) from Java Client. I am using Axis 1.3 , jakarta-tomcat-5.0.28. They have enabled WSE 3.0 in .Net web services ( Doc / Literal web services ). Problem : Security requirements are not satisfied because the security header is not present in the incoming message .When we invoke .Net web services from Java client, we are getting above exception. It's clear that we have to add security header in request xml but the problem is how to add header. We have added security header manually but it didn't work. So, we search on google and found that we can use wss4j-1.5.4.jar to SOLVE this issue. we have implemented this but it didn't work too..I think i some where missing in configuration setting. How to solve this issue. How can we use this wss4j-1.5.4.jar concept to solve this issue. Please find the exception - Exception in thread main AxisFault faultCode: {http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}Security faultSubcode: faultString: Microsoft.Web.Services3.Security.SecurityFault: Security requirements are not satisfied because the security header is not present in the incoming message. at Microsoft.Web.Services3.Design.UsernameOverTransportAssertion.ServiceInputFilter.ValidateMessageSecurity(SoapEnvelope envelope, Security security) at Microsoft.Web.Services3.Security.ReceiveSecurityFilter.ProcessMessage(SoapEnvelope envelope) at Microsoft.Web.Services3.Pipeline.ProcessInputMessage(SoapEnvelope envelope) at Microsoft.Web.Services3.WseProtocol.FilterRequest(SoapEnvelope requestEnvelope) at Microsoft.Web.Services3.WseProtocol.RouteRequest(SoapServerMessage message) at System.Web.Services.Protocols.SoapServerProtocol.Initialize() at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Booleanamp; abortProcessing) faultActor: https://annetest.com/bookingapi.asmx faultNode: faultDetail: {http://xml.apache.org/axis/}stackTrace:Microsoft.Web.Services3.Security.SecurityFault: Security requirements are not satisfied because the security header is not present in the incoming message. at Microsoft.Web.Services3.Design.UsernameOverTransportAssertion.ServiceInputFilter.ValidateMessageSecurity(SoapEnvelope envelope, Security security) at Microsoft.Web.Services3.Security.ReceiveSecurityFilter.ProcessMessage(SoapEnvelope envelope) at Microsoft.Web.Services3.Pipeline.ProcessInputMessage(SoapEnvelope envelope) at Microsoft.Web.Services3.WseProtocol.FilterRequest(SoapEnvelope requestEnvelope) at Microsoft.Web.Services3.WseProtocol.RouteRequest(SoapServerMessage message) at System.Web.Services.Protocols.SoapServerProtocol.Initialize() at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Booleanamp; abortProcessing) at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222) at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129) at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:633) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanEndElement(XMLNSDocumentScannerImpl.java:719) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1685) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242) at javax.xml.parsers.SAXParser.parse(SAXParser.java:375) at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227) at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696) at org.apache.axis.Message.getSOAPEnvelope(Message.java:435) at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206) at org.apache.axis.client.Call.invokeEngine(Call.java:2784) at org.apache.axis.client.Call.invoke(Call.java:2767) at org.apache.axis.client.Call.invoke(Call.java:2443) at org.apache.axis.client.Call.invoke(Call.java:2366) at org.apache.axis.client.Call.invoke(Call.java:1812)
Re: Axis2 Client config location
Hi Brian, You can use ConfigurationContext to pick up config files (e.g:- axis2.xml) as follows 1.Create configurationContext from file system as follows. ConfigurationContext cc = ConfigurationContextFactory.createConfigurationContextFromFileSystem(\home\user\axis2\repository,\home\user\axis2\conf\\axis2.xml); 2. Pass it to stub constructor (If you are using generated client stub) ServiceStub stub = new ServiceStub(cc); If you are using serviceClient; ServiceClient sc = new ServiceClient(cc); HTH Charitha Brian Dillon wrote: Hi, Is there way to indicate where a standalone axis2 client should pick up it's configuration files (e.g. in axis1 this could be done using -Daxis.ClientConfigFile). Thanks, Brian __ FINEOS Corporation is the global brand name of FINEOS Corporation Limited and its affiliated group companies worldwide. The information contained in this e-mail is confidential, may be privileged and is intended only for the user of the recipient named above. If you are not the intended recipient or a representative of the intended recipient, you have received this e-mail in error and must not copy, use or disclose the contents of this e-mail to anybody else. If you have received this e-mail in error, please notify the sender immediately by return e-mail and permanently delete the copy you received. This e-mail has been swept for computer viruses. However, you should carry out your own virus checks. Registered in Ireland, No. 205721. http://www.FINEOS.com __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Axis and websphere
Thanks for your reply. I fixed problems. On Thu, Jun 19, 2008 at 5:38 PM, ab [EMAIL PROTECTED] wrote: Yes. I've done that and its been working in production for about 6months or so. Are you running into some issues? -ab - Original Message From: Alexey Zavizionov [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Thursday, June 19, 2008 10:07:20 AM Subject: Axis and websphere Hello, Does anybody work with axis on websphere application server? Regards, Alexey
Lightweight servlet container to test web services
Is there anybody who use maven2 and any servlet container to test web services? Probably, servlet container runs as maven plugin. Regards, Alexey
Re: Lightweight servlet container to test web services
For production use, what are the advantages of deploying Axis2 within a full-on application server? We don't use any other Java web applications -- indeed, we don't use any other Java applications at the moment -- but we are migrating some webservices from Perl/SOAP::Lite to Java/Axis2. Given that the rest of our web infrastructure is based on Apache, mod_perl and legacy CGI scripts, and is likely to remain that way for quite some time, is there any actual point in the additional overhead of using a servlet container like Tomcat? Is it somehow more secure or robust than Axis2's built-in http server? Thanks, Andrew. 2008/7/3 Paul Fremantle [EMAIL PROTECTED]: Axis and Axis2 also offer a lightweight built-in server runtime for testing. Just look in the bin\ directory. Paul On Thu, Jul 3, 2008 at 12:12 PM, Alexey Zavizionov [EMAIL PROTECTED] wrote: Is there anybody who use maven2 and any servlet container to test web services? Probably, servlet container runs as maven plugin. Regards, Alexey -- Paul Fremantle Co-Founder and CTO, WSO2 Apache Synapse PMC Chair OASIS WS-RX TC Co-chair blog: http://pzf.fremantle.org [EMAIL PROTECTED] Oxygenating the Web Service Platform, www.wso2.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Axis wsdl2java -generated codes
Hello Everyone , I am using Axis 1.4 for converting WSDl2Java and testing my web services . I am writing a client which uses these generated codes. WSDL2Java is successful but the generated codes are missing some informations means, It creates a stub files which has a method like this *login(AesLogin AL); * but in my wsdl i have define like this xs:element name=Login type=LoginMethodArgs/ !-- Login -- xs:complexType name=LoginMethodArgs xs:sequence xs:element ref=AesLogin/ /xs:sequence /xs:complexType !-- AesLogin-- xs:element name=AesLogin type=AesLogin abstract=true/ xs:complexType name=AesLogin xs:complexContent xs:extension base=AesObject xs:attribute name=userName type=xs:string / xs:attribute name=password type=xs:string / /xs:extension /xs:complexContent /xs:complexType I am expecting method like this *login(LoginMethodArgs parameter) *in the stub and port file generated . I am able to get properly like this when i use Axis2 framework . Because of this my soap requests goes like this ?xml version=1.0 encoding=UTF-8?soapenv:Envelope xmlns:soapenv= http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsd= http://www.w3.org/2001/XMLSchema; xmlns:xsi= http://www.w3.org/2001/XMLSchema-instance;soapenv:BodyAesLoginhttp://www.w3.org/2001/XMLSchema-instance%22%3E%3Csoapenv:Body%3E%3CAesLoginchangedOn=0 mask=0 objectId=0 options=0 parentId=0 password=admin userName=admin xmlns= http://xyz.com/abc/types//soapenv:Body/soapenv:Envelopehttp://xyz.com/abc/types%22/%3E%3C/soapenv:Body%3E%3C/soapenv:Envelope But my server expects a request like ?xml version=1.0 encoding=UTF-8?soapenv:Envelope xmlns:soapenv= http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsd= http://www.w3.org/2001/XMLSchema; xmlns:xsi= http://www.w3.org/2001/XMLSchema-instance;soapenv:Body*Login*AesLoginhttp://www.w3.org/2001/XMLSchema-instance%22%3E%3Csoapenv:Body%3E%3CLogin%3E%3CAesLoginchangedOn=0 mask=0 objectId=0 options=0 parentId=0 password=admin userName=admin xmlns=http://xyz.com/abc/types//*Login */soapenv:Body/soapenv:Envelopehttp://xyz.com/abc/types%22/%3E%3C/Login%3E%3C/soapenv:Body%3E%3C/soapenv:Envelope Note: I am able to achieve this through Axis2 framework . Can anyone help me on this . Is there any way to overcome this issue. Thanks in Advance, Prabhu
FW: ADB external mapping
Hi, I'm still struggling with getting the XML contents (or ) in a parse() method of a ADBBean, storing them in the bean and feeding them later back to the serialize() method. Is there an efficient way to copy the raw XML contents from one to another without having to go through all the parse events? Thanks, Martin From: Martin Kadlec [mailto:[EMAIL PROTECTED] Sent: Monday, June 30, 2008 10:15 AM To: axis-user@ws.apache.org Subject: RE: ADB external mapping Hi Amila, thank you for the quick answer. I already tried to edit the parse() and serialize() methods in the generated code but ended up with a dangling XMLStreamReader at the one and a XMLStreamWriter at the other end. I don't see a way to ge input/output streams from these writers. Is there an efficient way to copy the raw XML contents from one to another without having to go through all the parse events? Thanks, Martin From: Amila Suriarachchi [mailto:[EMAIL PROTECTED] Sent: Monday, June 30, 2008 7:01 AM To: axis-user@ws.apache.org Subject: Re: ADB external mapping On Mon, Jun 30, 2008 at 4:15 AM, Martin Kadlec [EMAIL PROTECTED] wrote: Hi, I would like ADB to stop parsing at a certain point in the XML hierarchy, thus I want all of my 'high level' parameters in the SOAP message mapped to Java objects via ADB for easier handling but I need ADB to exclude some elements/types from breaking them further down. This means the latter elements and all of their contents shall be stored as plain XML at the corresponding point in the ADBBean hierarchy to be extracted and passed along without any further parsing or serializing needed (these are large blocks of XML data that is not going to be processed by the web service layer itself). I am not sure how -em option helps you solve this problem. One option is to edit the generated code (please see the parse() method.) so that it does not parse after the necessary class level. I tried to solve this use case with the -em (external mapping) option but did not succeed because there is not much user documentation about this feature. Also almost all questions about this I've found on the mailing list and the web seem to be unanswered. -em option is used to give an external mapping file to codegen engine. This means you can sepecify to use some class written by you for codegen classes instead of generated databinding class. you can understand the format of the file using this code[1] :) thanks, Amila. [1] http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/codegen/sr c/org/apache/axis2/wsdl/codegen/extension/TypeMapperExtension.java?revision= 637413 http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/codegen/s rc/org/apache/axis2/wsdl/codegen/extension/TypeMapperExtension.java?revision =637413view=markup view=markup Is there someone who actually uses this? Regards Martin Kadlec -- Amila Suriarachchi, WSO2 Inc.
Re: Lightweight servlet container to test web services
I see SimpleAxis2Server in the bin dir for Axis2, but nothing in the axis1distribution. My service is based on Axis1. On Thu, Jul 3, 2008 at 3:26 PM, Paul Fremantle [EMAIL PROTECTED] wrote: Axis and Axis2 also offer a lightweight built-in server runtime for testing. Just look in the bin\ directory. Paul On Thu, Jul 3, 2008 at 12:12 PM, Alexey Zavizionov [EMAIL PROTECTED] wrote: Is there anybody who use maven2 and any servlet container to test web services? Probably, servlet container runs as maven plugin. Regards, Alexey -- Paul Fremantle Co-Founder and CTO, WSO2 Apache Synapse PMC Chair OASIS WS-RX TC Co-chair blog: http://pzf.fremantle.org [EMAIL PROTECTED] Oxygenating the Web Service Platform, www.wso2.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
MTOM: Axis2-1.4 issue?? XMLStreamException: Unknow type can not serialize
All, I am trying to send a pdf attachment in the soap message but I get this: org.apache.axis2.databinding.utils.ConverterUtil.serializeAnyType(ConverterUtil.java:1449) And the message doesn't come to web services server, it is failing in OperationClient.execute() method itself. The AxisFault message shows Unknow type can not serialize. What could be the possible reasons for this or is this a known issue with axis2 1.4 release? Should I use axis2 1.3 release if I need to send an attachment using MTOM? Thanks so much for you help! I am using JRE and JDK 1.5_15, Ant 1.6, apache tomcat server 1.6 and Axis2 1.4 Thanks, Asmita
Re: Lightweight servlet container to test web services
Thank you for reply. I am developer of java web services based on Axis1. For regular testing I have to start/stop servlet container to deploy/undeploy test WAR application. This process should be embedded into maven2 regular test process. Is there documentation how can we start and deploy sample test application with maven2 test phase on SimpleAxisServer? PS, we found Cargo project, but don't sure is it well for such kind of task. Thanks and regards, Alexey On Thu, Jul 3, 2008 at 3:47 PM, Andrew Clegg [EMAIL PROTECTED] wrote: For production use, what are the advantages of deploying Axis2 within a full-on application server? We don't use any other Java web applications -- indeed, we don't use any other Java applications at the moment -- but we are migrating some webservices from Perl/SOAP::Lite to Java/Axis2. Given that the rest of our web infrastructure is based on Apache, mod_perl and legacy CGI scripts, and is likely to remain that way for quite some time, is there any actual point in the additional overhead of using a servlet container like Tomcat? Is it somehow more secure or robust than Axis2's built-in http server? Thanks, Andrew. 2008/7/3 Paul Fremantle [EMAIL PROTECTED]: Axis and Axis2 also offer a lightweight built-in server runtime for testing. Just look in the bin\ directory. Paul On Thu, Jul 3, 2008 at 12:12 PM, Alexey Zavizionov [EMAIL PROTECTED] wrote: Is there anybody who use maven2 and any servlet container to test web services? Probably, servlet container runs as maven plugin. Regards, Alexey -- Paul Fremantle Co-Founder and CTO, WSO2 Apache Synapse PMC Chair OASIS WS-RX TC Co-chair blog: http://pzf.fremantle.org [EMAIL PROTECTED] Oxygenating the Web Service Platform, www.wso2.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Axis2 SOAP-client and HTTPS-based server using basic authentication
Hello, I have been unable to successfully execute my WSDL-generated Axis2 1.4 client against a web service that uses HTTPS and basic authentication. After some extensive search on the Internet, I found some suggestions which I have tried to implement. I've managed to successfully do a HTTP get against the service's WSDL-file using plain HTTPClient, but when I try to implement what should basically be the same parameters on the service stub, I receive a Transport error: 401 Error: Unauthorized error message. I've included the source code for the successful HTTPClient code and the not-so-successfull service stub: ProtocolSocketFactory protocolSocketFactory = new EasySSLProtocolSocketFactory(); //ProtocolSocketFactory protocolSocketFactory = new SSLProtocolSocketFactory(); Protocol https = new Protocol(https, protocolSocketFactory, 443); HttpState state = new HttpState(); state.setCredentials(new AuthScope(host, 443), new UsernamePasswordCredentials(userName, password)); HttpClient httpclient = new HttpClient(); httpclient.setState(state); httpclient.getHostConfiguration().setHost(host, 443, https); GetMethod httpget = new GetMethod(wsdlPath); try { httpclient.executeMethod(httpget); System.out.println(httpget.getStatusLine()); } finally { httpget.releaseConnection(); } HttpTransportProperties.Authenticator auth = new HttpTransportProperties.Authenticator(); auth.setPassword(userName); auth.setUsername(password); auth.setHost(host); auth.setPort(443); SmsServiceStub service = new SmsServiceStub(endPoint); Options options = service._getServiceClient().getOptions(); options.setProperty(HTTPConstants.AUTHENTICATE, auth); options.setProperty(HTTPConstants.CUSTOM_PROTOCOL_HANDLER, https); options.setTimeOutInMilliSeconds(60 * 1000); //1 minute SmsServiceStub.SubmitRsp resp = service.Submit(req); And the log: Running com.telenor.nwnsms.SmsServiceTest 03.jul.2008 16:11:29 org.apache.commons.httpclient.auth.AuthChallengeProcessor selectAuthScheme INFO: basic authentication scheme selected HTTP/1.1 200 OK 03.jul.2008 16:11:30 org.apache.axis2.deployment.ModuleDeployer deploy INFO: Deploying module: addressing-1.4 03.jul.2008 16:11:31 org.apache.commons.httpclient.auth.AuthChallengeProcessor selectAuthScheme INFO: basic authentication scheme selected 03.jul.2008 16:11:31 org.apache.commons.httpclient.HttpMethodDirector processWWWAuthChallenge INFO: Failure authenticating with BASIC ''@removed:443 03.jul.2008 16:11:31 org.apache.axis2.transport.http.HTTPSender sendViaPost INFO: Unable to sendViaPost to url[https://removed] org.apache.axis2.AxisFault: Transport error: 401 Error: Unauthorized at org.apache.axis2.transport.http.HTTPSender.handleResponse(HTTPSender.java:298) at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:192) at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:77) at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:327) at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:206) at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396) at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:374) at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:211) at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163) at com.telenor.mr2.channel.nwn.SmsServiceStub.Submit(SmsServiceStub.java:207) at com.telenor.nwnsms.SmsServiceTest.testApp(SmsServiceTest.java:95) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at
Re: Lightweight servlet container to test web services
Andrew In tests, Axis2 is much more performant running in Tomcat or with the native non-blocking NIO transports that with the built-in standard server. We use Tomcat in an embedded way in the WSO2 Web Services App server (http://wso2.org/projects/wsas/java) because we found it faster than Jetty or the built-in classes. Synapse on the other hand uses the non-blocking transport because it makes more sense as an intermediary. Paul On Thu, Jul 3, 2008 at 1:47 PM, Andrew Clegg [EMAIL PROTECTED] wrote: For production use, what are the advantages of deploying Axis2 within a full-on application server? We don't use any other Java web applications -- indeed, we don't use any other Java applications at the moment -- but we are migrating some webservices from Perl/SOAP::Lite to Java/Axis2. Given that the rest of our web infrastructure is based on Apache, mod_perl and legacy CGI scripts, and is likely to remain that way for quite some time, is there any actual point in the additional overhead of using a servlet container like Tomcat? Is it somehow more secure or robust than Axis2's built-in http server? Thanks, Andrew. 2008/7/3 Paul Fremantle [EMAIL PROTECTED]: Axis and Axis2 also offer a lightweight built-in server runtime for testing. Just look in the bin\ directory. Paul On Thu, Jul 3, 2008 at 12:12 PM, Alexey Zavizionov [EMAIL PROTECTED] wrote: Is there anybody who use maven2 and any servlet container to test web services? Probably, servlet container runs as maven plugin. Regards, Alexey -- Paul Fremantle Co-Founder and CTO, WSO2 Apache Synapse PMC Chair OASIS WS-RX TC Co-chair blog: http://pzf.fremantle.org [EMAIL PROTECTED] Oxygenating the Web Service Platform, www.wso2.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Paul Fremantle Co-Founder and CTO, WSO2 Apache Synapse PMC Chair OASIS WS-RX TC Co-chair blog: http://pzf.fremantle.org [EMAIL PROTECTED] Oxygenating the Web Service Platform, www.wso2.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Lightweight servlet container to test web services
2008/7/3 Paul Fremantle [EMAIL PROTECTED]: Andrew In tests, Axis2 is much more performant running in Tomcat or with the native non-blocking NIO transports that with the built-in standard server. We use Tomcat in an embedded way in the WSO2 Web Services App server (http://wso2.org/projects/wsas/java) because we found it faster than Jetty or the built-in classes. Synapse on the other hand uses the non-blocking transport because it makes more sense as an intermediary. Thanks for the tips. We'll certainly bear that in mind when we reach production and host it in a proper app server! Cheers, Andrew. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: MTOM: Axis2-1.4 issue?? XMLStreamException: Unknow type can not serialize
don't know about your issue, but there are other issues fixed in 1.4 that were broke in 1.3 so I wouldn't go back there. From: Attharkar, Asmita [mailto:[EMAIL PROTECTED] Sent: Thursday, July 03, 2008 9:40 AM To: axis-user@ws.apache.org Subject: MTOM: Axis2-1.4 issue?? XMLStreamException: Unknow type can not serialize All, I am trying to send a pdf attachment in the soap message but I get this: org.apache.axis2.databinding.utils.ConverterUtil.serializeAnyType(ConverterUtil.java:1449) And the message doesn't come to web services server, it is failing in OperationClient.execute() method itself. The AxisFault message shows Unknow type can not serialize. What could be the possible reasons for this or is this a known issue with axis2 1.4 release? Should I use axis2 1.3 release if I need to send an attachment using MTOM? Thanks so much for you help! I am using JRE and JDK 1.5_15, Ant 1.6, apache tomcat server 1.6 and Axis2 1.4 Thanks, Asmita
Re: Axis2 SOAP-client and HTTPS-based server using basic authentication
Noticed that you had auth.setPassword(userName); auth.setUsername(password); in your code. A mistake probably that caused the issue? Thanks, Keith. On Thu, Jul 3, 2008 at 8:07 PM, Odd Kenneth Oden [EMAIL PROTECTED] wrote: Hello, I have been unable to successfully execute my WSDL-generated Axis2 1.4 client against a web service that uses HTTPS and basic authentication. After some extensive search on the Internet, I found some suggestions which I have tried to implement. I've managed to successfully do a HTTP get against the service's WSDL-file using plain HTTPClient, but when I try to implement what should basically be the same parameters on the service stub, I receive a Transport error: 401 Error: Unauthorized error message. I've included the source code for the successful HTTPClient code and the not-so-successfull service stub: ProtocolSocketFactory protocolSocketFactory = new EasySSLProtocolSocketFactory(); //ProtocolSocketFactory protocolSocketFactory = new SSLProtocolSocketFactory(); Protocol https = new Protocol(https, protocolSocketFactory, 443); HttpState state = new HttpState(); state.setCredentials(new AuthScope(host, 443), new UsernamePasswordCredentials(userName, password)); HttpClient httpclient = new HttpClient(); httpclient.setState(state); httpclient.getHostConfiguration().setHost(host, 443, https); GetMethod httpget = new GetMethod(wsdlPath); try { httpclient.executeMethod(httpget); System.out.println(httpget.getStatusLine()); } finally { httpget.releaseConnection(); } HttpTransportProperties.Authenticator auth = new HttpTransportProperties.Authenticator(); auth.setPassword(userName); auth.setUsername(password); auth.setHost(host); auth.setPort(443); SmsServiceStub service = new SmsServiceStub(endPoint); Options options = service._getServiceClient().getOptions(); options.setProperty(HTTPConstants.AUTHENTICATE, auth); options.setProperty(HTTPConstants.CUSTOM_PROTOCOL_HANDLER, https); options.setTimeOutInMilliSeconds(60 * 1000); //1 minute SmsServiceStub.SubmitRsp resp = service.Submit(req); And the log: Running com.telenor.nwnsms.SmsServiceTest 03.jul.2008 16:11:29 org.apache.commons.httpclient.auth.AuthChallengeProcessor selectAuthScheme INFO: basic authentication scheme selected HTTP/1.1 200 OK 03.jul.2008 16:11:30 org.apache.axis2.deployment.ModuleDeployer deploy INFO: Deploying module: addressing-1.4 03.jul.2008 16:11:31 org.apache.commons.httpclient.auth.AuthChallengeProcessor selectAuthScheme INFO: basic authentication scheme selected 03.jul.2008 16:11:31 org.apache.commons.httpclient.HttpMethodDirector processWWWAuthChallenge INFO: Failure authenticating with BASIC ''@removed:443 03.jul.2008 16:11:31 org.apache.axis2.transport.http.HTTPSender sendViaPost INFO: Unable to sendViaPost to url[https://removed] org.apache.axis2.AxisFault: Transport error: 401 Error: Unauthorized at org.apache.axis2.transport.http.HTTPSender.handleResponse(HTTPSender.java:298) at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:192) at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:77) at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:327) at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:206) at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396) at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:374) at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:211) at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163) at com.telenor.mr2.channel.nwn.SmsServiceStub.Submit(SmsServiceStub.java:207) at com.telenor.nwnsms.SmsServiceTest.testApp(SmsServiceTest.java:95) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at
RE: MTOM: Axis2-1.4 issue?? XMLStreamException: Unknow type can not serialize
Hi, Here is my client code: myStub._getServiceClient().getOptions() .setProperty(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE); myStub._getServiceClient().getOptions().setTimeOutInMilliSeconds(1); File file = new File(INPUT_FILE); FileInputStream fis = new FileInputStream(file); String base64String = Base64.encode(readFully(fis)); //reads the file bitwise before encode is called on it. ServiceMethodWithAttach serviceMsgAttach = new ServiceMethodWithAttach (); OMFactory fac = OMAbstractFactory.getOMFactory(); OMText binaryNode =fac.createOMText(base64String,application/pdf,true); OMNamespace omNs = fac.createOMNamespace(http://abc.xyz.com;, ns1); OMElement method = fac.createOMElement(processNPCMsgWithAttach, omNs); method.addChild(binaryNode); serviceMsgAttach.setUserId(Test); // String 1 serviceMsgAttach.setPassword(test); //String 2 serviceMsgAttach.setXMLMsg(test/test); //String 3 serviceMsgAttach.setElement(method); //Attachment myStub.serviceMethodWithAttach (serviceMsgAttach); System.out.println(done calling service...); In Services.xml I have added the parameter : parameter name=enableMTOM locked=falsetrue/parameter Why do I get unknown type cannot serialize? Thanks, Asmita From: Tony Dean [mailto:[EMAIL PROTECTED] Sent: Thursday, July 03, 2008 11:46 AM To: axis-user@ws.apache.org Subject: RE: MTOM: Axis2-1.4 issue?? XMLStreamException: Unknow type can not serialize don't know about your issue, but there are other issues fixed in 1.4 that were broke in 1.3 so I wouldn't go back there. From: Attharkar, Asmita [mailto:[EMAIL PROTECTED] Sent: Thursday, July 03, 2008 9:40 AM To: axis-user@ws.apache.org Subject: MTOM: Axis2-1.4 issue?? XMLStreamException: Unknow type can not serialize All, I am trying to send a pdf attachment in the soap message but I get this: org.apache.axis2.databinding.utils.ConverterUtil.serializeAnyType(ConverterUtil.java:1449) And the message doesn't come to web services server, it is failing in OperationClient.execute() method itself. The AxisFault message shows Unknow type can not serialize. What could be the possible reasons for this or is this a known issue with axis2 1.4 release? Should I use axis2 1.3 release if I need to send an attachment using MTOM? Thanks so much for you help! I am using JRE and JDK 1.5_15, Ant 1.6, apache tomcat server 1.6 and Axis2 1.4 Thanks, Asmita
Re: Axis wsdl2java -generated codes
Hi Prabhu, Can you post your WSDL please. Thanks, Keith. On Thu, Jul 3, 2008 at 6:42 PM, prabhu p [EMAIL PROTECTED] wrote: Hello Everyone , I am using Axis 1.4 for converting WSDl2Java and testing my web services . I am writing a client which uses these generated codes. WSDL2Java is successful but the generated codes are missing some informations means, It creates a stub files which has a method like this *login(AesLogin AL); * but in my wsdl i have define like this xs:element name=Login type=LoginMethodArgs/ !-- Login -- xs:complexType name=LoginMethodArgs xs:sequence xs:element ref=AesLogin/ /xs:sequence /xs:complexType !-- AesLogin-- xs:element name=AesLogin type=AesLogin abstract=true/ xs:complexType name=AesLogin xs:complexContent xs:extension base=AesObject xs:attribute name=userName type=xs:string / xs:attribute name=password type=xs:string / /xs:extension /xs:complexContent /xs:complexType I am expecting method like this *login(LoginMethodArgs parameter) *in the stub and port file generated . I am able to get properly like this when i use Axis2 framework . Because of this my soap requests goes like this ?xml version=1.0 encoding=UTF-8?soapenv:Envelope xmlns:soapenv= http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsd= http://www.w3.org/2001/XMLSchema; xmlns:xsi= http://www.w3.org/2001/XMLSchema-instance;soapenv:BodyAesLoginhttp://www.w3.org/2001/XMLSchema-instance%22%3E%3Csoapenv:Body%3E%3CAesLoginchangedOn=0 mask=0 objectId=0 options=0 parentId=0 password=admin userName=admin xmlns= http://xyz.com/abc/types//soapenv:Body/soapenv:Envelopehttp://xyz.com/abc/types%22/%3E%3C/soapenv:Body%3E%3C/soapenv:Envelope But my server expects a request like ?xml version=1.0 encoding=UTF-8?soapenv:Envelope xmlns:soapenv= http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsd= http://www.w3.org/2001/XMLSchema; xmlns:xsi= http://www.w3.org/2001/XMLSchema-instance;soapenv:Body*Login* AesLoginhttp://www.w3.org/2001/XMLSchema-instance%22%3E%3Csoapenv:Body%3E%3CLogin%3E%3CAesLoginchangedOn=0 mask=0 objectId=0 options=0 parentId=0 password=admin userName=admin xmlns=http://xyz.com/abc/types//* Login*/soapenv:Body/soapenv:Envelopehttp://xyz.com/abc/types%22/%3E%3C/Login%3E%3C/soapenv:Body%3E%3C/soapenv:Envelope Note: I am able to achieve this through Axis2 framework . Can anyone help me on this . Is there any way to overcome this issue. Thanks in Advance, Prabhu -- Keith Chapman Senior Software Engineer WSO2 Inc. Oxygenating the Web Service Platform. http://wso2.org/ blog: http://www.keith-chapman.org
RE: Axis2 Client config location
Hi, Thanks, I had seen this but I was hoping that there was a configuration way of doing this rather than needing to hardcode the repository location. Is there any system parameter way equivalent to the axis1 approach ? Thanks, Brian -Original Message- From: Charitha Kankanamge [mailto:[EMAIL PROTECTED] Sent: 03 July 2008 11:05 To: axis-user@ws.apache.org Subject: Re: Axis2 Client config location Hi Brian, You can use ConfigurationContext to pick up config files (e.g:- axis2.xml) as follows 1.Create configurationContext from file system as follows. ConfigurationContext cc = ConfigurationContextFactory.createConfigurationContextFromFileSystem(\h ome\user\axis2\repository,\home\user\axis2\conf\\axis2.xml); 2. Pass it to stub constructor (If you are using generated client stub) ServiceStub stub = new ServiceStub(cc); If you are using serviceClient; ServiceClient sc = new ServiceClient(cc); HTH Charitha Brian Dillon wrote: Hi, Is there way to indicate where a standalone axis2 client should pick up it's configuration files (e.g. in axis1 this could be done using -Daxis.ClientConfigFile). Thanks, Brian __ FINEOS Corporation is the global brand name of FINEOS Corporation Limited and its affiliated group companies worldwide. The information contained in this e-mail is confidential, may be privileged and is intended only for the user of the recipient named above. If you are not the intended recipient or a representative of the intended recipient, you have received this e-mail in error and must not copy, use or disclose the contents of this e-mail to anybody else. If you have received this e-mail in error, please notify the sender immediately by return e-mail and permanently delete the copy you received. This e-mail has been swept for computer viruses. However, you should carry out your own virus checks. Registered in Ireland, No. 205721. http://www.FINEOS.com __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: MTOM: Axis2-1.4 issue?? XMLStreamException: Unknow type can not serialize
try specifying application/octet... I personally use a dataHandler and use streams directly... From: Attharkar, Asmita [mailto:[EMAIL PROTECTED] Sent: Thursday, July 03, 2008 12:18 PM To: axis-user@ws.apache.org Subject: RE: MTOM: Axis2-1.4 issue?? XMLStreamException: Unknow type can not serialize Hi, Here is my client code: myStub._getServiceClient().getOptions() .setProperty(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE); myStub._getServiceClient().getOptions().setTimeOutInMilliSeconds(1); File file = new File(INPUT_FILE); FileInputStream fis = new FileInputStream(file); String base64String = Base64.encode(readFully(fis)); //reads the file bitwise before encode is called on it. ServiceMethodWithAttach serviceMsgAttach = new ServiceMethodWithAttach (); OMFactory fac = OMAbstractFactory.getOMFactory(); OMText binaryNode =fac.createOMText(base64String,application/pdf,true); OMNamespace omNs = fac.createOMNamespace(http://abc.xyz.com;, ns1); OMElement method = fac.createOMElement(processNPCMsgWithAttach, omNs); method.addChild(binaryNode); serviceMsgAttach.setUserId(Test); // String 1 serviceMsgAttach.setPassword(test); //String 2 serviceMsgAttach.setXMLMsg(test/test); //String 3 serviceMsgAttach.setElement(method); //Attachment myStub.serviceMethodWithAttach (serviceMsgAttach); System.out.println(done calling service...); In Services.xml I have added the parameter : parameter name=enableMTOM locked=falsetrue/parameter Why do I get unknown type cannot serialize? Thanks, Asmita From: Tony Dean [mailto:[EMAIL PROTECTED] Sent: Thursday, July 03, 2008 11:46 AM To: axis-user@ws.apache.org Subject: RE: MTOM: Axis2-1.4 issue?? XMLStreamException: Unknow type can not serialize don't know about your issue, but there are other issues fixed in 1.4 that were broke in 1.3 so I wouldn't go back there. From: Attharkar, Asmita [mailto:[EMAIL PROTECTED] Sent: Thursday, July 03, 2008 9:40 AM To: axis-user@ws.apache.org Subject: MTOM: Axis2-1.4 issue?? XMLStreamException: Unknow type can not serialize All, I am trying to send a pdf attachment in the soap message but I get this: org.apache.axis2.databinding.utils.ConverterUtil.serializeAnyType(ConverterUtil.java:1449) And the message doesn't come to web services server, it is failing in OperationClient.execute() method itself. The AxisFault message shows Unknow type can not serialize. What could be the possible reasons for this or is this a known issue with axis2 1.4 release? Should I use axis2 1.3 release if I need to send an attachment using MTOM? Thanks so much for you help! I am using JRE and JDK 1.5_15, Ant 1.6, apache tomcat server 1.6 and Axis2 1.4 Thanks, Asmita
RE: MTOM: Axis2-1.4 issue?? XMLStreamException: Unknow type can not serialize
Ok Now I am using File file = new File(INPUT_FILE); FileDataSource fileDataSource = new FileDataSource(file); //--- DataHandler dataHandler = new DataHandler(fileDataSource); // processWithAttach msgAttach = new processWithAttach (); OMFactory fac = OMAbstractFactory.getOMFactory(); OMText binaryNode =fac.createOMText(dataHandler,true); But still the same issue, how can I make sure if I am using the right format. To create my message I am using the standard methods itself: OMElement method = fac.createOMElement(processWithAttach , omNs); method.addChild(binaryNode); Will this method.addChild will not create the proper XML format when I send in the message? msgAttach.setUserId(Test); msgAttach.setPassword(test); msgAttach.setXMLMsg(test/test); msgAttach.setElement(method); myStub.processWithAttach(msgAttach); Thanks, Asmita From: Thilina Gunarathne [mailto:[EMAIL PROTECTED] Sent: Thursday, July 03, 2008 2:48 PM To: axis-user@ws.apache.org Subject: Re: MTOM: Axis2-1.4 issue?? XMLStreamException: Unknow type can not serialize Hi, I'm a bit confused... Why are you creating the XML using Axiom while you have stubs generated... It would have been better if you fixed your wsdl to reflect the correct XML elements and code generated.. Looks like you are getting the fault from the serverside. A message trace of the request and the WSDL of the service would help to figure out the problem clearly.. myStub._getServiceClient().getOptions() .setProperty(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE); myStub._getServiceClient().getOptions().setTimeOutInMilliSeconds(1); File file = new File(INPUT_FILE); FileInputStream fis = new FileInputStream(file); String base64String = Base64.encode(readFully(fis)); //reads the file bitwise before encode is called on it. You can just create a DataHandler and create the OMText out of it... Trying to do the above will put in you in trouble if you are trying to send a larger attachment. OMText binaryNode =fac.createOMText(base64String,application/pdf,true); You can use the createOMText() with DataHandler.. Why do I get unknown type cannot serialize? Chances are that you are not sending the message in the correct (XML hierachy) format.. thanks, Thilina Thanks, Asmita From: Tony Dean [mailto:[EMAIL PROTECTED]mailto:[EMAIL PROTECTED]] Sent: Thursday, July 03, 2008 11:46 AM To: axis-user@ws.apache.orgmailto:axis-user@ws.apache.org Subject: RE: MTOM: Axis2-1.4 issue?? XMLStreamException: Unknow type can not serialize don't know about your issue, but there are other issues fixed in 1.4 that were broke in 1.3 so I wouldn't go back there. From: Attharkar, Asmita [mailto:[EMAIL PROTECTED]mailto:[EMAIL PROTECTED]] Sent: Thursday, July 03, 2008 9:40 AM To: axis-user@ws.apache.orgmailto:axis-user@ws.apache.org Subject: MTOM: Axis2-1.4 issue?? XMLStreamException: Unknow type can not serialize All, I am trying to send a pdf attachment in the soap message but I get this: org.apache.axis2.databinding.utils.ConverterUtil.serializeAnyType(ConverterUtil.java:1449) And the message doesn't come to web services server, it is failing in OperationClient.execute() method itself. The AxisFault message shows Unknow type can not serialize. What could be the possible reasons for this or is this a known issue with axis2 1.4 release? Should I use axis2 1.3 release if I need to send an attachment using MTOM? Thanks so much for you help! I am using JRE and JDK 1.5_15, Ant 1.6, apache tomcat server 1.6 and Axis2 1.4 Thanks, Asmita -- Thilina Gunarathne - http://thilinag.blogspot.com
Re: Axis2 Client config location
Hi Brian, I just have look at Axis2 source code. I noticed that Axis2 uses the system properties axis2.repo and axis2.xml to get the locations of the repository and the axis2.xml, if you haven't specified them in your client side code. So you can use -Daxis2.repo or -Daxis2.xml system properties. 1. If you are using serviceClient, use the constructor which requires no parameters * ServiceClient sc = new ServiceClient(); * 2. If you are using generated client stub (There may be a better solution) * ConfigurationContext ctx = ConfigurationContextFactory** .createConfigurationContextFrom**FileSystem(null, null); ServiceStub stub = new ServiceStub(ctx);* Thanks Sameera Jayasoma Software Engineer WSO2 Inc. Oxygenating the Web Service Platform. http://wso2.org/ blog: http://sameera-jayasoma.blogspot.com/
Re: MTOM: Axis2-1.4 issue?? XMLStreamException: Unknow type can not serialize
Will this method.addChild will not create the proper XML format when I send in the message? What I mean by proper XML format is the XMLSchema which your service mandates your request should adhere to.. Do you have a proper WSDL for the service.. Is the service under ur control or something external.. ~Thilina msgAttach.setUserId(Test); msgAttach.setPassword(test); msgAttach.setXMLMsg(test/test); msgAttach.setElement(method); myStub.processWithAttach(msgAttach); Thanks, Asmita -- *From:* Thilina Gunarathne [mailto:[EMAIL PROTECTED] *Sent:* Thursday, July 03, 2008 2:48 PM *To:* axis-user@ws.apache.org *Subject:* Re: MTOM: Axis2-1.4 issue?? XMLStreamException: Unknow type can not serialize Hi, I'm a bit confused... Why are you creating the XML using Axiom while you have stubs generated... It would have been better if you fixed your wsdl to reflect the correct XML elements and code generated.. Looks like you are getting the fault from the serverside. A message trace of the request and the WSDL of the service would help to figure out the problem clearly.. myStub._getServiceClient().getOptions() .setProperty(Constants.Configuration.*ENABLE_MTOM*, Constants.*VALUE_TRUE*); myStub._getServiceClient().getOptions().setTimeOutInMilliSeconds(1); File file = *new* File(*INPUT_FILE*); FileInputStream fis = *new* FileInputStream(file); String base64String = Base64.*encode*(*readFully*(fis)); //reads the file bitwise before encode is called on it. You can just create a DataHandler and create the OMText out of it... Trying to do the above will put in you in trouble if you are trying to send a larger attachment. OMText binaryNode =fac.createOMText(base64String,application/pdf,*true*); You can use the createOMText() with DataHandler.. Why do I get unknown type cannot serialize? Chances are that you are not sending the message in the correct (XML hierachy) format.. thanks, Thilina Thanks, Asmita -- *From:* Tony Dean [mailto:[EMAIL PROTECTED] *Sent:* Thursday, July 03, 2008 11:46 AM *To:* axis-user@ws.apache.org *Subject:* RE: MTOM: Axis2-1.4 issue?? XMLStreamException: Unknow type can not serialize don't know about your issue, but there are other issues fixed in 1.4 that were broke in 1.3 so I wouldn't go back there. *From:* Attharkar, Asmita [mailto:[EMAIL PROTECTED] *Sent:* Thursday, July 03, 2008 9:40 AM *To:* axis-user@ws.apache.org *Subject:* MTOM: Axis2-1.4 issue?? XMLStreamException: Unknow type can not serialize All, I am trying to send a pdf attachment in the soap message but I get this: org.apache.axis2.databinding.utils.ConverterUtil.serializeAnyType(ConverterUtil.java:1449) And the message doesn't come to web services server, it is failing in OperationClient.execute() method itself. The AxisFault message shows *Unknow type can not serialize*. What could be the possible reasons for this or is this a known issue with axis2 1.4 release? Should I use axis2 1.3 release if I need to send an attachment using MTOM? Thanks so much for you help! I am using JRE and JDK 1.5_15, Ant 1.6, apache tomcat server 1.6 and Axis2 1.4 Thanks, Asmita -- Thilina Gunarathne - http://thilinag.blogspot.com -- Thilina Gunarathne - http://thilinag.blogspot.com
Re: anyType element again and again
So, any ideas ? I tried some other ways, but I still really need to make a request which can send differents type of elements when I call it still blocked..
Re: Axis wsdl2java -generated codes
Hi Keith , Here is my wsdl and xsd file . Please note iam able to get as expected using Axis2 that is stub file will have method like login(LoginMethodArgs parameter); Let me know if you want more informations . Thanks, Prabhu On Thu, Jul 3, 2008 at 9:53 PM, keith chapman [EMAIL PROTECTED] wrote: Hi Prabhu, Can you post your WSDL please. Thanks, Keith. On Thu, Jul 3, 2008 at 6:42 PM, prabhu p [EMAIL PROTECTED] wrote: Hello Everyone , I am using Axis 1.4 for converting WSDl2Java and testing my web services . I am writing a client which uses these generated codes. WSDL2Java is successful but the generated codes are missing some informations means, It creates a stub files which has a method like this *login(AesLogin AL); * but in my wsdl i have define like this xs:element name=Login type=LoginMethodArgs/ !-- Login -- xs:complexType name=LoginMethodArgs xs:sequence xs:element ref=AesLogin/ /xs:sequence /xs:complexType !-- AesLogin-- xs:element name=AesLogin type=AesLogin abstract=true/ xs:complexType name=AesLogin xs:complexContent xs:extension base=AesObject xs:attribute name=userName type=xs:string / xs:attribute name=password type=xs:string / /xs:extension /xs:complexContent /xs:complexType I am expecting method like this *login(LoginMethodArgs parameter) *in the stub and port file generated . I am able to get properly like this when i use Axis2 framework . Because of this my soap requests goes like this ?xml version=1.0 encoding=UTF-8?soapenv:Envelope xmlns:soapenv= http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsd= http://www.w3.org/2001/XMLSchema; xmlns:xsi= http://www.w3.org/2001/XMLSchema-instance;soapenv:BodyAesLoginhttp://www.w3.org/2001/XMLSchema-instance%22%3E%3Csoapenv:Body%3E%3CAesLoginchangedOn=0 mask=0 objectId=0 options=0 parentId=0 password=admin userName=admin xmlns= http://xyz.com/abc/types//soapenv:Body/soapenv:Envelopehttp://xyz.com/abc/types%22/%3E%3C/soapenv:Body%3E%3C/soapenv:Envelope But my server expects a request like ?xml version=1.0 encoding=UTF-8?soapenv:Envelope xmlns:soapenv= http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsd= http://www.w3.org/2001/XMLSchema; xmlns:xsi= http://www.w3.org/2001/XMLSchema-instance;soapenv:Body*Login* AesLoginhttp://www.w3.org/2001/XMLSchema-instance%22%3E%3Csoapenv:Body%3E%3CLogin%3E%3CAesLoginchangedOn=0 mask=0 objectId=0 options=0 parentId=0 password=admin userName=admin xmlns=http://xyz.com/abc/types//* Login*/soapenv:Body/soapenv:Envelopehttp://xyz.com/abc/types%22/%3E%3C/Login%3E%3C/soapenv:Body%3E%3C/soapenv:Envelope Note: I am able to achieve this through Axis2 framework . Can anyone help me on this . Is there any way to overcome this issue. Thanks in Advance, Prabhu -- Keith Chapman Senior Software Engineer WSO2 Inc. Oxygenating the Web Service Platform. http://wso2.org/ blog: http://www.keith-chapman.org ?xml version=1.0 encoding=UTF-8? definitions xmlns=http://schemas.xmlsoap.org/wsdl/; xmlns:xs=http://www.w3.org/2001/XMLSchema; xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/; xmlns:tns=http://xyz.com/abc/types; targetNamespace=http://xyz.com/abc/types; name=loc types xs:schema xs:import namespace=http://xyz.com/abc/types; schemaLocation=loc.xsd/ /xs:schema /types message name=ResponseMsg part name=parameter element=tns:Response/ /message message name=LoginRequest part name=Login element=tns:Login/ /message message name=LoginResponse part name=parameter element=tns:Response/ /message portType name=AaaPort operation name=Login input message=tns:LoginRequest/ output message=tns:LoginResponse/ /operation /portType binding name=AaaBinding type=tns:AaaPort soap:binding style=document transport=http://schemas.xmlsoap.org/soap/http/ operation name=Login soap:operation soapAction=Login style=document/ input soap:body use=literal/ /input output soap:body use=literal/ /output /operation /binding service name=aaaService port name=soap binding=tns:AaaBinding soap:address location=https://0.0.0.0/aaa/ /port /service /definitions ?xml version=1.0 encoding=UTF-8? xs:schema xmlns:xs=http://www.w3.org/2001/XMLSchema; targetNamespace=http://xyz.com/abc/types; xmlns=http://xyz.com/abc/types; elementFormDefault=qualified attributeFormDefault=qualified xs:element name=Login type=LoginMethodArgs/ !-- Login -- xs:complexType name=LoginMethodArgs xs:sequence xs:element ref=AesLogin/ /xs:sequence /xs:complexType !-- AesLogin-- xs:element name=AesLogin type=AesLogin/ xs:complexType name=AesLogin xs:complexContent xs:extension base=AesObject xs:attribute name=userName type=xs:string / xs:attribute
Re: Exceptions when using a Rampart client generated from stub classes.
Hi Sanjay, That worked perfectly! Thanks for your advice. On a separate note, I've a question regarding disabling HTTPS. The primary reason I want to do this is because TCPMON can't intercept encrypted messages. I disabled HTTPS by commenting out the following line in the services.xml file : sp:TransportToken wsp:Policy !-- sp:HttpsToken RequireClientCertificate=false/-- /wsp:Policy /sp:TransportToken I'm not clear about your requirements. By commenting out the above line, what do is remove the requirement which says the message MUST come through the HTTPS transport. So if you comment this line and call the web service through HTTP , you will be able to intercept the messages through TCPMON. Is this what you want ? Else if we really want is to disable https for a certain service, Exposing a Service on a Selected Transport section of this tutorial [1]. thanks, nandana [1] - http://wso2.org/library/2060 -- Nandana Mihindukulasooriya WSO2 inc. http://nandana83.blogspot.com/
Re: How to consume .Net ( with WSE3.0 security enabled ) web services using Java Client(Axis 1.3)
Hi Santosh, I have to consume .Net web services( WSE 3.0 enabled) from Java Client. I am using Axis 1.3 , jakarta-tomcat-5.0.28. They have enabled WSE 3.0 in .Net web services ( Doc / Literal web services ). Problem : Security requirements are not satisfied because the security header is not present in the incoming message .When we invoke .Net web services from Java client, we are getting above exception. What will be the possible solution ? You can use Apache Rampart [1] to solve your problem. Apache Rampart is the security module for Axis 2. Can you post the WSDL of the service you want to consume so that I will be able to tell you the exact steps to follow. [1] - http://ws.apache.org/rampart/ -- Nandana Mihindukulasooriya WSO2 inc. http://nandana83.blogspot.com/
Re: How to consume .Net ( with WSE3.0 security enabled ) web services using Java Client(Axis 1.3)
Dear all, can please suggest some tutorial or Link or your guidelines using Axis 1.3 , jakarta-tomcat-5.0.28. Regards Santosh Nunny wrote: Hi Santosh, I have to consume .Net web services( WSE 3.0 enabled) from Java Client. I am using Axis 1.3 , jakarta-tomcat-5.0.28. They have enabled WSE 3.0 in .Net web services ( Doc / Literal web services ). Problem : Security requirements are not satisfied because the security header is not present in the incoming message .When we invoke .Net web services from Java client, we are getting above exception. What will be the possible solution ? You can use Apache Rampart [1] to solve your problem. Apache Rampart is the security module for Axis 2. Can you post the WSDL of the service you want to consume so that I will be able to tell you the exact steps to follow. [1] - http://ws.apache.org/rampart/ -- Nandana Mihindukulasooriya WSO2 inc. http://nandana83.blogspot.com/ -- View this message in context: http://www.nabble.com/soapenv%3AServer.userException---SimpleDeserializer-encountered-a-child-element%2C-which-is-NOT-expected%2C-in-something-it-was-trying-to-deserialize-tp16296688p18273078.html Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
newbie question regarding rampart samples and tcpmon
Hi, I'm new to AXIS2 and rampart. However in a first step I got a simple unsecure webservice running with AXIS2-server and a gsoap client. In a second step I installed rampart and tried to execute the samples. I run sample02 successful (I copied the sample02.aar to axis2-1.4/repository/services and run ant client.02). Next step was to observe the SOAP-messages exchanged with tcpmon (at least I thought so...). I started tcpmon listening on port 9080 changed property name=client.port value=9080/ in ../rampart-1.3/samples/basic and started the client again. Now I get an exception: [java] Exception in thread main org.apache.axis2.AxisFault: Connection reset [java] at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430) [java] at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:193) In tcpmon I see: POST /axis2/services/sample02 HTTP/1.1 java.net.MalformedURLException: no protocol: axis2/services/sample02 at java.net.URL.init(URL.java:567) at java.net.URL.init(URL.java:464) at java.net.URL.init(URL.java:413) at org.apache.ws.commons.tcpmon.Connection.run(Connection.java:276) How can this be solved ? Regards, Thomas -- Otto Software Partner GmbH Tel.: 0351/49723 158 Email: [EMAIL PROTECTED] 01067 Dresden, Freiberger Str.35 - AG Dresden, HRB 2475 Geschäftsführer: Burkhard Arrenberg, Heinz A. Bade, Jens Gruhl - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]