ofbiz的服务(service)export成web service的方法(1)

修改service定义


在集成ofbiz的过程中,有一种需求是外部系统调用ofbiz的service,我们可以参看:
http://docs.ofbiz.org/display/OFBTECH/Service+Engine+Guide
这篇手册里面对service的配置有详细的描述,我们可以找到一个属性"export",当export="true"时,service可以被SOAP/HTTP/JMS调用,实际上还可以被xmlrpc调用。

SERVICE ELEMENT:
Attribute Required? Description Default Value
name Y The unique name of the service.  
engine Y The name of the engine (defined in serviceengine.xml).  
location N The location or package of the service's class.  
invoke N The method name of the service.  
auth N Does this service require authorization? (true/false) true
debug N Enable verbose debugging when calling this service? true
default-entity-name N The default Entity to use for auto-attributes  
export N Is this service allowed to be accessed via SOAP/HTTP/JMS? (true/false) false
max-retry N Sets the max number of times this service will retry when failed (persisted async only) -1 (unlimited)
require-new-transaction N Require a new transaction for this service true
semaphore N Defines how concurrent calls to this service should be handled:
none: multiple calls to this service may run concurrently
wait: while this service is running, queue any subsequent calls
fail: while this service is running, fail any subsequent calls
none
semaphore-wait-seconds N When semaphore="wait" how many seconds to wait before failing the service call 300
sempahore-sleep N When semaphore="wait" how often (in milliseconds) to check if the waiting service call can be run 500
transaction-timeout N Override the default transaction timeout, only works if we start the transaction 0 (Use system default)
use-transaction N Create a transaction for this service (if one is not already in place) true
validate N Do we validate the attributes found below for name and type matching? (true/false) true

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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值