为了帮助我的collueges,我已经开始在SouapUI中创建使用我们的REST服务的示例项目。我现在偶然发现了一个我无法自己解决的问题(或通过谷歌搜索):我无法配置SoupUI请求,以便它可以将文档发送到以文档列表作为输入的进程。输入变量只包含编码的"文件:filename"字节数组中的字符串:
<?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>
虽然我可以在SoapUI中看到附件被发送。这是原始消息的第一部分:
POST http://127.0.0.1:8080/rest/services/Björn/Processes/Test?InputDocs=file%3ATest_BS.pdf HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: multipart/form-data; boundary="----=_Part_91_1026149240.1491474211203"
MIME-Version: 1.0
Content-Length: 103524
Host: nc1140.rsvc.se:8080
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)
------=_Part_91_1026149240.1491474211203
Content-Type: application/pdf; name=Test_BS.pdf
Content-Transfer-Encoding: binary
Content-Disposition: form-data; name="Test_BS.pdf"; filename="Test_BS.pdf"
创建一个以正确方式发送此请求的HTML页面没有问题:
<FORM ACTION="http://127.0.0.1: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>
我应该如何编辑这个SoaupUI项目,以便AEM表单接收文件?
Here是一个带有进程的zip和SoapUI Project作为XML文件。