HTTP Receiver. Error while parsing http request for processing:

logstash output:

output{
    if [type]=="nxlog-json"{
       http {
       codec => json
       http_method => "post"
       url=>"http://192.168.1.112:9763/endpoints/test"
    }
}
}

HTTP Receiver config:

<?xml version="1.0" encoding="UTF-8"?>
<eventReceiver name="test" statistics="disable" trace="disable" xmlns="http://wso2.org/carbon/eventreceiver">
    <from eventAdapterType="http">
        <property name="basicAuthEnabled">false</property>
        <property name="transports">all</property>
    </from>
    <mapping customMapping="disable" type="json"/>
    <to streamName="teststream" version="1.0.0"/>
</eventReceiver>

ERROR in log:

ERROR {org.wso2.carbon.event.input.adapter.http.HTTPMessageServlet} - Error while parsing http request for processing: Path 'event' not found in the current context:

How to fix it?

WSO2 CEP Version 4.2.0

Upvotes: 0

Views: 105

Answers (1)

code8
code8

Reputation: 103

Solved this issue by wrapping json object via "event":{} as follows.

            jsonObject={
                     "event": {
                       "payloadData": {
                         "companyID":companyID,
                         "activityID":activityID
         }
  }

}

Upvotes: 0

Related Questions