I wrote the first test program using CSSDK and I got a 'strange' error.
I use version 6.5 TeamSite on Win2K SP4.
On a server I have a valid license key and I have the following configuration:
defaultTSServer: 10.54.80.103
In a local property file I have (on a different PC):
com.interwoven.cssdk.factory.CSFactory=com.interwoven.cssdk.factory.CSSOAPFactory
serviceBaseURL=
http://10.54.80.103:81My program contains:
Properties props = new Properties();
try {
props.load(new FileInputStream("cfg\\teamSiteServer.properties"));
}
catch ( FileNotFoundException pExc ) {
System.out.println("The properties file not found");
System.exit(-1);
}
CSFactory iwFactory = CSFactory.getFactory(props);
try {
CSVersion version = iwFactory.getServerVersion();
} catch(CSException pExc) {
pExc.printStackTrace();
}
Command iwFactory.getServerVersion() throws exception.
com.interwoven.cssdk.common.CSException: ((405)Method not allowed)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at com.interwoven.cssdk.client.axis.common.AxisExceptionTranslator.translateException(AxisExceptionTranslator.java:72)
at com.interwoven.cssdk.client.axis.access.AccessServiceAdapterImpl.getServerVersion(AccessServiceAdapterImpl.java:214)
at com.interwoven.cssdk.client.axis.common.AxisFactory.getServerVersion(AxisFactory.java:250)
at ca.gc.sdc.ewcms.integration.daemon.EwcmsTimerTask.run(EwcmsTimerTask.java:87)
at java.util.TimerThread.mainLoop(Unknown Source)
at java.util.TimerThread.run(Unknown Source)
Root cause:
AxisFault
faultCode: {
http://xml.apache.org/axis/}HTTP faultSubcode:
faultString: (405)Method not allowed
faultActor:
faultNode:
faultDetail:
{}string: return code: 405
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html dir=ltr>
<head>
<style>
a:link {font:8pt/11pt verdana; color:FF0000}
a:visited {font:8pt/11pt verdana; color:#4e4e4e}
</style>
<META NAME="ROBOTS" CONTENT="NOINDEX">
<title>The page cannot be displayed</title>
<META HTTP-EQUIV="Content-Type" Content="text-html; charset=Windows-1252">
</head>
<script>
function Homepage(){
<!--
// in real bits, urls get returned to our script like this:
// res://shdocvw.dll/http_404.htm#
http://www.DocURL.com/bar.htm //For testing use DocURL = "res://shdocvw.dll/http_404.htm#
https://www.microsoft.com/bar.htm" DocURL=document.URL;
//this is where the http or https will be, as found by searching for

/ but skipping the res://
protocolIndex=DocURL.indexOf("://",4);
//this finds the ending slash for the domain server
serverIndex=DocURL.indexOf("/",protocolIndex + 3);
//for the href, we need a valid URL to the domain. We search for the # symbol to find the begining
//of the true URL, and add 1 to skip it - this is the BeginURL value. We use serverIndex as the end marker.
//urlresult=DocURL.substring(protocolIndex - 4,serverIndex);
BeginURL=DocURL.indexOf("#",1) + 1;
urlresult=DocURL.substring(BeginURL,serverIndex);
//for display, we need to skip after
http://, and go to the next slash
displayresult=DocURL.substring(protocolIndex + 3 ,serverIndex);
InsertElementAnchor(urlresult, displayresult);
}
function HtmlEncode(text)
{
return text.replace(/&/g, '&').replace(/'/g, '"').replace(/</g, '<').replace(/>/g, '>');
}
function TagAttrib(name, value)
{
return ' '+name+'="'+HtmlEncode(value)+'"';
}
function PrintTag(tagName, needCloseTag, attrib, inner){
document.write( '<' + tagName + attrib + '>' + HtmlEncode(inner) );
if (needCloseTag) document.write( '</' + tagName +'>' );
}
function URI(href)
{
IEVer = window.navigator.appVersion;
IEVer = IEVer.substr( IEVer.indexOf('MSIE') + 5, 3 );
return (IEVer.charAt(1)=='.' && IEVer >= '5.5') ?
encodeURI(href) :
escape(href).replace(/%3A/g, ':').replace(/%3B/g, ';');
}
function InsertElementAnchor(href, text)
{
PrintTag('A', true, TagAttrib('HREF', URI(href)), text);
}
//-->
</script>
<body bgcolor="FFFFFF">
<table width="410" cellpadding="3" cellspacing="5">
<tr>
<td align="left" valign="middle" width="360">
<h1 style="COLOR:000000; FONT: 13pt/15pt verdana"><!--Problem-->The page cannot be displayed</h1>
</td>
</tr>
<tr>
<td width="400" colspan="2">
<font style="COLOR:000000; FONT: 8pt/11pt verdana">The page you are looking for cannot be displayed because the page address is incorrect.</font> </td>
</tr>
<tr>
<td width="400" colspan="2">
<font style="COLOR:000000; FONT: 8pt/11pt verdana">
<hr color="#C0C0C0" noshade>
<p>Please try the following:</p>
<ul>
<li>If you typed the page address in the Address bar, check that it is entered correctly.<br>
</li>
<li>Open the
<script>
<!--
if (!((window.navigator.userAgent.indexOf("MSIE") > 0) && (window.navigator.appVersion.charAt(0) == "2")))
{
Homepage();
}
//-->
</script>
home page and then look for links to the information you want.</li>
</ul>
<h2 style="COLOR:000000; FONT: 8pt/11pt verdana">HTTP 405 - Resource not
allowed<br>
Internet Information Services</h2>
<hr color="#C0C0C0" noshade>
<p>Technical Information (for support personnel)</p>
<ul>
<li>More information:<br>
<a href="
http://www.microsoft.com/ContentRedirect.asp?prd=iis&sbp=&pver=5.0&pid=&ID=405&cat=web&os=&over=&hrd=&Opt1=&Opt2=&Opt3=" target="_blank">Microsoft Support</a>
</li>
</ul>
</font></td>
</tr>
</table>
</body>
</html>
(405)Method not allowed
at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:630)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:128)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:150)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:120)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:180)
at org.apache.axis.client.Call.invokeEngine(Call.java:2526)
at org.apache.axis.client.Call.invoke(Call.java:2515)
at org.apache.axis.client.Call.invoke(Call.java:2210)
at org.apache.axis.client.Call.invoke(Call.java:2133)
at org.apache.axis.client.Call.invoke(Call.java:1656)
at com.interwoven.cssdk.client.axis.generated.AccessServiceBindingStub.getServerVersion(AccessServiceBindingStub.java:589)
at com.interwoven.cssdk.client.axis.access.AccessServiceAdapterImpl.getServerVersion(AccessServiceAdapterImpl.java:202)
at com.interwoven.cssdk.client.axis.common.AxisFactory.getServerVersion(AxisFactory.java:250)
at ca.gc.sdc.ewcms.integration.daemon.EwcmsTimerTask.run(EwcmsTimerTask.java:87)
at java.util.TimerThread.mainLoop(Unknown Source)
at java.util.TimerThread.run(Unknown Source)
The 405 (Method not allowed) error is HTTP protocol error. It looks like my configuration is not set correctly.
Any ideas?
Thank you.