Uploaded image for project: 'Spring Integration'
  1. Spring Integration
  2. INT-3054

Make HttpRequestExecutingMessageHandler more lenient on extra declared uri variables

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 3.0 M2
    • Fix Version/s: 3.0 M3
    • Component/s: HTTP Support
    • Labels:

      Description

      Assume a gateway is attached to an http outbound gateway. The methods defined in the gateway can have multiple uri variables:

       <int:method name="registerCreateUser">
                  <int:header name="serviceURL" value="http://foo/{uriA}/{uriB}"/>
                   </int:method>
              <int:method name="fooA" >
                  <int:header name="serviceURL"
                              value="http://foo/{uriA}"/>
              </int:method>
      

      and the http gateway makes use of the service URL:

       <int-http:outbound-gateway
          ...   
           url-expression="headers.serviceURL">
      
              <int-http:uri-variable name="uriA" expression="headers.uriA"/>
              <int-http:uri-variable name="uriB" expression="headers.uriB"/>
              <int-http:uri-variable name="uriC" expression="headers.uriC"/>
              <int-http:uri-variable name="uriD" expression="headers.uriD"/>
              <int-http:uri-variable name="uriE" expression="headers.uriE"/>
          </int-http:outbound-gateway>
      

      Because the http gateway doesn't know what uri variables it might obtain, it defines a bunch (there's no uri-variable-factory yet). The current code base is too strict in making sure that all possible uri variables have a value.

      My pull request changes this so that the http gateway will only throw an exception if the uri specifies a URI variable but doesn't find one defined and ignores the rest.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                abilan Artem Bilan
                Reporter:
                wwadge Wallace Wadge
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: