Skip to Content

Use curl to test interface with HTTP_AAE adapter

In our community there are already blogs about test tools for Java based HTTP_AAE adapter, like PI 7.30 HTTP Java Adapter Test Tools by William Li. His script works fine, however it has some restrictions, for example, it can run only under Internet Explorer, because in script ActiveXObject is used, and you can’t save test cases, if you want repeat your tests later.

Actually there is a well known command line tool cURL, “client for URL”, which we can use to test HTTP_AAE adapter. This is a swiss knife running both under windows or Linux/Unix system and has many powerful features. To post a file to HTTP_AAE adapter, we can use this tool like:

curl  -i –header “Content-Type:text/xml” \

–user username:password –data@filename.xml \


Update: If you are working on Windows operation system, you have to replace single quote with double quote around the URL. It seems that Windows doesn’t like single quote.

If you get HTTP status 200 back, it means that the file is successfully posted.

If you have some files to test or repeat tests, you can write a small windows command script or shell script in Linux to post all the file by running the script only once.

If you want get more details, you can add the option:

–trace-ascii debug.txt

If you need proxy to reach server, just put:

–porxy poxyserver:port

If you need ignore SSL warning, use this option:

-k  or –insecure

I have only mentioned most commonly used options here, and there are a lot of other options, which can be found in curl manual page.

You must be Logged on to comment or reply to a post.
  • Hi Dingjun,

    Should we install something that can run cURL tools? Where can we get it?

    BTW, SOAP UI also is a good tools to test HTTP_AAE adatper.

    It can save test case and can do volume and workload test also.



    • Hi Dingjun,

      Though my question is not related to this blog, I read somewhere you had commented that while intergrating SAP to SFDC, we can store the session id so that no need to call the login for every transaction. I am facing the same problem. Can you please let me know how to do this?

      • Hi Mona,

        you can call the login to get a valid session id and save it in value mapping in directory. When you need to call SFDC SOAP API, then you read the session id from value mapping. If I’m not wrong, the session id returned by SFDC is valid for 120 minutes. so you also need an interface to update the saved session id.



        • Hi Dingjun,

          Thanks for your quick respone. However can you please send me a link so that i can refer to this step by step since i am just a beginner in PI.

          Or if you can mail me the steps at my email id that would be great help.

          • Hi Mona,

            If you have done settings related to SFDC session ID with value mapping, then please post the steps or share me any blog related to this.