如何配置webservice及连接delphi

 

1、  导入XFire包

2、  建一个名为XXX.webservice.XXX的包

3、  选中包右键new – other… - MyEclipse – Web Services – WebService

4、  点next,选择项目。Framework选择XFire。Strategy选择…from  Java bean…选中Create  new Java bean

5、  点击next。Web service name与数据库中的表相对应。选择Java package 结束

6、  找到webservice文件夹下的services.xml将<service>节点注释掉

7、  在applicationContext-service中配置

<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns="http://www.springframework.org/schema/beans"

   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

   xmlns:aop="http://www.springframework.org/schema/aop"

xmlns:tx="http://www.springframework.org/schema/tx"

xsi:schemaLocation="

        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd

        http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd

      http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd">

<!-- bean中的class为实现接口的类;property的name为类中引用的属性名称;ref为spring注册的名称,如上面的client-->

 

<importresource="classpath:org/codehaus/xfire/spring/xfire.xml" />

<bean name="nztPeasant" class="org.codehaus.xfire.spring.ServiceBean">

<property name="serviceBean" ref="serviceName" />

<property name="serviceClass" value="类路径" />

</bean>

 

<bean id="serviceName" class="bean路径"><property name="service" ref="service" />

这里写的是对应的类中定义的属性

</bean>

</beans>

 

8、  运行myeclipse访问路径…/service

9、  Delphi中file – new – other…

10、              选择webservices – WSDLImporter 打开,复制路径下一步

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值