当前位置: 首页 > 工具软件 > Apache Axis2 > 使用案例 >

Apache Axis2 wsdl2java学习

薛弘壮
2023-12-01
Apache Axis2 Releases -> Apache Axis2 wsdl2java & java2wsdl

<[Java开源Web Service分类列表, 最常用的是apache Axis2 & apache CXF]>
http://www.open-open.com/27.htm

<[wsdl2java.bat]>
http://lixg425.iteye.com/blog/1687698
http://lanmh.iteye.com/blog/1073187
http://www.tuicool.com/articles/mYnuaa
http://axis.apache.org/axis2/java/core/download.cgi [download jar]

// 准备一个 .wsdl 文件
C:\Users>cd /d C:\Users\Desktop\axis2-1.6.2-bin\axis2-1.6.2\bin
C:\Users\Desktop\axis2-1.6.2-bin\axis2-1.6.2\bin>wsdl2java -uri http://10.176.38.249:9080/csp/services/c_pbh/archiveProcess?wsdl -o src


Using AXIS2_HOME:   C:\Users\xwx192794\Desktop\axis2-1.6.2-bin\axis2-1.6.2
Using JAVA_HOME:    C:\Program Files\Java\jdk1.6.0_10
Retrieving document at 'http://10.176.38.249:9080/csp/services/c_pbh/archiveProcess?wsdl'.

<[quick starter:]>
http://axis.apache.org/axis2/java/core/download.cgi
http://axis.apache.org/axis2/java/core/docs/quickstartguide.html

public static String responseXML(String resultCode, String resultRemarks)
{
	String resultXML = "";


	StringBuffer sb = new StringBuffer();
	sb.append("<?xml version=\"1.0\" encoding=\"GB2312\"?>\n");
	sb.append("<returnInfo>\n");
	sb.append("    <resultCode>" + resultCode + "</resultCode>\n");
	sb.append("    <resultRemarks>" + resultRemarks + "</resultRemarks>\n");
	sb.append("  </returnInfo>\n");


	resultXML = sb.toString();
	return resultXML;
}


stub[英][st?b][美][st?b]n.树桩; 铅笔头,烟蒂; 票根,存根; 
specified[英]['spes?fa?d][美]['spes?fa?d]v.指定(specify的过去式和过去分词 ); 详述; 提出…的条件; 使具有特性;


/**
 * 将DataSet 转到List集合
 * 
 * @param list
 * @param ds void
 */
public void ds2List(List<Map<String, Object>>  list, DataSet ds)
{
	Object value = null;
	Map<String, Object> voMap = null;
	
	for (; ds.next(); list.add(voMap))
	{
		voMap = new HashMap<String, Object>();
		List columnNames = ds.getColumnNames();


		String columnName;
		
		for (Iterator iterator = columnNames.iterator(); iterator.hasNext(); voMap.put(columnName, value))
		{
			columnName = (String)iterator.next();
			value = ds.getObject(columnName);
		}
	}
}

 类似资料: