Skip to Content

Issue with OOTB Hybris code

Hi,

Class DefaultSapC4cCustomerPublicationService of C4C integration has a piece of code:

@Override
	public void publishCustomerToCloudPlatformIntegration(final C4CCustomerData customerJson) throws IOException
	{
		String strReplicationEnabled = getConfigurationService().getConfiguration().getString(Sapc4ccustomerb2cConstants.C4C_CUSTOMER_CPI_REPLICATE);
		boolean isReplicationEnabled = false;
		if(StringUtils.isBlank(strReplicationEnabled)){
			isReplicationEnabled = Boolean.parseBoolean(strReplicationEnabled);
		}


		if(isReplicationEnabled) {
			getCloudPlatformIntegrationConnection().sendPost(
					getConfigurationService().getConfiguration().getString(Sapc4ccustomerb2cConstants.C4C_CUSTOMER_SCPI_IFLOW_KEY),
					customerJson.toString());
		}
	}

You can see that this code will never work even if the configuration Sapc4ccustomerb2cConstants.C4C_CUSTOMER_CPI_REPLICATE is set to true.

Thanks,

Vikram

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Apr 01 at 12:22 AM

    I noticed it too. And this is class from 2018. But even if overriden with "isNotBlank" it cannot communicate with Replicate-Customer-from-SAP-Commerce-Cloud-to-SAP-Cloud-for-Customer IFlow due to csrf token that cannot be turned off.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.