Java is a great tool as a language but sucks at some points. Why can't I use two different keystore files in my application? One for my embedded Axis/Jetty server and one for my Axis WS client. I know, when it comes to connection any fools out there whom prefer instant production would suggest using plain HTTP connection. Mind you! I will never let any of my product with that kind of quality. And I would not have my quality time of playing wasted on the overkill productivity such as write yet another WS library. Just leave the SAX and those JAX-RPC, JAX-WS, and WS-* to the right people and Apache is them.
Oh, btw, to have your own keystore just put these lines in the main:
I know, you can use the funky way like mentioning it in command lines by adding
Anyway, I don't want to lose in despair of inability to have two different keystore. So, I manage to learn about the
Anyway, as I see the working example of WSO2/PHP, I think the PHP dev guy just not see the example, yet. You don't need to make your own WSDD, WSDL, or the worst: some SOAP messages. I think the poor guy just watch the Download page without seeing the Library page where the tiny description tells about tutorial. Hmm... I guest I just tell him later.
The Debian package of WSO/PHP is not so Debian. It assumes that we have a working Apache server as the front end of PHP. The workaround of that is to create a
Okay, this is getting lame. I think I will continue about WS later on. Oh, just in case you don't know, WS is abbreviation of Web Service.
Oh, btw, to have your own keystore just put these lines in the main:
System.setProperty("javax.net.ssl.trustStore", "YOUR_KEYSTORE");
System.setProperty("javax.net.ssl.trustStorePassword", "YOUR_PASSWORD");
I know, you can use the funky way like mentioning it in command lines by adding
-Djavax.net.ssl.trustStore=YOUR_KEYSTORE -Djavax.net.ssl.trustStorePassword=YOUR_PASSWORD
to the command line. I added that to my Axis AdminClient utility. But, I don't recommend that, especially when using SSL for a server. It could be exposed by a naughty user. If you would like to debug, you could add -Djava.protocol.handler.pkgs=com.sun.net.ssl.internal.www.protocol -Djavax.net.debug=ssl
Anyway, I don't want to lose in despair of inability to have two different keystore. So, I manage to learn about the
keytool
command tool provided by Sun's JDK. I just need to store the certificates in one keystore. I know about the way to store the certificates in single command line, but I have to use two command lines because of the forgetfulness. For the sake of laziness, let me show you:- Suppose we have generate a Keystore for our server side:
keytool -genkey -keystore aKeystore.jks -keyalg RSA
- And we want to merge the other keystore which contain certificates of other server.
keytool -export -alias keyAlias -keystore yetAnotherKeystore.jks -file outputFile.cert
keytool -import -alias keyAlias -keystore aKeystore.jks -trustcacerts -file outputFile.cert
keytool -list -keystore yetAnotherKeystore.jks
- But, if you don't get it, just google it.
Anyway, as I see the working example of WSO2/PHP, I think the PHP dev guy just not see the example, yet. You don't need to make your own WSDD, WSDL, or the worst: some SOAP messages. I think the poor guy just watch the Download page without seeing the Library page where the tiny description tells about tutorial. Hmm... I guest I just tell him later.
The Debian package of WSO/PHP is not so Debian. It assumes that we have a working Apache server as the front end of PHP. The workaround of that is to create a
/etc/php5/apache2/php.ini
file. After that, split the file configuration accordingly. For the sake of laziness, I'll just show you:- Append these lines in the php.ini:
[wsf]
wsf.home="/usr/lib/php5/20060613+lfs/wsf_c"
wsf.log_path="/tmp"
wsf.rm_db_dir="/tmp - Put the loading extension in
/etc/php5/conf.d/wso.ini
:
# WSO/2 PHP Extension
extension=wsf.so
wso.ini
as whatever in case you don't like the name. Btw, As I dive, I think the poor PHP dev guy is using MTOM mode for generating the WS. No wonder he is exposed to the cryptic SOAP.Okay, this is getting lame. I think I will continue about WS later on. Oh, just in case you don't know, WS is abbreviation of Web Service.
Comments
Post a Comment