最新的ofbiz18.12.04关闭了soap协议的webService,通过查看更新的s手册[OFBIZ-12212]发现可以通过一些配置重新暴露webservice接口
-
对 应用/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