public ManufacturerDetails getBGDataWithMfg( final String supplierID, final String partNumber, final String orderNumber) throws CatalogException, IOException { BGCatalog bgCatalog = new BGCatalog( EpicoreConstants.HOST_IP, EpicoreConstants.DOMAIN_ID, EpicoreConstants.USER_NAME, EpicoreConstants.PASSWORD, supplierID, EpicoreConstants.SERVICE_TYPE); List<?> bgcataloglist = bgCatalog.GetBuyersGuideDataByVehEnhanced( "0", "0", "0", "0", "0", null, partNumber, null, orderNumber); List<CompatibilityInfo> bgDataInfos = new ArrayList<CompatibilityInfo>(); ManufacturerDetails mfgDetails = null; for (Object object : bgcataloglist) { if (object instanceof BGDataItemEnhanced) { BGDataItemEnhanced dataItemEnhanced = (BGDataItemEnhanced) object; /** This would remove repetitive data coming from response */ if (mfgDetails == null) { mfgDetails = new ManufacturerDetails(); mfgDetails.setManufacturer(dataItemEnhanced.getManufacturerName()); mfgDetails.setGroupText(dataItemEnhanced.getGroupText()); mfgDetails.setGroupNumber(dataItemEnhanced.getGroupNumber()); mfgDetails.setPartDescText(dataItemEnhanced.getPartDescriptionText()); mfgDetails.setPartDescID(dataItemEnhanced.getPartDescriptionID()); mfgDetails.setLineCode(dataItemEnhanced.getLineCode()); mfgDetails.setOrderNumber(dataItemEnhanced.getOrderNumber()); } CompatibilityInfo dataInfo = populateBGData(dataItemEnhanced); bgDataInfos.add(dataInfo); } } if (mfgDetails == null) { mfgDetails = new ManufacturerDetails(); } mfgDetails.setCompatibilityInfos(bgDataInfos); bgCatalog.DisconnectCatalogServer(); return mfgDetails; }