On client side:
generate necessary pem files:
(1) private key/certificate pem file:
openssl pkcs12 -in in_file.p12 -clcerts -out key_out_file.pem
(2) generate CA certificate pem file (NOTE: Do NOT use -clcerts here, because the fifth parameter of soap_ssl_client_context requires a CA certificate):
openssl pkcs12 -in in_file.p12 -cacerts -out cert_out_file.pem
(3) use in soap_ssl_client_context()
if (soap_ssl_client_context( &soap,
SOAP_SSL_DEFAULT,
"key_out_file.pem",
"your_pw",
"cert_out_file.pem",
NULL,
NULL))
{ // print ... error }
Friday, October 1, 2010
Monday, September 13, 2010
GEnerate gsoap
gcc -o iplookup iplookup.c soapC.c soapClient.c -L/usr/local/lib - lgsoap -lm -lsocket -lnsl
gcc test.c soapC.c -lgsoap
works for me
gcc test.c soapC.c -lgsoap
works for me
Thursday, September 9, 2010
How to make Virtual keyboard and SCIM co-exist on N900
(1) Install MSCIM and whatever input methods you want
(2) Go to /etc/gtk-2.0/, create two files as follows
first file: vb (for Virtual Keyboard)
"/usr/lib/gtk-2.0/2.10.0/immodules/hildon-im-module.so"
"hildon-input-method" "Hildon Input Method" "hildon-input-method-framework" "/usr/share/locale" "*"
Second file: scim (for MSCIM)
"/usr/lib/gtk-2.0/2.10.0/immodules/im-scim.so"
"scim" "SCIM Input Method" "scim" "/usr/share/locale" "*"
(3) in the same directory, create another two files:
first file: vb.sh
cp /etc/gtk-2.0/vb /etc/gtk-2.0/gtk.immodules
second file: scim.sh
cp /etc/gtk-2.0/scim /etc/gtk-2.0/gtk.immodules
then chmod to these two files
>>root
>>chmod +x vb.sh scim.sh
(4) make two symbolic links in /usr/bin/
ln -s /etc/gtk-2.0/vb.sh /usr/bin/vb
ln -s /etc/gtk-2.0/scim.sh /usr/bin/scim
(5) if you want to use virtual keyboard, remember to retract the physical keyboard first, then type in
>>root
>>vb
if you want to use MSCIM:
>>root
>>scim
(2) Go to /etc/gtk-2.0/, create two files as follows
first file: vb (for Virtual Keyboard)
"/usr/lib/gtk-2.0/2.10.0/immodules/hildon-im-module.so"
"hildon-input-method" "Hildon Input Method" "hildon-input-method-framework" "/usr/share/locale" "*"
Second file: scim (for MSCIM)
"/usr/lib/gtk-2.0/2.10.0/immodules/im-scim.so"
"scim" "SCIM Input Method" "scim" "/usr/share/locale" "*"
(3) in the same directory, create another two files:
first file: vb.sh
cp /etc/gtk-2.0/vb /etc/gtk-2.0/gtk.immodules
second file: scim.sh
cp /etc/gtk-2.0/scim /etc/gtk-2.0/gtk.immodules
then chmod to these two files
>>root
>>chmod +x vb.sh scim.sh
(4) make two symbolic links in /usr/bin/
ln -s /etc/gtk-2.0/vb.sh /usr/bin/vb
ln -s /etc/gtk-2.0/scim.sh /usr/bin/scim
(5) if you want to use virtual keyboard, remember to retract the physical keyboard first, then type in
>>root
>>vb
if you want to use MSCIM:
>>root
>>scim
Sunday, August 29, 2010
Call of Duty Modern Warfare 2原声碟
尽管Call of Duty Modern Warfare的背景音乐也不错,但是大师毕竟是大师,Hans Zimmer在Modern Warfare II中的作曲表现对该作品在英美游戏排行榜的影响应该是功不可没的。从动画片狮子王,特种作战大片石破天惊到现在的现代战争2,大师的每次背景音乐总能展现深厚,雄伟,旷大的气势。尽管不是反映历史沉重的题材,但军乐队,交响乐及电子合成交替的完美运用却隐约展现一种沉淀,以至于将作品衬托为史诗般的巨作,的确能够让人不惜滥美之词。本文针对现代战争2的原声碟发表一些个人对应观点,顺便For the Record
Safeguard


Guerrilla Tactics

Deadline

Breach


Ordinance

Code of Conduct

Protocol

Safeguard


Guerrilla Tactics

Deadline

Breach


Ordinance

Code of Conduct

Protocol


Friday, August 27, 2010
How to get Xilinx XUP Virtex II PRO to work in Ubuntu 10.04
(1) follow aclevername.com
(2) get the product id right in >>lsusb
(3) install usb-driver-HEAD.tar.gz
(2) get the product id right in >>lsusb
(3) install usb-driver-HEAD.tar.gz
Wednesday, July 28, 2010
How to make a clone of Virtualbox image and run multiple Virtual machines at the same time
From http://forums.virtualbox.org/viewtopic.php?t=674
1) Shut down the virtual machine you would like to copy
2) In File > Virtualdiskmanager, select the virtual machine disk image you would like to copy, and press the Release button and DELETE it from the menu BUT keep the image on the harddrive.
3) In a terminal window, issue following command (see virtualbox user manual):
vboxmanage clonevdi /directory/image1.vdi /directory/image2.vdi
4) In File > Virtualdiskmanager, add the new disk image you've created in step 3.
5) In the main virtualbox window, press the New button to create a new virtual machine, and link it to the new disk image you've created.
1) Shut down the virtual machine you would like to copy
2) In File > Virtualdiskmanager, select the virtual machine disk image you would like to copy, and press the Release button and DELETE it from the menu BUT keep the image on the harddrive.
3) In a terminal window, issue following command (see virtualbox user manual):
vboxmanage clonevdi /directory/image1.vdi /directory/image2.vdi
4) In File > Virtualdiskmanager, add the new disk image you've created in step 3.
5) In the main virtualbox window, press the New button to create a new virtual machine, and link it to the new disk image you've created.
Saturday, July 24, 2010
How to use wsdl file to generate c/c++ files
This setup is based on Debian/Ubuntu system and doesn't involve any installation of Apache/Axis
(1)Install Java (run-time package is enough, but javac is a bonus, though I don't think I used javac in this setup). Note:install some new version, I used version 1.6.
(2)Download Axis C++ bin from Apache.org, decompress it. Note that there is a lib/axisjava folder and all the necessary Axis Java files used by Axis C++ are in there, so we don't have to download Axis Java anymore (however, if you try to use log4j you HAVE TO download Axis Java bin/src). And make sure in lib/axis there is already a wsdl2ws.jar in place, or you have to install ant and build the jar from source (which I didn't do)
(3)Edit CLASSPATH environment variable, here is my CLASSPATH variable
AXIS_C_HOME="type in your full directory path where Axis C++ bin is decompressed to"
AXIS_C_LIB=$AXIS_C_HOME/lib/axisjava
CLASSPATH=$AXIS_C_HOME/lib/axis/wsdl2ws.jar:
$AXIS_C_LIB/axis.jar:
$AXIS_C_LIB/wsdl4j.jar:
$AXIS_C_LIB/commons-discovery.jar:
$AXIS_C_LIB/commons-logging.jar:
$AXIS_C_LIB/jaxrpc.jar:
$AXIS_C_LIB/saaj.jar:
$CLASSPATH
export CLASSPATH
Note: if you want to use log4j, it should be located in $/lib/log4j-version.jar
you will need to include this path to CLASSPATH also.
Also note: if you want to set this varibale permanent, put the above stuff in .profile in your home directory, logout, and login again to take effect. To make sure: printenv $CLASSPATH
(4)Now we're ready to generate some c/c++ files using wsdl templete, here are some examples to generate client side wrapper:
c++:
java org.apache.axis.wsdl.wsdl2ws.WSDL2Ws -sclient -lc++ "your wsdl file full path"
c:
java org.apache.axis.wsdl.wsdl2ws.WSDL2Ws -sclient -lc "your wsdl file full path"
if the above don't work (which shouldn't been the case...), try:
c++:
java -classpath $CLASSPATH org.apache.axis.wsdl.wsdl2ws.WSDL2Ws -sclient -lc++ "your wsdl file full path"
c:
java -classpath $CLASSPATH org.apache.axis.wsdl.wsdl2ws.WSDL2Ws -sclient -lc "your wsdl file full path"
(1)Install Java (run-time package is enough, but javac is a bonus, though I don't think I used javac in this setup). Note:install some new version, I used version 1.6.
(2)Download Axis C++ bin from Apache.org, decompress it. Note that there is a lib/axisjava folder and all the necessary Axis Java files used by Axis C++ are in there, so we don't have to download Axis Java anymore (however, if you try to use log4j you HAVE TO download Axis Java bin/src). And make sure in lib/axis there is already a wsdl2ws.jar in place, or you have to install ant and build the jar from source (which I didn't do)
(3)Edit CLASSPATH environment variable, here is my CLASSPATH variable
AXIS_C_HOME="type in your full directory path where Axis C++ bin is decompressed to"
AXIS_C_LIB=$AXIS_C_HOME/lib/axisjava
CLASSPATH=$AXIS_C_HOME/lib/axis/wsdl2ws.jar:
$AXIS_C_LIB/axis.jar:
$AXIS_C_LIB/wsdl4j.jar:
$AXIS_C_LIB/commons-discovery.jar:
$AXIS_C_LIB/commons-logging.jar:
$AXIS_C_LIB/jaxrpc.jar:
$AXIS_C_LIB/saaj.jar:
$CLASSPATH
export CLASSPATH
Note: if you want to use log4j, it should be located in $
Subscribe to:
Posts (Atom)