This example uses a shell script (command file) named compileAndRun.sh to compile and run CreateWebSource.java. You can use JRockit, as shown here, or any JDK 6 that contains a JAX-WS 2.1 implementation.
#!/bin/sh CLASSPATH=.:$ORACLE_HOME/search/lib/search_adminapi_wsclient.jar:$ORACLE_BASE/jrockit_160_14_R27.6.5-32/jre/lib/rt.jar # Compile $ORACLE_BASE/jrockit_160_14_R27.6.5-32/bin/javac -cp $CLASSPATH CreateWebSource.java # Run $ORACLE_BASE/jrockit_160_14_R27.6.5-32/jre/bin/java -cp $CLASSPATH CreateWebSource $@
To run the script, include these arguments on the command line:
webServiceURL: The Web Service URL for the Administration API in the following format. Replace host:port
with the appropriate values.
http://host:port/search/api/admin/AdminService
userName: The administrative user (eqsys
).
password: The password for the administrative user.
webSourceURL: The starting URL for crawling the Web source.
This command creates a source from the example.com Web site:
sh compileAndRun.sh http://host:7777/search/api/admin/AdminService eqsys password http://example.com/index.htm