How to create a SSL client to support https
Hi all, I have followed the installation guide to compile source codes including ENABLE_SSL=1 successfully. It could support http protocol well but failed to support https. I have checked axis-c-user mail list and found some similar articles to handle this problem, like: you can give the certificates as a parameter in axis2.xml |parameter name=SERVER_CERT/path/to/ca/certificate/parameter|| ||| or as properties set in the code. eg: ssl_ca_file = axis2_property_create(env); AXIS2_PROPERTY_SET_VALUE(ssl_ca_file, env, axis2_strdup(/home/user/cacert.pem, env)); AXIS2_OPTIONS_SET_PROPERTY(options, env, SERVER_CERT, ssl_ca_file); Note that you have to create a property and set it using the AXIS2_OPTIONS_SET_PROPERTY function call. ** When using AXIS2_OPTIONS_SET_PROPERTY() first you need to create an axis2_property_t instance and then set it. eg. axis2_property_t *ssl_server_cert_prop = axis2_property_create_with_args(env, 0, AXIS2_TRUE, 0, AXIS2_STRDUP(cert_filename, env)); AXIS2_OPTIONS_SET_PROPERTY(options, env, SERVER_CERT, ssl_server_cert_prop); But it failed in my environment, because I can't find some apis and variable name at all, like axis2_property_t and AXIS2_OPTIONS_SET_PROPERTY. I used official version axis2c-src-1.0.0 and changed axis2.xml like: transportSender name=https class=axis2_http_sender parameter name=PROTOCOL locked=falseHTTP/1.1/parameter /transportSender parameter name=SERVER_CERT/path/to/ca/certificate/parameter !--parameter name=KEY_FILE/path/to/client/certificate/chain/file/parameter parameter name=SSL_PASSPHRASEpassphrase/parameter -- At the same time, I called following apis in my program: axis2_options_set_soap_version(options, env, AXIOM_SOAP12); axis2_options_set_transport_in_protocol(options, env, AXIS2_TRANSPORT_ENUM_HTTPS); But the server I built by myself didn't have any response and get error code 82, Input stream is NULL in msg_ctx. What apis should I call to support https and how to config axis2.xml to specify pem file both under needing authentication and no needing authentication? I am freshman to Axis2/C, so pls. tell me detailedly:) Thanks a lot. Kelvin.Lin - Don't be flakey. Get Yahoo! Mail for Mobile and always stay connected to friends.
Re: How to create a SSL client to support https
Hi Kelvin, Find my comments inline. Kelvin Lin wrote: Hi all, But it failed in my environment, because I can't find some apis and variable name at all, like axis2_property_t and AXIS2_OPTIONS_SET_PROPERTY. Those instructions were intended for v0.96. Since v1.0 the util declarations were renamed with a axutil_ prefix and the macros were dropped. Hence these should be axutil_property_t and axis2_options_set_property respectively. I used official version axis2c-src-1.0.0 and changed axis2.xml like: transportSender name=https class=axis2_http_sender parameter name=PROTOCOL locked=falseHTTP/1.1/parameter /transportSender parameter name=SERVER_CERT/path/to/ca/certificate/parameter !--parameter name=KEY_FILE/path/to/client/certificate/chain/file/parameter parameter name=SSL_PASSPHRASEpassphrase/parameter -- This is all you need in order to get ssl working, usually. :) At the same time, I called following apis in my program: axis2_options_set_soap_version(options, env, AXIOM_SOAP12); axis2_options_set_transport_in_protocol(options, env, AXIS2_TRANSPORT_ENUM_HTTPS); Axis2 engine should set the appropriate protocols according to the epr that you use. For example for a https endpoint, axis2 engine would look at the https:// uri and understand that the protocol that should be used is https. In particular, setting transport_in protocol is not useful if you are not using different ports to send and receive messages (dual client). But the server I built by myself didn't have any response and get error code 82, Input stream is NULL in msg_ctx. That is because our simple_axis_server is not capable of handling ssl. Please refer to the axis2 manual [1] for more information on deploying axis2 in apache2 server. Make sure to have mod_ssl installed. What apis should I call to support https and how to config axis2.xml to specify pem file both under needing authentication and no needing authentication? There are three properties that are related to ssl transport, SERVER_CERT, KEY_FILE and SSL_PASSPHRASE. Please refer to [2] for more information on each. This is how you set the SERVER_CERT for expample: axutil_property_t ssl_ca_file = axutil_property_create(env); axutil_property_set_value(ssl_ca_file, env, axutil_strdup(env, /home/dumindu/dummyCA/demoCA/cacert.pem)); axis2_options_set_property(options, env, SERVER_CERT, ssl_ca_file); You can set the other three properties accordingly, too. These properties however, are *not needed* to be set in the code, if you can set them in axis2.xml. Tutorial [2] was written a while back, so there can be a few errors. Please let me know if you find any :) Regards, Dumindu. [1] http://ws.apache.org/axis2/c/docs/axis2c_manual.html#mod_axis2 [2] http://people.apache.org/~dumindu/HowToConfigureSSL.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to create a SSL client to support https
Hi Dumindu, Thank you very much. You pull me out from the mess and give me the confidence to finish the work. But because I will be not available in the following three days, I have to try your method in next Monday(China Time). And if there are any problems, I will tell you. I skim your reply and I have a question about this paragraph: That is because our simple_axis_server is not capable of handling ssl. Please refer to the axis2 manual [1] for more information on deploying axis2 in apache2 server. Make sure to have mod_ssl installed. I used IBM Websphere as http server. Does it matter to the solution. Thanks a lot again. Kelvin.Lin Dumindu Pallewela [EMAIL PROTECTED] wrote: Hi Kelvin, Find my comments inline. Kelvin Lin wrote: Hi all, But it failed in my environment, because I can't find some apis and variable name at all, like axis2_property_t and AXIS2_OPTIONS_SET_PROPERTY. Those instructions were intended for v0.96. Since v1.0 the util declarations were renamed with a axutil_ prefix and the macros were dropped. Hence these should be axutil_property_t and axis2_options_set_property respectively. I used official version axis2c-src-1.0.0 and changed axis2.xml like: HTTP/1.1 /path/to/ca/certificate name=KEY_FILE/path/to/client/certificate/chain/file passphrase -- This is all you need in order to get ssl working, usually. :) At the same time, I called following apis in my program: axis2_options_set_soap_version(options, env, AXIOM_SOAP12); axis2_options_set_transport_in_protocol(options, env, AXIS2_TRANSPORT_ENUM_HTTPS); Axis2 engine should set the appropriate protocols according to the epr that you use. For example for a https endpoint, axis2 engine would look at the https:// uri and understand that the protocol that should be used is https. In particular, setting transport_in protocol is not useful if you are not using different ports to send and receive messages (dual client). But the server I built by myself didn't have any response and get error code 82, Input stream is NULL in msg_ctx. That is because our simple_axis_server is not capable of handling ssl. Please refer to the axis2 manual [1] for more information on deploying axis2 in apache2 server. Make sure to have mod_ssl installed. What apis should I call to support https and how to config axis2.xml to specify pem file both under needing authentication and no needing authentication? There are three properties that are related to ssl transport, SERVER_CERT, KEY_FILE and SSL_PASSPHRASE. Please refer to [2] for more information on each. This is how you set the SERVER_CERT for expample: axutil_property_t ssl_ca_file = axutil_property_create(env); axutil_property_set_value(ssl_ca_file, env, axutil_strdup(env, /home/dumindu/dummyCA/demoCA/cacert.pem)); axis2_options_set_property(options, env, SERVER_CERT, ssl_ca_file); You can set the other three properties accordingly, too. These properties however, are *not needed* to be set in the code, if you can set them in axis2.xml. Tutorial [2] was written a while back, so there can be a few errors. Please let me know if you find any :) Regards, Dumindu. [1] http://ws.apache.org/axis2/c/docs/axis2c_manual.html#mod_axis2 [2] http://people.apache.org/~dumindu/HowToConfigureSSL.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Sick sense of humor? Visit Yahoo! TV's Comedy with an Edge to see what's on, when.
Error accessing bootstrap method
Hi, I am trying to initialize the builder factory by calling DefaultBootstrap.bootstrap() method and getting the following error. Can you please help? [7/5/07 16:17:37:852 EDT] 0020 SystemErr R java.lang.NullPointerException [7/5/07 16:17:37:867 EDT] 0020 SystemErr Rat org.apache.xerces.jaxp.DocumentBuilderFactoryImpl.getAttribute(Unknown Source) [7/5/07 16:17:37:867 EDT] 0020 SystemErr Rat org.apache.xerces.jaxp.DocumentBuilderFactoryImpl.newDocumentBuilder(Unknown Source) [7/5/07 16:17:37:867 EDT] 0020 SystemErr Rat org.opensaml.xml.parse.BasicParserPool.createBuilder( BasicParserPool.java:506) [7/5/07 16:17:37:867 EDT] 0020 SystemErr Rat org.opensaml.xml.parse.BasicParserPool.getBuilder(BasicParserPool.java:158) [7/5/07 16:17:37:867 EDT] 0020 SystemErr Rat org.opensaml.xml.parse.BasicParserPool.parse(BasicParserPool.java:199) [7/5/07 16:17:37:867 EDT] 0020 SystemErr Rat org.opensaml.xml.XMLConfigurator.load(XMLConfigurator.java:128) [7/5/07 16:17:37:867 EDT] 0020 SystemErr Rat org.opensaml.DefaultBootstrap.initializeXMLTooling( DefaultBootstrap.java:131) [7/5/07 16:17:37:867 EDT] 0020 SystemErr Rat org.opensaml.DefaultBootstrap.bootstrap(DefaultBootstrap.java:73) Thanks Sharada The contents of this email are the property of the sender. If it was not addressed to you, you have no legal right to read it. If you think you received it in error, please notify the sender. Do not forward or copy without permission of the sender. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: WSDL4CPP 0.9.2b is released
Samisa Abeysinghe [EMAIL PROTECTED] writes: How does this relate to Axis2/C? Have you developed an Axis2/C extension, plugin with this software? It's just clumsy advertisement I guess. thanks, Dinesh -- Dinesh Premalal http://xydinesh.wordpress.com/ GPG ID : A255955C GPG Key Finger Print : C481 E5D4 C27E DC34 9257 0229 4F44 266E A255 955C - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]