Posts

Showing posts with the label Apache OFBiz

How to run ofbiz as ubuntu Service.

Apache Ofbiz developer need write script to start and stop ofbiz server as Ubuntu service. In my projects production and test server management i need this, and after spending few times  i got this. Here below i share my experience. The script code given below. #!/bin/bash -e ### BEGIN INIT INFO # Provides:          ofbiz # Required-Start:    $syslog $time $remote_fs # Required-Stop:     $syslog $time $remote_fs # Default-Start:     2 3 4 5 # Default-Stop:      0 1 6 # Short-Description: start Apache Ofbiz # Description:       Debian init script for the Apache Ofbiz, #                    the open source enterprise automation software ### END INIT INFO set -e ############################################################...

Create waraper to process ofbiz soap service response

How to call soap service is describe in my previous post. http://tariqliferay.blogspot.com/2015/09/how-to-create-soap-client-for-ofbiz.html Here you get response as OMElement. Then you need to process this. Now i show how can you make pojo/dto class from response for further need. Think you get campaign list in response as key="campaignList" and  value list a list of campaign. First create dto/pojo class as your requirement. Here below a sample dto: import java.io.Serializable; /**  * @author tariq  *  */ public class Campaign implements Serializable{     public String campaignName = null;     public String campaignType = null;     public String contentId = null;     public String createdStamp = null;     public String createdTxStamp = null;     public String emailSubscription = null;     public String lastUpdatedStamp = null;  ...

How to create soap client for ofbiz service or ofbiz service invocation from another application.

Sometimes ofbiz developer need to integrate ofbiz with 3rd party or another web application. This is very simple to create soap service in ofbiz.In ofbiz here soap engine to mail soap service. To create soap service or make service exportable follow the bellow steps: 1. Set export="true" in service definition for example   <service name="createColleague" engine="java" auth="true"         location="org.ofbiz.crm.colleague.ColleagueService" invoke="createColleague" export="true" > </service> You find all exportable service or soap service wsdl under webtools component. Open a your browser new tab and below url, http://localhost:8080/webtools/control/SOAPService?wsdl  Here you find all soap or exportable service. 2. Create java client to all this as below, /**  *  */ import java.util.Map; import java.util.logging.Logger; import org.apache.axiom.om.OMAbstractFactory; import org.apache.axio...