Petals BC REST

URI template with query string unsupported

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 1.3.0-BC
  • Fix Version/s: 2.5.0-BC
  • Component/s: Consumer mode
  • Security Level: Public
  • Description:
    Hide

    With the following JBI configuration for consumer mode:

    <jbi:consumes interface-name="inscription-cantine:inscriptionCantine">
             ...
             <rest:mapping>
                <rest:operation name="flowable-integration:getProcessInstances">
    
                   <!-- REST request part -->
                   <rest:http-method>GET</rest:http-method>
                   <rest:path-template>/school-cafeteria/process-instances?requester={requester}</rest:path-template>
                   <rest:http-body-from-json-virtual-root>getProcessInstances</rest:http-body-from-json-virtual-root>
                   <rest:xml-template>
                      <flowable-integration:getProcessInstances>
                         <flowable-integration:process-definition-identifier>inscriptionCantine</flowable-integration:process-definition-identifier>
                         <flowable-integration:variables>
                            <flowable-integration:variable name="requester">{requester}</flowable-integration:variable>
                         </flowable-integration:variables>
                      </flowable-integration:getProcessInstances>
                   </rest:xml-template>
                   
                   <!-- REST response part -->
                   <rest:on-jbi-response>
                      ...
                   </rest:on-jbi-response>
                </rest:operation>
             </rest:mapping>
          </jbi:consumes>

    We get the following error:

    2020/03/16 15:08:13,500 GMT+0100 WARNING [org.ow2.petals.component.framework.UnderTestWithDefaultConf] : The HTTP method 'GET' and the path '/school-cafeteria/process-instances' do not correspond to a couple "HTTP Method/path" specified in the jbi.xml of the SU
    org.ow2.petals.binding.rest.exchange.incoming.exception.RequiringHTTPErrorException: The HTTP method 'GET' and the path '/school-cafeteria/process-instances' do not correspond to a couple "HTTP Method/path" specified in the jbi.xml of the SU
    	at org.ow2.petals.binding.rest.exchange.incoming.RESTServlet.handleRequest(RESTServlet.java:162)
    	at org.ow2.petals.binding.rest.exchange.incoming.RESTServlet.doGet(RESTServlet.java:100)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
    	at org.ow2.petals.binding.rest.exchange.incoming.RESTServlet.service(RESTServlet.java:87)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
    	...
    Show
    With the following JBI configuration for consumer mode:
    <jbi:consumes interface-name="inscription-cantine:inscriptionCantine">
             ...
             <rest:mapping>
                <rest:operation name="flowable-integration:getProcessInstances">
    
                   <!-- REST request part -->
                   <rest:http-method>GET</rest:http-method>
                   <rest:path-template>/school-cafeteria/process-instances?requester={requester}</rest:path-template>
                   <rest:http-body-from-json-virtual-root>getProcessInstances</rest:http-body-from-json-virtual-root>
                   <rest:xml-template>
                      <flowable-integration:getProcessInstances>
                         <flowable-integration:process-definition-identifier>inscriptionCantine</flowable-integration:process-definition-identifier>
                         <flowable-integration:variables>
                            <flowable-integration:variable name="requester">{requester}</flowable-integration:variable>
                         </flowable-integration:variables>
                      </flowable-integration:getProcessInstances>
                   </rest:xml-template>
                   
                   <!-- REST response part -->
                   <rest:on-jbi-response>
                      ...
                   </rest:on-jbi-response>
                </rest:operation>
             </rest:mapping>
          </jbi:consumes>
    We get the following error:
    2020/03/16 15:08:13,500 GMT+0100 WARNING [org.ow2.petals.component.framework.UnderTestWithDefaultConf] : The HTTP method 'GET' and the path '/school-cafeteria/process-instances' do not correspond to a couple "HTTP Method/path" specified in the jbi.xml of the SU
    org.ow2.petals.binding.rest.exchange.incoming.exception.RequiringHTTPErrorException: The HTTP method 'GET' and the path '/school-cafeteria/process-instances' do not correspond to a couple "HTTP Method/path" specified in the jbi.xml of the SU
    	at org.ow2.petals.binding.rest.exchange.incoming.RESTServlet.handleRequest(RESTServlet.java:162)
    	at org.ow2.petals.binding.rest.exchange.incoming.RESTServlet.doGet(RESTServlet.java:100)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
    	at org.ow2.petals.binding.rest.exchange.incoming.RESTServlet.service(RESTServlet.java:87)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
    	...
  • Environment:
    -
  1. PETALSBCREST-81.patch
    (26 kB)
    Christophe DENEUX
    Mon, 16 Mar 2020 - 15:28:36 +0100

Activity

Christophe DENEUX made changes - Mon, 16 Mar 2020 - 15:26:53 +0100
Field Original Value New Value
Status New [ 10000 ] Open [ 10002 ]
Priority Major [ 3 ]
Assignee Christophe DENEUX [ cdeneux ]
Christophe DENEUX made changes - Mon, 16 Mar 2020 - 15:28:36 +0100
Attachment PETALSBCREST-81.patch [ 10840 ]
Christophe DENEUX made changes - Tue, 17 Mar 2020 - 15:14:15 +0100
Fix Version/s 1.5.0-BC [ 10903 ]
Christophe DENEUX made changes - Tue, 11 Apr 2023 - 11:34:58 +0200
Fix Version/s 2.5.0-BC [ 11099 ]
Fix Version/s 2.4.0-BC [ 10903 ]

People

Dates

  • Created:
    Mon, 16 Mar 2020 - 15:25:12 +0100
    Updated:
    Tue, 11 Apr 2023 - 11:34:58 +0200