Skip to Content

PI 7.30 HTTP Java Adapter Test Tools

At PI 7.11 and before, the HTTP adapter is an ABAP adapter. PI 7.3 introduces a new HTTP adapter (HTTP_AAE) based on the java stack, using the java Adapter Framework.

In this blog, we will take a look at a couple of test tools that we can use to test the HTTP_AAE adapter.


In PI 7.3, in addition to the exiting HTTP adapter in ABAP, a java adapter (HTTP_AAE) has also been added. This new java adapter uses a java service to send the payload to the AAE of PI 7.3. The java adapter also provides two different methods of sending the payload, GET and POST, therefore, the need for 2 different test tools.

One of the benefits of using the HTTP_AAE adapter is to bypass the ABAP stack during message processing, which can increase the performance by as much as 10X. In addition, this adapter is a must-use when we install a java-only PI system without ABAP.

HTTP_AAE Adapter Overview

The URL to send the payload will be generated by the test tool with the following information. This is also the URL used for POST.



          Business Component name or Business System name used in the Integrated Configuration


          must be either BE or EO

With GET, the following URL is generated by the test tool. It is identical to the *POST* URL, except for the last parameter:



          the Main Payload Parameter Name used in the HTTP_AAE communication channel configuration

    the pay load

          must be URL encoded so that special characters, e.g. “<” and “>” can be sent without problem.

  • POST

Sample input screen:


Sample result screen, with response:


The HTML code has been updated to combine POST and GET into a single HTML.

HTML code which can be copy-n-pasted to a file with a file extension of .html, e.g. http_aae_Test_730.html.


