SOCKETTechnical blog for SOCKEThttp://www.agbooth.com/SOCKETBlog/www.socketelf.org_8080/roller/socket/feed/entries/atom2008-05-06T18:15:30+01:00Apache Roller (incubating)http://www.agbooth.com/SOCKETBlog/www.socketelf.org_8080/roller/socket/entry/running_in_the_derby.htmlRunning in the DerbyBrian Peter Clark2006-05-19T17:06:09+01:002007-09-10T19:20:06+01:00
<p>The Derby database, of course. Going on general reports, recommendations from a colleague, and mutterings from my Auntie Fanny, the decision has been made to use Apache Derby as the back end for the jUDDI registry. The most obvious advantage is ease of deployment and portability. The whole of SOCKET can be wrapped up in a WAR with the derby.jar file nicely stowed away inside.</p>
<p>Derby is ridiculously straightforward to crank up, especially with the aid of the book, Apache Derby - Off to the Races - Includes Details of IBM Cloudscape, by Paul C. Zikopoulos, Dan Scott and George Baklarz out of IBM Press, Pearson (2006). This book is a real pleasure to fondle. Beautiful crisp, black, blue and white IBM theme with a blurred hossie on the front. A sturdy hardback, well laid out and good quality paper. </p>
<p>I provide below some jottings on how to start experimenting with the database under Java on Windows XP.</p>
<p>Get the latest stable release from http://db.apache.org/derby/derby_downloads.html. This is presently 10.1.2.1. The lib download is fine: db-derby-10.1.2.1-lib.zip.</p>
<p>Unzipping this download reveals a few derby jars plus some internationalization jars. For the moment, the two important ones here are derby.jar and derbytools.jar. derby.jar contains the database files while derbytools.jar has inside it 'ij', the Apache Derby JDBC scripting tool, using which you can execute SQL scripts against Derby databases.</p>
<p>Add these two files to your Java classpath by first opening the My Computer window, right-clicking and selecting Properties to summon the System Properties window. Select the Advanced tab and then the Environment Variables button. Make a new user variable called CLASSPATH. My value for this was </p>
<p>D:/derby/db-derby-10.1.2.1-lib/lib/derbytools.jar;D:/derby/db-derby-10.1.2.1-lib/lib/derby.jar</p>
<p>If there are already entries in the CLASSPATH variable, just tack these two soldiers on the end with semi-colon separators.</p>
<p>Now you can use the ij tool to create a database as shown below.</p>
<p><img src="/roller/resources/socket/ij.jpg" alt="using ij to create Apache derby database"></p>
<p>There is now a directory D:/JUDDI containing the Derby files for the JUDDI database. You can add a path to the directory when you create it.</p>
<p>Add dataEncryption=true;bootPassword=myBootPassword to encrypt the newly created database. In this case the bootPassword property of the connection object must be set to myBootPassword to gain access.</p>
<p>Now you can write a little Java program to access the database:</p>
<p>package derbytest;</p>
<p>import java.sql.*;<br/>
import javax.sql.*;<br/>
import java.io.*;<br/>
import java.math.*;<br/>
import java.text.*;<br/>
import java.util.*;</p>
<p>public class DerbyCranker {</p>
<p> public DerbyCranker() {<br/>
}</p>
<p> public static void main(String[] args) {<br/>
DerbyCranker derbyCranker1 = new DerbyCranker();<br/>
String DerbyDriver = "org.apache.derby.jdbc.EmbeddedDriver";</p>
<p> try {<br/>
Class.forName(DerbyDriver).newInstance();<br/>
System.out.println("Driver located and loaded.");<br/>
}<br/>
catch (Exception NoDriver) {<br/>
System.out.println("No driver: " + DerbyDriver);<br/>
System.exit(1);<br/>
}</p>
<p> String url = "jdbc:derby:D:/JUDDI";<br/>
Properties properties = new Properties();<br/>
properties.put("retrieveMessagesFromServerOnGetMessage", "true");<br/>
try {<br/>
Connection conn = DriverManager.getConnection(url, properties);<br/>
.<br/>
.<br/>
.<br/>
conn.close();<br/>
}<br/>
catch (SQLException se) {<br/>
String SQLState = se.getSQLState();<br/>
String SQLMessage = se.getMessage();<br/>
System.out.println("Error: " + SQLState);<br/>
System.out.println(SQLMessage);<br/>
}<br/>
}<br/>
}</p>
<p>Hours of fun.</p>
http://www.agbooth.com/SOCKETBlog/www.socketelf.org_8080/roller/socket/entry/juudi_installation.htmljUDDI InstallationRob Garbutt2006-04-27T15:54:23+01:002007-09-10T19:20:06+01:00<p><strong><font size="4" face="Arial, Helvetica, sans-serif">jUUDI Installation</font></strong></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">The installation of jUDDI
is fairly straight forward, however, there are some quirks...as with all things.</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">The quirks lie with installing
jUUDI on Tomcat 5.5.x as opposed to 5.0.x and below. I'll shall come to this
in a bit.</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">Firstly, download the jUDDI package
into your home directory from:-</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif"><a href="http://ws.apache.org/juddi/releases.html" target="_blank">http://ws.apache.org/juddi/releases.html</a></font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">Get the latest and greatest.</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">tar zxvf juddi.tar.gz</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">Then copy the .war file that resides
within the jUDDI directory into your webapps directory</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">cp juddi/juddi.war /path/to/tomcat/webapps</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif"><strong>MySQL</strong> - Database
creation and population</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">You need to run 2 x .sql
scripts that come with the jUDDI package. These are:-</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">/path/to/juddipackage/sql/mysql/create_database.sql<br>
/path/to/juddipackage/sql/mysql/insert_publishers.sql</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">You can run these by doing the following:-</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif"># mysql -u root -p < /path/to/juddipackage/sql/mysql/create_database.sql<br>
password:</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif"># mysql -u root -p juddi
< /path/to/juddipackage/sql/mysql/insert_publishers.sql<br>
password:</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">You now need to populate the database
with a user. Do this by logging into the MySQL console and running the following
sql.</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif"># mysql -u root -p<br>
password:</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">mysql> use juddi;<br>
INSERT INTO PUBLISHER (PUBLISHER_ID,PUBLISHER_NAME,IS_ADMIN,IS_ENABLED)<br>
VALUES ('jdoe','John Doe','false','true');</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif"><strong>Final tweaks</strong></font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">Finally, create a file called
juddi.xml in /path/to/tomcat/server/Catalina/localhost and enter the following:-</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif"><Context path="/juddi"
docBase="juddi" debug="5" reloadable="true"<br>
crossContext="true"><br>
<Logger className="org.apache.catalina.logger.FileLogger"<br>
prefix="localhost_juddiDB_log" suffix=".txt"<br>
timestamp="true"/><br>
<!-- the Resource element will probably work better for<br>
you on Tomcat 5+ if you simply use a Resource only tag<br>
with xml attributes as opposed to the nested ResourceParams and<br>
parameter elements --><br>
<Resource name="jdbc/juddiDB" auth="Container"<br>
type="javax.sql.DataSource" maxActive="100" maxIdle="30"
maxWait="10000"<br>
username="juddi" password="******"<br>
driverClassName="org.gjt.mm.mysql.Driver"<br>
url="jdbc:mysql://localhost:3306/juddi?autoReconnect=true" /><br>
</Context></font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">***this is code required
for tomcat 5.5.x and is not stated in the official jUDDI docs. It is different
for 5.0.x and below*** </font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">Amend as necessary to match your
MySQL details, e.g. change the username and password.</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">To enable log4j, you need to create
a file at juddi/WEB-INF/classes/log4j.properties. In that file enter:-</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">#<br>
# set the log file to ${HOME}/juddi.log and not the ${PWD}/juddi.log<br>
#<br>
log4j.appender.LOGFILE.File=/opt/tomcat/logs/juddi.log</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">and amend the file juddi.properties
at:-</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">/juddi/WEB-INF/judi.properties to
suit e.g:-</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif"># The UDDI Operator Name<br>
juddi.operatorName =socket1.leeds.ac.uk</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">Then simply restart tomcat and browse
to:-</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">http://localhost/juddi</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">click on 'validate' and see the output
for any errors.</font></p>http://www.agbooth.com/SOCKETBlog/www.socketelf.org_8080/roller/socket/entry/tomcat_installation.htmlTomcat InstallationRob Garbutt2006-04-27T08:21:45+01:002007-09-10T19:20:06+01:00<p><font size="3" face="Arial, Helvetica, sans-serif"><strong>Tomcat Installation</strong></font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">Prerequisites: Java 1.5</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">Firstly download the latest and greatest
Tomcat binary distribution from:-</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif"><a href="http://tomcat.apache.org/download-55.cgi" target="_blank">http://tomcat.apache.org/download-55.cgi</a></font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">The latest version at the time of
this writing, is 5.5.16</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">Tomcat 5.5.x strictly requires Java
1.5, so this needs to be installed prior to installation.</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">so the commands:-</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">mv jakarta-tomcat-5.5.10.tar.gz /usr/local/jakarta-tomcat-5.5.10.tar.gz<br>
cd /usr/local<br>
tar zxvf jakarta-tomcat-5.5.x.tar.gz</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">Owing to the long name of
the directory, you may want to rename this to simply tomcat, so:-</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">mv /usr/local/jakarta-tomcat-5.5.10
/usr/local/tomcat</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">To start tomcat:-</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif"><strong>/usr/local/tomcat/bin/startup.sh</strong></font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">Then browse to:-</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif"><a href="http://myIPaddress:8080">http://myIPaddress:8080</a>,
and you should see the famous cat!</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">To stop tomcat:-</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif"><strong>/usr/local/tomcat/bin/shutdown.sh</strong></font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">Many instances of tomcat
can run on the same server, simply change the <strong>http</strong>, <strong>https</strong>
and <strong>shutdown</strong> port numbers in <strong>/usr/local/tomcat/conf/server.xml</strong>
so that they don't clash.</font></p>http://www.agbooth.com/SOCKETBlog/www.socketelf.org_8080/roller/socket/entry/mysql_j_connector_j_3.htmlMySQL J Connector/J 3.1 InstallationRob Garbutt2006-04-24T21:24:43+01:002007-09-10T19:20:06+01:00<p><font size="2" face="Arial, Helvetica, sans-serif">MySQL Connector/J 3.1 installation</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">Download the connector from:-</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif"><a href="http://dev.mysql.com/downloads/connector/j/3.1.html" target="_blank">http://dev.mysql.com/downloads/connector/j/3.1.html</a><br>
<a href="http://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-3.1.12.tar.gz/from/http://www.mirrorservice.org/sites/ftp.mysql.com/">http://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-3.1.12.tar.gz/from/http://www.mirrorservice.org/sites/ftp.mysql.com/</a></font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">tar zxvf mysql-connector-3.1.tar.gz<br>
cd mysql-connector-3.1</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">Then copy the .jar file into either:-</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">cp mysql-connector-3.1.jar /path/to/jdk/jre/lib/ext</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">or</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">cp mysql-connector-3.1.jar /path/to/tomcat/common/lib</font></p>http://www.agbooth.com/SOCKETBlog/www.socketelf.org_8080/roller/socket/entry/mysql_installation.htmlMySQL InstallationRob Garbutt2006-04-24T21:14:26+01:002007-09-10T19:20:06+01:00<p><font size="2" face="Arial, Helvetica, sans-serif">MySQL Installation</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">To install MySQL version
4.0, 4.1 or 5.0 do the following...<br>
<br>
as root:-<br>
<br>
download stable mysql 4.0 binary release from:- http://www.mysql.com/downloads/download.php</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">tar zxvf mysqlbinary.tar.gz<br>
mv mysqlbinary /usr/local/mysql (rename the untarred file 'mysql' and move it
into /usr/local)</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif"> bash#groupadd mysql<br>
bash# useradd -g mysql mysql<br>
bash# passwd mysql<br>
password: mysqlpassword (give the mysql unix account password)<br>
bash# cd /usr/local/mysql<br>
bash# scripts/mysql_install_db<br>
bash# chown -R mysql:mysql /usr/local/mysql/data<br>
bash# bin/mysqld_safe --user=mysql &</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">to start the mysql daemon:<br>
/usr/local/mysql/bin/mysqld_safe --user=mysql &</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">to add root password:<br>
/usr/local/mysql /bin/mysqladmin -u root password 'new-password'</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">ln -s /usr/local/mysql/bin/mysql
/usr/sbin/mysql or add to PATH to aid easy admin of MySQL</font></p>http://www.agbooth.com/SOCKETBlog/www.socketelf.org_8080/roller/socket/entry/python_installation.htmlPython InstallationRob Garbutt2006-04-24T17:43:48+01:002007-09-10T19:20:06+01:00<br><br><font size="2" face="Arial, Helvetica, sans-serif">To install the latest version
of Python. </font><font face="Arial, Helvetica, sans-serif">
<p><font size="2" face="Arial, Helvetica, sans-serif">Download Python from:-</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif"><a href="http://www.python.org/" target="_blank">http://www.python.org/</a></font></p>
<p><font size="2">tar zxvf python.tgz</font></p>
<p><font size="2">cd /path/to/python</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">./configure --prefix=/path/to/desiredlocation
--enable-shared<br>
make <br>
make install.</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">Flags to observe here are:-</font></p>
</font>
<p><font size="2" face="Arial, Helvetica, sans-serif">--prefix=/path/to/desiredlocation<br>
--enable-shared – this is required so that mod python can be loaded dynamically
into Apache.</font><br>
</p>
http://www.agbooth.com/SOCKETBlog/www.socketelf.org_8080/roller/socket/entry/mod_python_installation.htmlMod Python InstallationRob Garbutt2006-04-24T17:40:04+01:002007-09-10T19:20:06+01:00<br><br><font size="2" face="Arial, Helvetica, sans-serif">This blog highlights the procedure to install
mod python and config httpd.conf so that moinmoin runs using the mod_python module.
</font><font face="Arial, Helvetica, sans-serif">
<p><font size="2" face="Arial, Helvetica, sans-serif">The official docs for this
step are at:-</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">http://moinmoin.wikiwikiweb.de/HelpOnInstalling/ApacheWithModPython<br>
http://www.modpython.org/live/current/doc-html/installation.html</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">Firstly download mod_python
from:-</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">http://httpd.apache.org/modules/python-download.cgi<br>
</font><font size="2" face="Arial, Helvetica, sans-serif"><br>
untar it, then ./configure and make it. There are a few flags worth taking note
of in the docs, namely :-</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">• ./configure --with-apxs=/usr/local/apache/bin/apxs<br>
• ./configure --with-python=/usr/local/bin/python2.3<br>
• ./configure --with-flex=/usr/local/bin/flex</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">Then just make and make
install.</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">Now it’s just a case
of amending the httpd.conf apache file to accommodate mod python.</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">You need to add the line:-</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">LoadModule python_module
modules/mod_python.so</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">Which tells apache to load
the mod python module</font><font face="Arial, Helvetica, sans-serif"> </font>
</p>
</font><br>
<br>http://www.agbooth.com/SOCKETBlog/www.socketelf.org_8080/roller/socket/entry/moinmoin_wiki_installation.htmlMoinmoin Wiki InstallationRob Garbutt2006-04-24T17:34:31+01:002007-09-10T19:20:06+01:00<p><br> <font size="2" face="Arial, Helvetica, sans-serif">Prerequisite -> The latest version
of Python to be installed. Docs for which can be found here:-</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif"><a href="http://www.agbooth.com/SOCKETBlog/www.socketelf.org_8080/roller/page/socket?entry=mod_python_installation">http://www.agbooth.com/SOCKETBlog/www.socketelf.org_8080/roller/page/socket?entry=mod_python_installation</a></font><br>
<br>
<font size="2" face="Arial, Helvetica, sans-serif">OK, firstly, pull the latest
version of moinmoin down from:- </font><font face="Arial, Helvetica, sans-serif">
</font></p>
<font face="Arial, Helvetica, sans-serif">
<p><font size="2" face="Arial, Helvetica, sans-serif"><a href="http://sourceforge.net/project/showfiles.php?group_id=8482" target="_blank">http://sourceforge.net/project/showfiles.php?group_id=8482</a></font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">then:-</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">tar zxvf moinmoin-1.5.x.tgz<br>
cd moinmoin-1.5.x</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">It would help to pull up
the official docs at this point at:-</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif"><a href="http://moinmoin.wikiwikiweb.de/HelpOnInstalling" target="_blank">http://moinmoin.wikiwikiweb.de/HelpOnInstalling</a></font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">The first stage of the install
is called BasicInstallation.</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">Assuming your Python location
is in your PATH, simply type:-</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">python -v setup.py --quiet
install --record=install.log</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">This will install the relevant
files into the home directory e.g. ~moinmoin</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">Then to test:-</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">> python<br>
Python 2.3.4 (#1, May 29 2004, 17:05:23)<br>
[GCC 3.3.3] on linux2<br>
Type "help", "copyright", "credits" or "license"
for more information.<br>
>>> import MoinMoin<br>
>>></font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif"><br>
easy as pie! Moinmoin is now installed…unless you see errors in the above.</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">The next step is to create
an instance of a wiki.</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">Like it says in the docs,
choose a location to put your wiki’s, e.g:-</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">~moinmoin/share/moin</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">and create a directory named
after your wiki e.g.:-</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">~moinmoin/share/moin/socket</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">Then copy the following
dir’s into that dir:-</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">data<br>
underlay<br>
wikiconfig.py<br>
and the contents of ‘htdocs’ </font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">This was the flaw in the
docs. As far as I could see as there was no mention of this step and thus the
wiki fails to load correctly.</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">There are a couple of tweaks
required to wikiconfig.py, namely change the location of the ‘data’
and ‘underlay’ dirs from relevant to absolute.</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">Change permissions as follows:-</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">chmod –R 777 data<br>
chmod –R 777 underlay</font></p>
</font>
<p><font size="2" face="Arial, Helvetica, sans-serif">The next step is to configure
Mod Python which you can find at:-</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif"><a href="http://www.agbooth.com/SOCKETBlog/www.socketelf.org_8080/roller/page/socket?entry=mod_python_installation">http://www.agbooth.com/SOCKETBlog/www.socketelf.org_8080/roller/page/socket?entry=mod_python_installation</a></font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">Then add the following to your directive
in httpd.conf:-</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif"><Location /mywiki><br>
SetHandler python-program<br>
# Add the path of your wiki directory<br>
PythonPath "['/var/www/moin/mywiki'] + sys.path"<br>
PythonHandler MoinMoin.request::RequestModPy.run<br>
</Location></font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">obviously amend to suit your environment.</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">That’s basically it,
a quick restart of apache, check of the error logs, and we’re ready to
roll!!!</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">Simply go to your browser
and browse to:-</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif"><a href="http://youripaddress:yourport/yourwiki">http://youripaddress:yourport/yourwiki</a><br>
</font><font face="Arial, Helvetica, sans-serif"> </font> </p>http://www.agbooth.com/SOCKETBlog/www.socketelf.org_8080/roller/socket/entry/wsdl2java.htmlWSDL2JavaBrian Peter Clark2006-04-06T16:26:49+01:002007-09-10T19:20:06+01:00
<p>Some brief notes from Atif on using the WSDL2Java program.</p>
<p>You'll find the Axis WSDL-to-Java tool in "org.apache.axis.wsdl.WSDL2Java". The basic invocation form looks like this:</p>
<p>$> java -cp %AXISCLASSPATH% org.apache.axis.wsdl.WSDL2Java (WSDL-file-URL)</p>
<p>For example lets say we have a web service running at the following address:<br/>
http://localhost:8080/samples/services/Version<br/>
THEN we would invoke Axis WSDL-to-Java tool like THIS:<br/>
$> java -cp %AXISCLASSPATH% org.apache.axis.wsdl.WSDL2Java http://localhost:8080/samples/services/Version?wsdl</p>
<p>This will create java classes in the current directory.</p>
<p>LETS say we want the ouput of Axis WSDL-to-Java tool to go into certain directory THEN you need to use the -o option.<br/>
e.g. $> java -cp %AXISCLASSPATH% org.apache.axis.wsdl.WSDL2Java http://localhost:8080/samples/services/Version?wsdl -oC:\test</p>
<p>By default WSDL-to-Java tool will put the ouput classess into packages WHICH mirror the targetNamespace in the web service WSDL.<br/>
To change this default YOU need to use the following option: -p<br/>
e.g. $> java -cp %AXISCLASSPATH% org.apache.axis.wsdl.WSDL2Java http://localhost:8080/samples/services/Version?wsdl -pws.version</p>
http://www.agbooth.com/SOCKETBlog/www.socketelf.org_8080/roller/socket/entry/installing_axis_client_code.htmlInstalling Axis clientBrian Peter Clark2006-04-06T16:24:21+01:002007-09-10T19:20:06+01:00
<p>Some brief notes from Atif on installing Axis client.</p>
<p>The following software was used when installing Axis client.<br/>
* Java SE 1.5<br/>
* Axis 1.3</p>
<p>1. unzip axis-bin-1_3.tar to directory C:\DevTool\axis-1_3</p>
<p>2. Set variable AXIS_HOME to C:\DevTool\axis-1_3</p>
<p>3. Add an XML parser, acquire the JAXP 1.1 XML compliant parser (i.e. xalan) to $AXIS_HOME\lib</p>
<p>4. set variable AXIS_LIB to %AXIS_HOME%\lib</p>
<p>5. set variable AXISCLASSPATH to:</p>
<p>%AXIS_LIB%\axis.jar;%AXIS_LIB%\commons-discovery-0.2.jar;<br/>
%AXIS_LIB%\commons-logging-1.0.4.jar;%AXIS_LIB%\jaxrpc.jar;%AXIS_LIB%\saaj.jar;<br/>
%AXIS_LIB%\log4j-1.2.8.jar;%AXIS_LIB%\xalan.jar;%AXIS_LIB%\wsdl4j-1.5.1.jar;<br/>
%AXIS_LIB%\axis-schema.jar</p>
<p>To use Axis client code on the command line, you can select AXISCLASSPATH when invoking Java by entering</p>
<p>java -cp %AXISCLASSPATH% ...</p>
<p>or</p>
<p>java -cp "$AXISCLASSPATH" ...</p>
<p>depending on the platform. You may omit the quotes if your CLASSPATH doesn't have spaces in it.</p>