HelloWorld using Drools Workbench & KIE Server

三世轮回 提交于 2019-12-02 03:54:37

What content type are you using in your POST request header? As far as I remember, that error message happened if you didn't provide a content-type: application/xml in your request's header.

Hope it helps,

are you ok?

The response of Esteban is right, but, you should add a another header, the header that you need to add is "Authorization", and the value of Authorization is the user that you registered to you application realm to your kie-server converted in base64. e.g.:

kieserver:system*01

converted to base64:

a2llc2VydmVyOnN5c3RlbSowMQ==

Anyway, the complete header of my request is like this:

Authorization : Basic a2llc2VydmVyOnN5c3RlbSowMQ==
Content-Type  : application/xml

I hope it was helpful.

Sorry for my english! :)

I got it working with using Postman (Chrome app / plugin) with the Authorization tab selected to No Auth. Really cool response!

<response type="SUCCESS" msg="Container helloworld successfully called.">
     <results>
         <![CDATA[<execution-results>
           <result identifier="message">
                <demo.HelloWorld>
                    <message>Joe</message>
                </demo.HelloWorld>
           </result>
           <fact-handle identifier="message" external-form="0:4:1864164041:1864164041:4:DEFAULT:NON_TRAIT"/>
</execution-results>]]>
           </results>
</response>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!