Author: jleroux
Date: Sat Mar 12 18:15:21 2011 New Revision: 1080959 URL: http://svn.apache.org/viewvc?rev=1080959&view=rev Log: Closes "findProductById is not available" (https://issues.apache.org/jira/browse/OFBIZ-4210) OFBIZ-4210 The function "findProductById" is not available. The issue is in the services.xml for the product component. Currently it has: * <service name="findProductsById" engine="java" auth="true" * location="org.ofbiz.product.ProductServices" invoke="findProductByGoodIdentification"> * <description>Find the productId corresponding to a reference and a reference type</description> * <attribute type="String" mode="IN" name="idToFind" optional="false"/> * <attribute type="String" mode="IN" name="goodIdentificationTypeId" optional="true"/> * <attribute type="String" mode="IN" name="searchProductFirst" optional="true"/> * <attribute type="String" mode="IN" name="searchAllId" optional="true"/> * <attribute type="org.ofbiz.entity.GenericValue" mode="OUT" name="product" optional="true"/> * <attribute type="List" mode="OUT" name="productsFound" optional="true"/> * </service> The service name should be "findProductById", without "s". The invoke should be "findProductById" instead of "findProductByGoodIdentification" The Location should be location="org.ofbiz.product.product.ProductServices" Finally the return type of the service should have "productsList" and not "productsFound". JLR:I have also modified the description using the one from the Java method Modified: ofbiz/trunk/applications/product/servicedef/services.xml Modified: ofbiz/trunk/applications/product/servicedef/services.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/servicedef/services.xml?rev=1080959&r1=1080958&r2=1080959&view=diff ============================================================================== --- ofbiz/trunk/applications/product/servicedef/services.xml (original) +++ ofbiz/trunk/applications/product/servicedef/services.xml Sat Mar 12 18:15:21 2011 @@ -205,15 +205,15 @@ under the License. <auto-attributes mode="IN" include="nonpk" optional="true"/> </service> - <service name="findProductsById" engine="java" auth="true" - location="org.ofbiz.product.ProductServices" invoke="findProductByGoodIdentification"> - <description>Find the productId corresponding to a reference and a reference type</description> + <service name="findProductById" engine="java" auth="true" + location="org.ofbiz.product.product.ProductServices" invoke="findProductById"> + <description>Finds productId(s) corresponding to a product reference, productId or a GoodIdentification idValue</description> <attribute type="String" mode="IN" name="idToFind" optional="false"/> <attribute type="String" mode="IN" name="goodIdentificationTypeId" optional="true"/> <attribute type="String" mode="IN" name="searchProductFirst" optional="true"/> <attribute type="String" mode="IN" name="searchAllId" optional="true"/> <attribute type="org.ofbiz.entity.GenericValue" mode="OUT" name="product" optional="true"/> - <attribute type="List" mode="OUT" name="productsFound" optional="true"/> + <attribute type="List" mode="OUT" name="productsList" optional="true"/> </service> <!-- Product Association Services --> |
Free forum by Nabble | Edit this page |