`

ofbiz学习笔记--编写服务的注意事项

XML 
阅读更多
Step - 1: Create directory by name "servicedef" in component directory "practice". This directory will contain all the service definition files e.g. services.xml, secas.xml.
Note :  If it is a service which is written in Java then it will be placed in "src" directory and if it is a service which is written in minilang then it will be placed in script directory. e.g. for java applications/party/src/org/ofbiz/party/party/PartyServices.java and for minilang applications/party/script/org/ofbiz/party/party/PartyInvitationServices.xml. Respective class path and file path will be mentioned in the service definition.
*Step - 2 :*In controller you have to create an entry for the request for the execution of a service and set the response like

<request-map uri="createPracticePerson">
    <security https="true" auth="true"/>
    <event type="service" invoke="createPracticePerson"/>
    <response name="success" type="view" value="PersonForm"/>
</request-map>
Step - 3: Now all the services which you have written needs to be loaded when server starts so you need to do an entry for service definition in ofbiz-component.xml file which will be like

<service-resource type="model" loader="main" location="servicedef/services.xml"/>So whenever you make any change in any service definition then you must restart the server to have changes in effect.
分享到:
评论

相关推荐

    谈ofbiz学习-中文

    【Ofbiz学习详解】 Ofbiz,全称Open For Business Project,是一个开源的企业级应用框架,由David E. Jones设计,其目标是提供一个全面的、可扩展的企业应用程序解决方案。Ofbiz以其面向业务的特性,与许多传统的...

    ofbiz-entry-zh-cn.doc

    ### OFBiz 入门操作手册知识点详解 #### 一、OFBiz简介与背景 - **OFBiz**(Open For Business)是一款开源的企业级电子商务框架,主要用于构建和部署各种类型的业务应用,包括电子商务、供应链管理等。 - **目标...

    Ofbiz-16-全量数据库873张表.rar

    这个压缩包文件"Ofbiz-16-全量数据库873张表.rar"包含了Apache Ofbiz 16版本的全量数据库结构,包括873个数据表的SQL脚本。这些脚本用于创建和初始化数据库,对于理解和开发基于Ofbiz的应用程序至关重要。 1. **...

    OFBiz-manual-zh.doc

    OFBiz-manual-zh.docOFBiz-manual-zh.docOFBiz-manual-zh.docOFBiz-manual-zh.docOFBiz-manual-zh.doc

    apache-ofbiz-16.11.05

    最新版OFBiz,apache-ofbiz-16.11.05,apache-ofbiz-16.11.05

    OFBiz-API-Docs

    OFBiz API 文档,英文html版。使用官方资源中的ant命令自动生成,无任何修改。有兴趣的朋友可以自己生成,ant命令是:docs-all,该命令生成帮助文档时会获取操作系统语言设置,要生成英文文档请先将操作系统语言改为...

    ofbiz学习笔记(自学整理)

    在学习Ofbiz的过程中,你可能会遇到的问题可能包括:理解和配置Ofbiz的复杂组件结构,编写和调试服务,以及处理与数据库交互时的实体问题。解决这些问题通常需要查阅Ofbiz的官方文档、社区论坛或在线教程。 最后,...

    OFBiz教程_-_初学者的开发指南

    3. **组件开发**:学习如何创建一个新的组件,以及组件中的主要文件如`ofbiz-component.xml`的用途。 4. **实体模型**:解释OFBiz中实体模型的概念及其作用。 5. **服务定义和服务调用**:如何定义服务并从其他组件...

    apache-ofbiz-16.11.02源码+ofbiz菜鸟笔记+Apache+OFBiz+开发初学者指南

    apache-ofbiz-16.11.02.zip,ofbiz菜鸟笔记,Apache+OFBiz+开发初学者指南.chm

    ofbiz入门教程-初学者开发指南

    2. 编写 entitymodel_study.xml 文件:按照Ofbiz的DTD定义格式,包括表的名称、字段类型等。例如: ```xml &lt;!-- Entity Model for StudyComponent --&gt; &lt;title&gt;StudyComponent Entity Model &lt;description&gt;Entities...

    CVE-2020-9496 ofbiz反序列化漏洞分析1

    OFBiz的主要特点是提供了一整套的开发基于Java的web应用程序的组件和工具,包括实体引擎, 服务引擎, 消息引擎, 工作流引擎, 规则引擎等。 CVE-2020-9496是OFBiz的一个反序列化漏洞,影响所有低于17.12.04版本的...

    ofbiz 英文pdf

    - **安装JDK 5.0**:给出安装过程中的注意事项及常见问题解决方案。 - **下载OFBiz Ready to Launch**:推荐使用预打包版本简化部署流程。 - **设置Eclipse项目**:指导如何在Eclipse IDE中创建并配置OFBiz项目。...

    OFBiz经典入门教程加速度编写

    OFBiz(Open For Business Project)是一个全面的企业级业务应用程序框架,它由Java语言编写,提供了一系列的服务、组件和工具,用于构建和管理电子商务、供应链管理、客户关系管理等多种业务应用。 OFBiz的核心...

    ofbiz--A Beginners Development Guide--Part 1

    6. **实践开发**:根据`practice`项目需求,编写服务、页面、实体模型等,通过OFBiz的API实现业务逻辑。 总之,OFBiz是一个功能强大的企业级应用框架,学习OFBiz不仅能够提升你的Java开发技能,还能让你掌握复杂的...

    ofbiz--A Beginners Development Guide--Part 3

    通过学习如何编写SEXML文件,开发者可以创建自定义服务,并与其他组件进行交互。 工作流(WorkEffort)系统在OFBiz中用于处理计划任务、项目管理和协作。它允许开发者定义复杂的业务流程,如订单审批流程。理解工作...

    ofbiz--A Beginners Development Guide--Part 2

    这可以帮助开发者通过动手实践来更好地理解和掌握Ofbiz的工作原理,例如创建新的组件、编写服务、设置实体模型等。 7. **开发工具** 当涉及到Ofbiz开发时,有一些常用的工具可以帮助提高效率,如Ofbiz的Maven插件...

Global site tag (gtag.js) - Google Analytics