现在从JAXRPC返回得到的是javabean形式的,我想把它变成xml,再做一些xslt等转换工作。这样做不行吗?请指教
解决方案 »
- 求解myeclipse自动关闭
- Spring3.1和Hibernate3.6整合问题
- Struts2 + jQuery + JSON如何在Struts.xml中处理异常并返回一个JSON结果
- 谁开发过移动cmpp3.0短信发送的接口啊,有的话给我传一个java源码
- ActionForm里内含实体的set方法有用吗
- 请求熟悉华为北向corba接口的大虾的帮助
- 新版163邮箱察看邮件时可以按照时间进行折叠,感觉很棒,请教各位高人有什么办法实现阿?
- RMI运行时的问题ClassNotFoundExeption server.Server_stub
- 如何从struts1.0升级到struts1.1
- 一个分布式的命令执行系统,大家来提提建议
- 如何从Component转换到JPanel
- 一个java程序运行出现的问题!帮忙看看!
www.castor.org
StockTableItemBean stocktableitembean =StockPriceFetcher.getStockTable(request,distributor);
filename="stocktable"+stockcode+".xml";
fwriter = new FileWriter(filename);
Marshaller.marshal(stocktableitembean, fwriter);
--------------
package stock;import java.io.Serializable;
//股票代码表结构
public class StockTableItemBean implements Serializable { private int xFlag; //停盘标志,'1'停,'0'开
private String stkName; //股票名称
private int kind; //类型 上指16,上A17,上B18,上债19;深指32,深A33,深B34,深债35
private String stkCode; //股票代码
private int close_price; //昨收盘价
private int per_h; //每手股数
private int total5; //5日平均总手数
public StockTableItemBean() { } public StockTableItemBean(int xFlag,String stkName,int kind,String stkCode,int close_price,int per_h,int total5) {
this.xFlag = xFlag;
this.stkName = stkName;
this.kind = kind;
this.stkCode = stkCode;
this.close_price = close_price;
this.per_h = per_h;
this.total5 = total5;
} public int getXFlag() {
return xFlag;
} public void setXFlag(int xFlag) {
this.xFlag = xFlag;
}
public String getStkName() {
return stkName;
} public void setStkName(String stkName) {
this.stkName = stkName;
}
public int getKind() {
return kind;
} public void setKind(int kind) {
this.kind = kind;
}
public String getStkCode() {
return stkCode;
} public void setStkCode(String stkCode) {
this.stkCode = stkCode;
}
public int getClosePrice() {
return close_price;
} public void setClosePrice(int close_price) {
this.close_price = close_price;
}
public int getPer_h() {
return per_h;
} public void setPer_h(int per_h) {
this.per_h = per_h;
}
public int getTotal5() {
return total5;
} public void setTotal5(int total5) {
this.total5 = total5;
}}