ofbiz最新版暴露webservice接口

最新的ofbiz18.12.04关闭了soap协议的webService,通过查看更新的s手册[OFBIZ-12212]发现可以通过一些配置重新暴露webservice接口

  1. 对 应用/servicedef/services.xml进行配置,暴露端口

  • export="true"

  • auth="false"

  • login-required="false"

<service name="getPartyEmail" engine="groovy"
    location="component://party/groovyScripts/party/PartyServices.groovy" invoke="getPartyEmail" auth="false" export="true" login-required="false">
    <description>Get the main party Email address</description>
    <attribute name="partyId" type="String" mode="IN" optional="false">
             <type-validate>
                 <fail-property resource="PartyErrorUiLabels" property="PartyRequiredFieldMissingPartyId"/>
             </type-validate>
         </attribute>
     <attribute name="contactMechPurposeTypeId" type="String" mode="IN" optional="false" default-value="PRIMARY_EMAIL">
         <type-validate>
             <fail-property resource="PartyErrorUiLabels" property="PartyRequiredFieldMissingContactMechPurposeTypeId"/>
         </type-validate>
     </attribute>
    <attribute name="emailAddress" type="String" mode="OUT" optional="true"/>
    <attribute name="contactMechId" type="String" mode="OUT" optional="true"/>
</service>

2. 在framework/webtools/webapp/webtools/WEB-INF/controller.xml设置,如果注释了打开就行

<request-map uri="SOAPService">
        <security https="true"/>
        <event type="soap"/>
        <response name="error" type="none"/>
        <response name="success" type="none"/>
</request-map>

3. 在framework/common/webcommon/handlers-controller.xml设置,如果注释了打开就行

<handler name="soap" type="request" class="org.apache.ofbiz.webapp.event.SOAPEventHandler"/>

gradlew

gradlew  cleanAll loadAll ofbiz  #清理and启动
gradlew "ofbiz --shutdown"  #重新开一个命令行,停止ofbiz

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值