简体   繁体   English

HTML发布到Alfresco Webservice

[英]HTML post to Alfresco Webservice

I have been trying to post from a HTML dashlet to a Java based web-service but the content is always null. 我一直试图从HTML dashlet发布到基于Java的Web服务,但是内容始终为null。 I have tried posting with postman setting various properties etc. I have been able to get a response as a result of the post but using the debugger I can see that the content is null! 我尝试使用设置各种属性的邮递员进行发布。由于发布,我已经能够获得响应,但是使用调试器,我可以看到内容为空! I have tried many versions of a DeclarativeWebScript or a AbstractWebScript in both cases I have used many options for the post type but always the content received is null! 在这两种情况下,我都尝试了许多版本的DeclarativeWebScript或AbstractWebScript,我为帖子类型使用了许多选项,但始终收到的内容为null! I have looked for an example but can find only ones that post a file which is not what I want to post. 我找了一个例子,但只能找到那些发布了我不想发布的文件的文件。 Any pointers gratefully received. 感激任何指针。

If you are submitting html form with post request directly then it will look for the action url in share environment or in share side, 如果您要直接通过发布请求提交html表单,那么它将在共享环境或共享端查找操作网址,

So it is better to use ajax for get or post request to your alfresco repository 因此,最好使用ajax对露天仓库进行获取或发布请求

Refer this ajax documentation for repo webscript call. 有关回购Web脚本调用,请参考此Ajax 文档

Refer this documentation for your to get/post parameters which you will send in your html get/post request, you can send your response data. 请参阅此文档 ,以获取将在html get / post请求中发送的get / post参数,您可以发送响应数据。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM