2006年4月4日

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("参数一", omNs);
           value.addChild(fac.createOMText(value, "值一"));
           method.addChild(value);
          
           value = fac.createOMElement("参数二", 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();
              }
       }

}



ref: http://zhangjunhd.blog.51cto.com/113473/23690
posted @ 2007-10-25 20:58 Java,研究之路 阅读(356) | 评论 (0)编辑 收藏
 

How to load balance Tomcat 5.5 with Apache on Windows


ref:
http://thought-bytes.blogspot.com/2007/03/how-to-load-balance-tomcat-55-with.html

posted @ 2007-03-10 17:17 Java,研究之路 阅读(356) | 评论 (0)编辑 收藏
 
http://randomcoder.com/articles/jsessionid-considered-harmful
posted @ 2006-11-08 12:32 Java,研究之路 阅读(1241) | 评论 (1)编辑 收藏
 
最近总是打不开网页中的JAVA程序, 本来机器上有JAVA开发环境, 重装系统一般不安装JAVA,反正设置java_home和path中添加javac/java就可以了. 结果IE总是打不开,也不找到原因. 今天没办法了, 要参加一项考试,只好在网上搜索了一下, 原来出问题总是有原因的.

参考官方帮助: http://www.java.com/zh_CN/download/help/win_offline.xml

下载jre运行环境.安装.

  1. 双击该图标打开“Java 控制面板”
  2. 在“Java 控制面板”中选择“浏览器”选项卡
  3. 确保选中“Internet Explorer”、“Netscape”或“Mozilla”旁边的复选框
  4. 如果尚未选中,请选中对应的复选框,为您的 Web 浏览器启用 JRE
  5. 单击“应用”按钮

Internet Explorer 4.x 及更高版本

  1. 单击“工具”-->“Internet 选项”
  2. 选择“高级”选项卡,并向下滚动到“Java (Sun)”
  3. 选中“使用 Java 2 版本”旁边的复选框
  4. 接下来选择“安全”选项卡,然后选择“自定义级别”按钮
  5. 向下滚动到“Java 小程序脚本”
  6. 确保选中“启用”单选按钮。
  7. 单击“确定”保存您的首选设置。

最后不要忘了在这里测试一下是否安装成功: http://www.java.com/zh_CN/download/help/testvm.xml

posted @ 2006-04-04 22:24 Java,研究之路 阅读(3200) | 评论 (0)编辑 收藏