浏览 2918 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
|
|
---|---|
作者 | 正文 |
发表时间:2009-11-28
最后修改:2009-11-30
java开发的接口
package com.abc.service; public interface WriteRecordService { public int sayHello (String name); } 使用MyEclipse 6.0.1 发布成为webservice服务,services.xml配置文件如下
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://xfire.codehaus.org/config/1.0"> <service> <name>WriteRecordWebService</name> <serviceClass> com.hopechart.wirte.WriteRecordService </serviceClass> <implementationClass> com.hopechart.wirte.impl.WriteRecordServiceImpl </implementationClass> <style>rpc</style> <use>literal</use> <scope>application</scope> </service></beans>
webservice的wsdl的url http://192.168.1.99:8080/WriteRecordWS/services/WriteRecordWebService?wsdl
wsdl文件 <wsdl:definitions targetNamespace="http://service.abc.com"> <wsdl:message name="sayHelloResponse"> <wsdl:part name="out" type="xsd:int"> </wsdl:part> </wsdl:message> <wsdl:message name="sayHelloRequest"> <wsdl:part name="in0" type="xsd:string"> </wsdl:part> </wsdl:message> <wsdl:portType name="WriteRecordWebServicePortType"> <wsdl:operation name="sayHello"> <wsdl:input name="sayHelloRequest" message="tns:sayHelloRequest"> </wsdl:input> <wsdl:output name="sayHelloResponse" message="tns:sayHelloResponse"> </wsdl:output> </wsdl:operation> <wsdl:binding name="WriteRecordWebServiceHttpBinding" type="tns:WriteRecordWebServicePortType"> <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> <wsdl:operation name="sayHello"> <wsdlsoap:operation soapAction=""/> <wsdl:input name="sayHelloRequest"> <wsdlsoap:body use="literal" namespace="http://wirte.hopechart.com"/> </wsdl:input> <wsdl:output name="sayHelloResponse"> <wsdlsoap:body use="literal" namespace="http://wirte.hopechart.com"/> </wsdl:output> </wsdl:operation> <wsdl:service name="WriteRecordWebService"> <wsdl:port name="WriteRecordWebServiceHttpPort" binding="tns:WriteRecordWebServiceHttpBinding"> <wsdlsoap:address location="http://192.168.1.99:8080/WriteRecordWS/services/WriteRecordWebService"/> </wsdl:port> </wsdl:service> </wsdl:definitions> 声明:ITeye文章版权属于作者,受法律保护。没有作者书面许可不得转载。
推荐链接
|
|
返回顶楼 | |