Java开发网 Java开发网
注册 | 登录 | 帮助 | 搜索 | 排行榜 | 发帖统计  

您没有登录

» Java开发网 » WebService/XML/JSON/SOAP/SOA  

按打印兼容模式打印这个话题 打印话题    把这个话题寄给朋友 寄给朋友    该主题的所有更新都将Email到你的邮箱 订阅主题
flat modethreaded modego to previous topicgo to next topicgo to back
作者 Continue, Implement non-built-in types [Re:charleszq]
charleszq





发贴: 36
积分: 0
于 2003-12-01 23:44 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
Stateless session EJBs and Java classes do not necessarily take built-in data types as parameters and return values, but rather, might use a Java data type that you create yourself.

Now let's create such a java class:
-------------------------------------------------
package xdoclet;

public class Address {
  
  private String name;
  private String address;
  
  public void setName( String name ) {
    this.name = name;
  }
  
  public String getName() {
    return name;
  }
  
  public void setAddress( String address ) {
    this.address = address;
  }
  public String getAddress() {
    return address;
  }
}
-------------------------------------------------

After this, we modify the method 'sayHello' of HelloWorldEJB as this:
-------------------------------------------------
public String sayHello( Address address ) {
return "Hello, " + address.getName() + ", your address is " + address.getAddress();
}
-------------------------------------------------

then, we run 'ant ejbdoclet', 'ant compile-ejbs', 'ant ejb-jar', to generate the remote and home interface of the session bean, then make the 'helloworld.jar' file.




CJSDNer6月14日北京聚会花絮

话题树型展开
人气 标题 作者 字数 发贴时间
16462 Weblogic Web Service学习笔记(XDoclet, Ant) charleszq 155 2003-11-30 18:37
9361 Re:Weblogic Web Service学习笔记(XDoclet, Ant) charleszq 112 2003-11-30 18:40
9292 Continue, Implement non-built-in types charleszq 1157 2003-12-01 23:44
9401 Re:Weblogic Web Service学习笔记(XDoclet, Ant) charleszq 2760 2003-12-01 23:58
9390 Re:Weblogic Web Service学习笔记(XDoclet, Ant) charleszq 1197 2003-12-02 00:04
9124 Re:Weblogic Web Service学习笔记(XDoclet, Ant) toString 24 2003-12-02 04:27
9258 Creating SOAP Message Handlers to Intercept the SOAP Message charleszq 3952 2003-12-02 23:27
9060 Have to do some other things these days, update this later. charleszq 2 2003-12-03 22:16
9565 Re:Weblogic Web Service学习笔记(XDoclet, Ant) find11 6 2003-12-06 11:01

flat modethreaded modego to previous topicgo to next topicgo to back
  已读帖子
  新的帖子
  被删除的帖子
Jump to the top of page

   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923