使用MobileFirst版本6.3在适配器中构造多部分表单请求 [英] constructing a multipart form request in a adapter using MobileFirst version 6.3
问题描述
我有一个应用程序,我需要在HTTP适配器中构建一个多部分表单,并使用WL.Server.invokeHttp将其发送到webservice。有没有办法实现这个目标?
i have a application from which i need to construct a multipart form in a HTTP adapter and send it to webservice using WL.Server.invokeHttp. is there a way by which i can achieve this?.
推荐答案
JavaScript适配器不支持多部分。
JavaScript adapters do not support multi-part.
你有两种选择:
- 在MFPF 6.3中,在JavaScript适配器中使用Java
- 升级到MFPF 7.0,现在提供 Java 适配器
- In MFPF 6.3, use Java in JavaScript adapters
- Upgrade to MFPF 7.0, which now provides Java adapters
然后,您可以尝试实施以下内容(或针对您的具体内容)用例):如何制作使用Java的multipart / form-data POST请求?
You can then try to implement the following (or similar for your specific use case): How can I make a multipart/form-data POST request using Java?
如果表单帖子不是针对受Worklight保护的后端安全框架,然后您也可以选择不使用适配器:发送multipart / formdata与jQuery.ajax
If the form post is not directed at a backend protected by Worklight's security framework, then you could also opt to not use adapters at all: Sending multipart/formdata with jQuery.ajax
这篇关于使用MobileFirst版本6.3在适配器中构造多部分表单请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!