ref:
http://thought-bytes.blogspot.com/2007/03/how-to-load-balance-tomcat-55-with.html
1. install the following software
jre 1.5 or 1.6, tomcat 5525, eclipse, axis2
and in eclipse preferences set tomcat to web server, set jre env and set axis2's runtime
2. create a java project and add axis2 runtime library to its build library
test ws client sample code:
public class TestSms
{
private static EndpointReference targetEPR = new EndpointReference(
"http://cdl:8080/axis2/services/Version");
public static OMElement getGetLeftElement(){
OMFactory fac=OMAbstractFactory.getOMFactory();
OMNamespace omNs=fac.createOMNamespace("此處填寫WS的命名空間","hw");
OMElement method=fac.createOMElement("WS 方法名",omNs);
OMElement value = fac.createOMElement("參數(shù)一", omNs);
value.addChild(fac.createOMText(value, "值一"));
method.addChild(value);
value = fac.createOMElement("參數(shù)二", omNs);
value.addChild(fac.createOMText(value, "值2"));
method.addChild(value);
return method;
}
public static void main(String[] args){
try{
Options options=new Options();
options.setTo(targetEPR);
options.setAction("命名空間/WS 方法名");
ServiceClient sender=new ServiceClient();
sender.setOptions(options);
OMElement sayHello=TestSms.getGetLeftElement();
//WSDLConstants.
OMElement result=sender.sendReceive(sayHello);
OMElement elem = result.getFirstElement();
System.out.println(elem.getText());
//System.out.println(result);
}
catch(Exception axisFault){
axisFault.printStackTrace();
}
}
}
Internet Explorer 4.x 及更高版本
最后不要忘了在這里測(cè)試一下是否安裝成功: http://www.java.com/zh_CN/download/help/testvm.xml
明天就是2005年最后一天了, 本想休一天假, 只是最近手頭上的項(xiàng)目跟別的公司有關(guān), 脫不了身, 煩燥呀, 準(zhǔn)LP又在罵了, 要生存, 沒辦法。
去年底搞了個(gè)今年十大目標(biāo),看了一下,沒幾個(gè)完成了,估計(jì)只有30-40%完成了。
整天都在忙,不管是公司的事還是自己的研究,這一年就沒有幾天晚上是12點(diǎn)之前睡的,在上一個(gè)公司經(jīng)常是晚上11點(diǎn)回去睡覺,現(xiàn)在這家公司是回去之后繼續(xù)搞,所有的業(yè)余愛好都沒有了,買了個(gè)DC,也沒怎么用,什么都沒有心情,事情總是在那里等著,視力又下降了,身體感覺不如從前了。記憶力也下降了,前一陣子的事都不記得了,只知道這兩天做了些啥。
雖然又長了一歲,其它到是沒什么長進(jìn):