<script type=”text/javascript”>;
function button1_onclick() {
  var result = “”;
  var payload = “<?xml version=\”1.0\” encoding=\”UTF-8\” ?>”;
  var senderNamespace = escape(document.MessageParameters.SenderNamespace.value);

  var reqString = “http://
  reqString = reqString + document.MessageParameters.Server.value+”:”;
  reqString = reqString + document.MessageParameters.Port.value + “/HttpAdapter/HttpMessageServlet?”;
  reqString = reqString + “interfaceNamespace=” + senderNamespace;
  reqString = reqString + “&interface=” + document.MessageParameters.SenderInterface.value;
  reqString = reqString + “&senderService=” + document.MessageParameters.SenderService.value;
  reqString = reqString + “&qos=” + document.MessageParameters.Qos.value;
  var xhttp = new ActiveXObject(“msxml2.xmlhttp”);
  if (document.MessageParameters.getpost.value == “GET”) {
   reqString = reqString + “&” + document.MessageParameters.MainPayload.value + “=”;
   reqString = reqString + encodeURIComponent(document.MessageParameters.xmlData.value); (“GET”, reqString, false);
  else { (“POST”, reqString, false);

  if (document.MessageParameters.Source[0].checked == true) {
    payload = document.MessageParameters.xmlData.value;
   xhttp.send (payload);
    var xmlDoc = new ActiveXObject(“microsoft.xmldom”);
   xmlDoc.load (document.MessageParameters.xmlFile.value);
   xhttp.send (xmlDoc);
  result = xhttp.responseText;

function getFile() {
  var mypath = document.MessageParameters.xmlFile.value;
var ForReading  = 1;
objFSO          = new ActiveXObject(“Scripting.FileSystemObject”);
objTextFile     = objFSO.OpenTextFile(mypath, ForReading);

var filearray   = “”;

for(var n=0;!objTextFile.AtEndOfStream;n++) {
  sRead = objTextFile.ReadLine();
  filearray += sRead + “\n”;

document.MessageParameters.xmlData.value = filearray;

function showHide() {
if (document.MessageParameters.getpost.value == “GET”) {
  document.getElementById(“parameter”).style.display = “block”;
  document.MessageParameters.URL.rows = 6;
else {
  document.getElementById(“parameter”).style.display = “none”;
  document.MessageParameters.URL.rows = 2;



<h3>Client HTTP_AAE Adapter Test</h3>
<form name=”MessageParameters”>
<select name=”getpost” onchange=”showHide()”>
<option value=”POST” SELECTED>POST</option>
<option value=”GET” >GET</option>
<div id=”parameter” style=”display:none;”>
   <label>Main Payload Parameter Name:</label>
   <input type=’text’ id=’mainPayload’ name=’MainPayload’ value=” size=’40’ />
   <br>(Caution:  The query string size is limited.  The payload should be less then 1000 characters.)
  <table border=”1″ cellpadding=”0″ cellspacing=”0″ style=”border-collapse: collapse” bordercolor=”#111111″ width=”100%”>
      <td width=”10%”><label>ServerHost</label> </td>
      <td width=”22%”><input type=”text” id=”host” name=”Server” value=”” size=”20″ /> </td>
      <td width=”10%”><label>ServerPort</label> </td>
      <td width=”22%”><input type=”text” id=”port” name=”Port” value=”” size=”10″ /> </td>
      <td width=”10%”><label>SenderService</label> </td>
      <td width=”22%”>
      <input type=”text” id=”senderService” name=”SenderService” value=”” size=”40″ /> </td>
      <td width=”10%”>QOS</td>
      <td width=”22%”>
  <select id=”qos” name=”Qos”>
  <option value=”BE” selected>Best Effort</option>
  <option value=”EO” >Exactly Once</option>
      <td width=”10%”><label>SenderInterface</label> </td>
      <td width=”22%”>
      <input type=”text” id=”senderInterface” name=”SenderInterface” value=”” size=”40″ /> </td>
      <td width=”10%”><label>SenderNamespace</label> </td>
      <td width=”22%”>
      <input type=”text” id=”senderNamespace” name=”SenderNamespace” value=”” size=”40″ /></td>
  <table border=”1″ cellpadding=”0″ cellspacing=”0″ style=”border-collapse: collapse” bordercolor=”#111111″ width=”100%”>
      <fieldset style=”padding: 2″>
       <td width=”50%”><input type=”radio” name=”Source” value=”Textarea” checked=”checked” />Type in XML</td>
       <td width=”50%”><input type=”radio” name=”Source” value=”File” />Upload File</td>
      <td width=”50%”><textarea name=”xmlData” rows=”10″ cols=”60″>&lt;a&gt;test&lt;/a&gt;</textarea></td>
      <td width=”50%”><input type=”file” name=”xmlFile” size=”40″  onChange=”return getFile()” /> </td>
  <input type=”button” value=”Send” id=”button1″ name=”button1″ LANGUAGE=”javascript” onclick=”button1_onclick()” />
  <hr />
  <h4 align=”left”>Result</h4>
  <p align=”left”>URL: <textarea rows=”2″ name=”URL” cols=”104″></textarea></p>
  Response Text:
  <textarea name=”response” rows=”5″ cols=”100″></textarea>



  • GET

Sample input screen:


Sample result screen, with response:


You must be Logged on to comment or reply to a post.
  • Hello Bill,

    The download link seems to be missing post the new SCN. Can you share the new download link please. Thanks for your help.



    • During the conversion from SDN to SCN, formating and some HTML tags were lost.  TEXTAREA, which was used to contain the code is no longer allowed in the new tool.  I had to make changes to the blog to include the code.

      • Thanks for your prompt response Bill.

        Just a quick note on the HTTP Post Client - , the function is commented and <script> tag is missing at the beginning. Probably a typo when you ported the code over.

        Both HTTP Get and Post works like a charm.



          • Hi William

            I am using your HTML code to post the data to PI using HTTP AAE. But I am getting the below error

            "Error in processing caused by: ERROR_IN_MODULECHAIN".

            I did not find any solution for this problem in SDN. 

            Can you please tell me why I am getting this error.

          • Hi Indrajit,

            Even i'm getting the same error "Error in processing caused by: ERROR_IN_MODULECHAIN".

            Were you able to resolve it?

          • Hi,

            I've updated the HTML code in the blog with another one which combines POST and GET into a single HTML.  Hopefully, this will also resolve the error.  I have been using this without any problem.


            William Li

          • Hi Mani,

            I just did a re-test of the HTML,  It executed successfully.

            When the HTML is loaded, make sure you allow "blocked content" for the activeX control.

            Make sure the QOS is "Best Effort" for synch interface.

            Also, start on a new browser session.  When you click on "Send", you should receive a request for username/password.  If you did not, then the msg was never sent to PI.  The HTML post was never executed.



          • Hi Wiliam,

            It was not asking me to provide user credential and the response was

            "Error: ERROR_IN_MODULECHAIN;ERROR_IN_MODULECHAIN, senderChannel &#39;7c398051ba61344d91f2eb48fa59ed62&#39;: Catching exception calling messaging system"

            Also tried to publish data form source system :SAP Sourcing and got below error:

            Sourcing was unable to publish Copy of Message to SAP ERP Server returned HTTP response code:500 for URL:http://HOST:PORT/HttpAdapter/HttpMessageServlet?interfaceNamespace=NAMESPACE&senderService=BUSINESS SYSTEM&qos=BE&interface=INTERFACE

            Contact your system administrator

            is it related to user authorization? if so please list of authorization if you know

            or any other setting need to be done in PI? its plain HTTP request from Source system

            PI Version 7.31 SP01



          • Hi,

            Have you tried using another adapter, e.g. SOAP, to see if error resulted?  Just to eliminate possible problem with HTTP adapter.



          • Hi Li,

            I copy-n-paste the code that you provided in the blog.

            as result, i can see the url generated, but not prompt was raised asking for credentials.

            i started a new browser session and the option "allow Blocked content" was selected.

            any idea??



  • Thank you for this tool Wiliam!

    Doing some tests with it I noticed that we are receiving back the generic "ERROR_IN_MODULECHAIN;ERROR_IN_MODULECHAIN" 500 error in the case where validation by the adapter is activated in the ICO and we are sending an invalid XML request.

    On the old ABAP HTTP adapter instead of this generic error we would receive back an exact error description from the parser for the same interface and payload.

    Do you know if this could be a faulty setting on our side or if it is a "feature" of the AAE adapter?

  • Thank you very much, it is working flawlessly.

    For anyone interested, with a PI release of 7.1x:

    Replace these lines in the beginning of the document (different parameter names) and use method "POST" to get it working with PI 7.1x

    reqString = reqString + document.MessageParameters.Port.value + "/sap/xi/adapter_plain?";

    reqString = reqString + "namespace=" + senderNamespace;

    reqString = reqString + "&interface=" + document.MessageParameters.SenderInterface.value;

    reqString = reqString + "&service=" + document.MessageParameters.SenderService.value;

  • Hi William,

    I am trying to post to HTTP_AAE adapter on AEX, however server throws authorisation error.

    What are the parameters to specify Basic authentication?

    Thanks in advance,


    • If you are using a browser, then you will be prompted for userid and password.  If you are using a program, then you will have to do this programmatically.

      There is no URL parameters to enter such information, as it is not secure.

  • William Li - Thanks for the wonderful informative blog! I see the code what you have shared will work only on IE. Have you shared or modified the code anytime after this so that its flexible on all the Web Browsers? We do not get any response URL or authentication pop up if used on Mozilla/Safari/Chrome. As I see for PI folks, by far this is the best tool for HTTP_AAE testing! 😉 .  Kindly share your inputs with us!



    • Hi,

      I am using this tool to test HTTP_ AAE, it is not giving any response.

      It displays only Error on Page.

      I am trying it on IE.

      Is it that ia ma missing any thing. Please help.

      Thanks & Regards,

      Akshay Ruia

  • Dear All,

    I used the HTTP_AAE tool. But there is "ERROR_IN_MODULECHAIN" error. Anyone knows the reason? The pi version is 7.4 java single stack with AEX.

    Appreciate your input.




    Many thanks & best regards,


    • Hubery,

      Checkin module tab of your sender channel if you have Module as below , if still the problem persists you can raise a separate thread12.PNG



    • Hi Hubery,

      "Error in modulechain" refers to an execution error in the backend-system. At least that's my experience.

      The following could help:

      • Activate the schema-validation in the scenario (inbound processing): Set to "validation by adapter". If the payload data is faulty and is the cause of the error, you'll get an explicit error with useful error messages instead of just a generic error in the backend
      • Check the backend-system for short dumps (transaction ST22). Perhaps the backend system was called but there was an error in the execution. Error in modulechain would then be error you'll see in PI

      Hope that helps.



        • Hi Hubery,

          What is the scenario you're using? http to SAP XI-Proxy or a SAP function module?



          edit: perhaps we should discuss this in a separate thread. You can open up a new thread and post the link if you want