Posted by
Midhat on
URL: http://ofbiz.116.s1.nabble.com/Multiple-images-and-thumbnail-images-tp139304p139320.html
I have only seen the first file u sent. the general methd o adding a service
to OFBiz application is
1. implement the functionality as a utility class, without any startup
methods like main etc. ur current file is an executable class. save the
class in the package hieraricy in the src folder of the application.
2. add a service to the services.xml file lke this
<service name="getBOMTree" default-entity-name="ProductAssoc"
engine="java"
location="org.ofbiz.manufacturing.bom.BOMServices"
invoke="getBOMTree">
<description>Returns a BOMTree (an object that represents a
configured bill of material tree in memory). Useful for tree traversal
(breakdown, explosion, implosion).</description>
<attribute mode="IN" name="productId" optional="false"
type="String"/>
<attribute mode="IN" name="type" optional="true" type="Integer"/>
<attribute mode="IN" name="fromDate" optional="true" type="String"/>
<attribute mode="IN" name="bomType" optional="false" type="String"/>
<attribute mode="IN" name="quantity" optional="true" type="Double"/>
<attribute mode="IN" name="amount" optional="true" type="Double"/>
<attribute mode="OUT" name="tree" optional="true" type="
org.ofbiz.manufacturing.bom.BOMTree"/>
</service>
location specifies the classfile and invoke specifies the methid in the
class. attributes are the method attributes.
3. add a request URI to controller.xml to invoke th eservice like
<request-map uri="runBomSimulation">
<security https="true" auth="true"/>
<event type="service" invoke="getBOMTree"/>
<response name="success" type="view" value="BomSimulation"/>
</request-map>
4. link to the request map using hyperlink or form.
hope it helps
On 7/29/06, rohit2006 <
[hidden email]> wrote: