Hi Alex, I have done something similar to what you want to do. I try to explain how I did the job.
First of all I made OFBiz able to access the legacy database defining a couple of entities and a view-entity (so called ArticoloAndGiacenza) to have all information I needed collected from various legacy database tables in one unique OFBiz view-entity. Using OFBiz WebTools I exported the view-entity in an XML file. In order to do this I needed to change a file in OFBiz (xmldsdump.bsh) because OOTB OFBiz does not export view-entities as XML files (view-entities are normally skipped). In this way I got an XML file where each node contains all information about product, category, price and quantity. Then I wrote an XSL fransformation file to make a XML transformation from the legacy database export XML file to an XML file that could be imported in OFBiz. Basically what is needed to do in the transformation is to create for every source XML file node like this: <ArticoloAndGiacenza code="..." description="..." group="..." price="..." giac="..." store="..." param1="..." param2="..." etc. /> A set of destination XML file nodes like these: <Product productId="..." productTypeId="..." primaryProductCategoryId="..." productName="..." description="..." etc. /> <ProductPrice productId="..." productPricePurposeId="PURCHASE" productPriceTypeId="DEFAULT_PRICE" currencyUomId="EUR" productStoreGroupId="_NA_" fromDate="..." price="..." createdDate="..." createdByUserLogin="admin" lastModifiedDate="..." lastModifiedByUserLogin="admin" /> <ProductCategoryMember productId="..." productCategoryId="..." fromDate="..." /> <ProductFeatureAppl productId="..." productFeatureId="..." productFeatureApplTypeId="STANDARD_FEAT" fromDate="..." lastUpdatedStamp="..." lastUpdatedTxStamp="..." createdStamp="..." createdTxStamp="..." /> <ProductFeatureAppl productId="..." productFeatureId="..." productFeatureApplTypeId="STANDARD_FEAT" fromDate="..." lastUpdatedStamp="..." lastUpdatedTxStamp="..." createdStamp="..." createdTxStamp="..." /> <ProductFeatureAppl productId="..." productFeatureId="..." productFeatureApplTypeId="STANDARD_FEAT" fromDate="..." lastUpdatedStamp="..." lastUpdatedTxStamp="..." createdStamp="..." createdTxStamp="..." /> <ProductFacility productId="..." facilityId="..." minimumStock="..." reorderQuantity="..." daysToShip="..." /> <InventoryItem inventoryItemId="..." facilityId="..." inventoryItemTypeId="NON_SERIAL_INV_ITEM" productId="..." ownerPartyId="..." currencyUomId="EUR" unitCost="..." /> <InventoryItemDetail inventoryItemId="..." inventoryItemDetailSeqId="1" effectiveDate="..." availableToPromiseDiff="..." quantityOnHandDiff="..." /> Of course what is reported here is only an example related to my entities fields. The generated XML can then be imported in OFBiz using the WebTools XML import command. Hope this helps, -Bruno 2008/5/27 Jacques Le Roux <[EMAIL PROTECTED]>: > Maybe you could have a look at the examples in > applications\order\script\org\ofbiz\order\thirdparty > Jacques > > From: "Alex Melnik" <[EMAIL PROTECTED]> > >> Jacques, thanks for the quick reply. It almost seems like something I >> could use. I pretty much need an API where I can just call insert on >> the catalogue and pass a product to it, or some UI type of thing shere I >> can map file fields to various product fiels on OFBIZ side and then just >> insert the whole file. Something a little bit easier than trying to >> decipher the Schema behind OFBIZ product storage. Is there any info on >> that Data File library that I can take a look at? >> >> Thanks, >> Alex >> >> [EMAIL PROTECTED] 5/27/2008 3:16 PM >>> >>>>> >>>> >> This could interest you >> >> http://www.nabble.com/Need-help-in-import-or-export-in-csv-and-xls-format-in-ofbiz-application.-tt17316714.html#a17320547 >> >> >> Jacques >> >> From: "Alex Melnik" <[EMAIL PROTECTED]> >> >>> Is there a way to load existing products from a legacy system >>> >> without >> >>> doing it manually (through webtools) or inserting it directly into >>> >> the >> >>> database through an ETL. In other words is there a UI where I can >>> upload a list or is there an API that I can use to write a simple >>> >> JAVA >> >>> driver to read from a list and insert into the OFBIZ back-end? >>> >>> Thanks for the help, >>> Alex >>> >>> >>
