>데이터 베이스 >MySQL 튜토리얼 >axis2的wsdl无法使用eclipse axis1插件来生成客户端

axis2的wsdl无法使用eclipse axis1插件来生成客户端

WBOY
WBOY원래의
2016-06-07 15:00:551121검색

使用jettyaxis2实现webservice服务端,且无需使用axis2命令生成服务端代码,只要services.xml配置实现类。 工程为gradle工程配置文件在src/main/resources/axis2/WEB-INF/services.xml: ?xml version=1.0 encoding=UTF-8?serviceGroupservice name=wifiecSe

使用jetty+axis2实现webservice服务端,且无需使用axis2命令生成服务端代码,只要services.xml配置实现类。

工程为gradle工程配置文件在src/main/resources/axis2/WEB-INF/services.xml:

<?xml version="1.0" encoding="UTF-8"?>
<servicegroup>
	<service name="wifiecService">
		<description>
			Please Type your service description here
		</description>
		<messagereceivers>
			<messagereceiver mep="http://www.w3.org/2004/08/wsdl/in-out" class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"></messagereceiver>
		</messagereceivers>
		<parameter name="ServiceClass" locked="false">com.smsservice.webservices.SmsService
		</parameter>
	</service>
</servicegroup>

浏览器访问服务端wsdl地址,保存下来的wsdl文件无法通过eclipse luna自带的axis1插件生成客户端代码,缺少一个xxxPortType类,

解决方法:使用axis1的wsdl2java命令来生成客户端代码:

脚本:wsdl2java.bat

set Axis_Lib=G:\jar-lib\axis1.4
set Java_Cmd=java -Djava.ext.dirs=%Axis_Lib%
set Output_Path=C:\Users\tower\Desktop\test
set Package=wcf
%Java_Cmd% org.apache.axis.wsdl.WSDL2Java http://x.x.x.x:9002/services/xxxService?wsdl -o%Output_Path% -p%Package%

dos下执行此脚本,会生成服务端代码和客户端代码到test目录。


G:\jar-lib\axis1.4 的目录
2007-10-17  11:05            56,290 activation.jar
2006-04-22  18:56            33,202 axis-ant.jar
2006-04-22  18:56         1,599,570 axis.jar
2006-04-22  18:56            71,442 commons-discovery-0.2.jar
2006-04-22  18:56            38,015 commons-logging-1.0.4.jar
2006-04-22  18:56            31,191 jaxrpc.jar
2011-06-02  16:30           391,834 log4j-1.2.15.jar
2006-04-22  18:56               921 log4j.properties
2009-08-02  15:04           436,053 mail.jar
2006-04-22  18:56            18,979 saaj.jar
2006-04-22  18:56           126,771 wsdl4j-1.5.1.jar




성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.