Skip to Content

CPI - HTTP GET call fails

Hi,

I’m new in CPI and I have a problem in an integration flow I have created.

My flow is very simple and should just call an HTTP GET to an external service in the middle of the flow.

I have configured my flow to call a public HTTP from Northwind as example: https://services.odata.org/V2/Northwind/Northwind.svc/Customers

But I keep on getting the error: Error Details

org.apache.camel.CamelExchangeException: Error creating URL. Exchange[ID-vsa6508798-37357-1558546625620-7214-2]. Caused by: [java.lang.NullPointerException - scheme], cause: java.lang.NullPointerException: scheme

I have tried to use an OData receiver and there I’m able to call the same URL without errors.

Do you know a reason why the same URL should work in oData and fail with HTTP?

Do you know how to check if my URL is correctly configured in CPI HTTP?

Theses are my OData details:

And almost the same config for my HTTP receiver that fails:

S: I’m preparing for a session to partners next week and I’ll like to show an integration scenario between Qualtrics and ByDesign implemented on CPI. This step is blocking my implementation and I don’t know where to search further. I nee a hand here please.

Thanks,

cpi-odata1.jpg (39.2 kB)
cpi-odata2.jpg (85.1 kB)
cpi-http.jpg (56.9 kB)
Add a comment
10|10000 characters needed characters exceeded

Related questions

4 Answers

  • Posted on Jun 11, 2019 at 12:58 PM

    Hi Maria

    Your configuration looks fine. I was able to duplicate your setup and get a response from the Northwind service without error.

    Here's the iflow:

    And here's the configuration of the HTTP receiver channel:

    It looks like you have some whitespace in front of the address and query, but I tried adding whitespace to my own configuration, and it didn't cause the error you're seeing.

    Regards,

    Morten


    iflow.png (16.3 kB)
    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 21, 2019 at 08:47 AM

    Hi,

    I also had this exact error.

    When I enabled trace logging I could see that for the outbound http request the 'CamelHttpUri' header value was set to the value of my initial inbound SOAP URL, instead of the value which I assigned to the 'Address' field in the http outbound configuration - which was very strange.

    The only way I could find to get around it, was to set an additional header in a Content Modifier (before the http request) to override the CamlHttpUri value to the correct value.

    Feel like it could be a bug to me.

    Thanks

    Ed

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 18, 2019 at 05:53 AM

    Hi All,

    I am trying to hit http end point url, and the same error is appearing for me.

    Errorr :

    com.sap.it.rt.adapter.http.api.exception.HttpResponseException: An internal server error occured: Error creating URL. Exchange[ID-vsa6866353-34296-1565517737047-23058-6]. Caused by: [java.lang.NullPointerException - scheme]. The MPL ID for the failed message is : AF2Bw2NXNiwXsVSbhE0EY_3_4keF For more details please check tail log.

    org.apache.camel.CamelExchangeException: Error creating URL. Exchange[ID-vsa6866353-34296-1565517737047-23058-6]. Caused by: [java.lang.NullPointerException - scheme], cause: java.lang.NullPointerException: scheme

    Please let me know what steps needs to be done. It would be of great help.

    Thanks,
    Raj

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 21, 2019 at 09:25 PM

    Yes, it looks like a bug. I had to update below headers with receiver values to get my scenario working. For some reason in http to http scenario headers are getting updated with receiver connection

    CamelHttpUri

    CamelHttpUrl

    CamelServletContextPath

    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.