自己去查JDOM或者DOM4J的API文档
解决方案 »
- 怎么样利用点击第一个程序“登入”按钮 ,弹出第二个程序的窗体???
- 菜鸟求教,持久层用hibernate,但我想在DAO层写SQL语句查询
- 关于hibernate session的使用问题
- 高分求助 STRUTS2 为什么文本文件不能上传空文件 而WORD就行
- (struts)一个jsp表单域和actionform的问题?
- lucene索引文件超过2GB容量,怎么重新创建目录存放 ''''''
- 请高手帮忙啊
- axis2 -1.0下发布的几个问题
- 为什么IO类异常必须捕获???
- 谁能让jbuilder支持sun one application server 7,要多少分就给多少分!!!!!!!!!!
- 哪位高手用过quartz我今天搞了一天郁闷死我了
- IDOC的DTD或Schema文件在哪里能下载?
用axis的WSDL2Java可自动生成java代码
axis下载地址http://ws.apache.org/axis/<?xml version="1.0" encoding="utf-8"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:s0="http://hostname/applicationName/queryRequest"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
targetNamespace="http://hostname/applicationName/queryRequest">
<types>
<xsd:schema targetNamespace="http://hostname/applicationName/queryRequest"
xmlns="http://hostname/applicationName/queryRequest"> <xsd:complexType name="QueryRequest">
<xsd:sequence>
<xsd:element name="senderID" type="xsd:string"/>
<xsd:element name="queryType" type="xsd:int"/>
<xsd:element name="receiverID" type="xsd:string"/>
<xsd:element name="queryTitle" type="xsd:string" minOccurs="0"/>
<xsd:element name="sentTime" type="xsd:string"/>
<xsd:element name="page" type="xsd:int"/>
<xsd:element name="pageSize" type="xsd:int"/>
<xsd:element name="queryCondition" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="QueryResponse">
<xsd:sequence>
<xsd:element name="senderID" type="xsd:string"/>
<xsd:element name="sentTime" type="xsd:string"/>
<xsd:element name="providerID" type="xsd:string"/>
<xsd:element name="responseType" type="xsd:int"/>
<xsd:element name="resultCode" type="xsd:int"/>
<xsd:element name="resultNum" type="xsd:int"/>
<xsd:element name="page" type="xsd:int"/>
<xsd:element name="pageSize" type="xsd:int"/>
<xsd:element name="resultMessage" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
</types>
<message name="QueryRequestSoapIn">
<part name="request" type="s0:QueryRequest"/>
</message>
<message name="QueryRequestSoapOut">
<part name="QueryRequestResult" type="s0:QueryResponse"/>
</message>
<portType name="QueryRequestSoap">
<operation name="QueryRequest">
<input message="s0:QueryRequestSoapIn"/>
<output message="s0:QueryRequestSoapOut"/>
</operation>
</portType>
<binding name="QueryRequestSoap" type="s0:QueryRequestSoap">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="QueryRequest">
<soap:operation soapAction="http://hostname/applicationName/queryRequest" style="rpc"/>
<input>
<soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://hostname/applicationName/queryRequest"/>
</input>
<output>
<soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://hostname/applicationName/queryRequest"/>
</output>
</operation>
</binding>
<service name="interface">
<port name="QueryRequestSoap" binding="s0:QueryRequestSoap">
<soap:address location="http://hostname/applicationName/com/cnc/.../queryRequest.jws"/>
</port>
</service>
</definitions>
地址:http://sourceforge.net/projects/wsdl4japi: http://www.extreme.indiana.edu/apis/wsdl4j/index.html
public class QueryRequest {
private String senderID;
private String receiverID;
private String queryTitle;
private String sentTime;
private int page;
private int pageSize;
private String queryCondition;
private int queryType;
public QueryRequest() {
}
public String getSenderID() {
return senderID;
}
public void setSenderID(String senderID) {
this.senderID = senderID;
}
public int getQueryType() {
return queryType;
}
public void setQueryType(int queryType) {
this.queryType = queryType;
}
public String getReceiverID() {
return receiverID;
}
public void setReceiverID(String receiverID) {
this.receiverID = receiverID;
}
public String getQueryTitle() {
return queryTitle;
}
public void setQueryTitle(String queryTitle) {
this.queryTitle = queryTitle;
}
public String getSentTime() {
return sentTime;
}
public void setSentTime(String sentTime) {
this.sentTime = sentTime;
}
public int getPage() {
return page;
}
public void setPage(int page) {
this.page = page;
}
public int getPageSize() {
return pageSize;
}
public void setPageSize(int pageSize) {
this.pageSize = pageSize;
}
public String getQueryCondition() {
return queryCondition;
}
public void setQueryCondition(String queryCondition) {
this.queryCondition = queryCondition;
}
}
和
public class QueryResponse {
private String senderID;
private String sentTime;
private String providerID;
private int responseType;
private int resultCode;
private int resultNum;
private int page;
private int pageSize;
private String resultMessage;
public QueryResponse() {
}
public String getSenderID() {
return senderID;
}
public void setSenderID(String senderID) {
this.senderID = senderID;
}
public String getSentTime() {
return sentTime;
}
public void setSentTime(String sentTime) {
this.sentTime = sentTime;
}
public String getProviderID() {
return providerID;
}
public void setProviderID(String providerID) {
this.providerID = providerID;
}
public int getResponseType() {
return responseType;
}
public void setResponseType(int responseType) {
this.responseType = responseType;
}
public int getResultCode() {
return resultCode;
}
public void setResultCode(int resultCode) {
this.resultCode = resultCode;
}
public int getResultNum() {
return resultNum;
}
public void setResultNum(int resultNum) {
this.resultNum = resultNum;
}
public int getPage() {
return page;
}
public void setPage(int page) {
this.page = page;
}
public int getPageSize() {
return pageSize;
}
public void setPageSize(int pageSize) {
this.pageSize = pageSize;
}
public String getResultMessage() {
return resultMessage;
}
public void setResultMessage(String resultMessage) {
this.resultMessage = resultMessage;
}
}
么?
那么这个operation的输入参数和输出参数可以看作是QueryRequest和QueryResponse么?
就是java的method可以按如下的形式构造么?
public QueryResponse queryRequest(QueryRequest qr) {
QueryResponse q = new QueryResponse();
return q;
}