Highlighted

How to test process with SoapUI?

BjornEricsson1

20-06-2017

In an effort to help my collueges I have begun creating example projects in SouapUI that consume our AEM Forms REST services. My problem that I am not able to solve on my own (or by googling) is: I am not able to configure the SoupUI request so that It can send a document to a process that takes List<Document> as input. The input variable only contains the encoded "file:<filename>" string in the byte-Array. Not the file itself:

<?xml version="1.0"?>

<list>

  <com.adobe.idp.Document serialization="custom">

    <com.adobe.idp.Document>

      <int>3</int>

      <boolean>true</boolean>

      <boolean>false</boolean>

      <null/>

      <string>127.0.0.1///////////10.47.0.140/////</string>

      <byte-array>ZmlsZTpUZXN0X0JTLnBkZg==</byte-array>

      <null/>

      <null/>

      <string/>

      <int>0</int>

      <string>text/plain</string>

      <null/>

      <map>

        <entry>

          <string>file</string>

          <null/>

        </entry>

        <entry>

          <string>wsfilename</string>

          <null/>

        </entry>

      </map>

      <string>adobe/idp/DocumentPullServant/adobejb_server1</string>

      <long>-1</long>

    </com.adobe.idp.Document>

  </com.adobe.idp.Document>

</list>

I have no problem creating an HTML-page that sends this request:

<FORM ACTION="http://nc1140.rsvc.se:8080/rest/services/Björn/Processes/Test" METHOD="post" ENCTYPE="multipart/form-data">

    <B>Test List<document> input</B>

    File: <INPUT TYPE="file" NAME="InputDocs" /><BR>

    <INPUT TYPE="submit" VALUE="Skicka" /><BR>

   </FORM>

How should I edit this SoaupUI-project so that AEM forms will receive the file?

You can find a zip with the process and the SoapUI Project here.

Replies