title: HelloWorld using Drools Workbench & KIE Server
body: <p>Have KIE Drools Workbench 6.2.0 Final installed inside a JBoss 7 Application Server local instance and Kie Server 6.2.0 Final inside a local Tomcat 7 instance. </p>
  
  <p>Using the web based KIE Workbench strictly for evaluation purposes (am using it to code generate Java based Maven projects and am not using a particular IDE such as Eclipse or IntelliJ IDEA):</p>
  
  <ol>
  <li><p>Created a new repository called testRepo</p></li>
  <li><p>Created a new project called HelloWorld</p></li>
  <li><p>Created a new Data Object called HelloWorld with a String property called message:</p>
  
  <pre><code>package demo;
  
  /**
   * This class was automatically generated by the data modeler tool.
   */
  public class HelloWorld implements java.io.Serializable {
  
    static final long serialVersionUID = 1L;
  
    private java.lang.String message;
  
    public HelloWorld()
    {
    }
  
    public java.lang.String getMessage()
    {
       return this.message;
    }
  
    public void setMessage(java.lang.String message)
    {
       this.message = message;
    }
  
    public HelloWorld(java.lang.String message)
    {
       this.message = message;
    }
  
  } 
  </code></pre></li>
  <li><p>Created a new DRL containing the following contents:</p>
  
  <pre><code>package demo;
  
  import demo.HelloWorld;
  
  rule "hello"
  
  when 
      HelloWorld(message == "Joe");
  then
      System.out.println("Hello Joe!");
  end
  </code></pre></li>
  <li><p>When I deploy it to my Kie Server under this URL:</p></li>
  </ol>
  
  <p><a href="http://localhost:8080/kie-server-6.2.0.Final-webc/services/rest/server/containers/helloworld" rel="nofollow noreferrer">http://localhost:8080/kie-server-6.2.0.Final-webc/services/rest/server/containers/helloworld</a></p>
  
  <p>I get the following response when I copy and paste the above URL in Google Chrome:</p>
  
  <pre><code>&lt;response type="SUCCESS" msg="Info for container hello"&gt;
  &lt;kie-container container-id="hello" status="STARTED"&gt;
      &lt;release-id&gt;
          &lt;artifact-id&gt;Hello&lt;/artifact-id&gt;
          &lt;group-id&gt;demo&lt;/group-id&gt;
          &lt;version&gt;1.0&lt;/version&gt;
      &lt;/release-id&gt;
      &lt;resolved-release-id&gt;
          &lt;artifact-id&gt;Hello&lt;/artifact-id&gt;
          &lt;group-id&gt;demo&lt;/group-id&gt;
          &lt;version&gt;1.0&lt;/version&gt;
      &lt;/resolved-release-id&gt;
      &lt;scanner status="DISPOSED"/&gt;
  &lt;/kie-container&gt;
  &lt;/response&gt;
  </code></pre>
  
  <ol start="6">
  <li><p>When I try to do a POST using the following payload (using Postman or SoapUI):</p>
  
  <pre><code>&lt;batch-execution lookup="defaultKieSession"&gt;
  &lt;insert out-identifier="message" return-object="true" entrypoint="DEFAULT"&gt;
      &lt;demo.HelloWorld&gt;
          &lt;message&gt;Joe&lt;/message&gt;
      &lt;demo.HelloWorld&gt;
  &lt;/insert&gt;
  </code></pre>
  
  <p>
     </p></li>
  <li><p>Received the following:</p>
  
  <p>HTTP Status 415 - Cannot consume content type
  type Status report
  message Cannot consume content type</p>
  
  <p>description The server refused this request because the request entity is in a format not supported by the requested resource for the requested method.</p></li>
  </ol>
  
  <p>What am I possibly doing wrong? I went to Deploy -> Rule Deployments and registered my kie-server along with creating a container called helloworld and as one can see from Step # 5, it worked. Perhaps I am not deploying it correctly?</p>
  
  <p>Btw, I used the following Stack Overflow <a href="https://stackoverflow.com/questions/26551535/setup-drools-kie-execution-server-credentials">post</a> as a basis (prior to asking this question)...</p>
  
  <p>Most of the search results from Google just explain how to programmatically create Drools projects by setting up Maven based projects. Am evaluating KIE Drools Workbench to see how easily a non-technical person can use KIE Drools Workbench to generate Drools based rules and execute them.</p>
  
  <p>Am I missing a step? Under Tomcat 7, it only contains the following directories under apache-tomcat-7.0.64/webapps/kie-server-6.2.0.Final-webc:</p>
  
  <p>META-INF</p>
  
  <p>WEB-INF</p>
  
  <p>Thanks for taking the time to read this...</p>