Skip to Content
author's profile photo Former Member
Former Member

HTTP Destination URL for SAP hybris Marketing Recommendations

Hi all

I am working on SAP hybris Marketing Recommendations integration. I setup all needed configurations on hybris side

I set HTTP Destination URL https://mycompony.com/sap/opu/odata/sap/prod_reco_srv/?sap-client=102 https://mycompany.com/sap/opu/odata/sap/prod_reco_runtime_srv/?sap-client=102

but the same issue I have:

When I configure CMSSAPRecommendationComponent component in wCMS I receive error message:

ERROR [Thread-299] [DefaultSAPRecommendationTypeUIEditor] Error filling Recommendation Types dropdown, verify backoffice configuration java.io.IOException: Failed to connect to backend system

Caused by: java.io.IOException: Http Connection failed with status 400 Bad Request

Can anyone can help with that?

BR, Mike

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Apr 26, 2016 at 12:15 AM

    Hello Mikhail -

    You've probably discovered this by now, but I thought I'd provide some information for others who come across this question.

    You need to set the HTTP Destination URL value in the HMC/Backoffice to simply be the host URL of your SAP Hybris Marketing system, not the complete URL of the Product Recommendation endpoint. The recommendationEntityManagerCEI bean will append the endpoint URI to the host URL before calling upon the client service.

     public ODataFeed getTypes(final String entityName, final String expand, final String select, final String filter, final String orderby) throws ODataException, URISyntaxException, IOException
     {
       final String serviceURL = configuration.getHttpDestinationURL() + baseURL;
       final String client = configuration.getHttpDestinationSAPClient();
       final String user = configuration.getHttpDestination().getUserid();
       final String password = configuration.getHttpDestination().getPassword();
     
       final ODataFeed feed = this.clientService.readFeed(serviceURL, SapproductrecommendationConstants.APPLICATION_XML, entityName, expand, select, filter,
           orderby, user, password, client);
     
       return feed;
     }
    

    Hope this helps :)

    Braxton

    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.