Uploaded image for project: 'Teiid'
  1. Teiid
  2. TEIID-3841

sap-nw-gateway translator wrongly encodes when a parameter includes a space

XMLWordPrintable

    • Hide

      1. Do an import/Designer/Teiid Connection >> Source Model
      2. Create a new datasource using webservice from available drivers
      3. Enter Data Source Properties (can connect to the url in a browser):
      URL: https://sapes1.sapdevcenter.com/sap/opu/odata/IWFND/RMTSAMPLEFLIGHT/
      WebService Security Used: HTTPBasic
      class-name: used prefilled default
      Authentication User Name: P1940027560
      Authentication User Password: Foxrun1004
      4. Selected the newly created driver and selected "Next"
      5. Selected sap-nw-gateway translator and named the target model and selected "Next"
      6. Enter Name and click "Next"
      7. Click "Next" on "Get DDL for the Import" page
      8. Click "Finish"
      9. Select the newly created "GetFlightDetails" procedure
      10. Click "Edit" -> "Modeling" -> "Preview Data"
      11. Enter below values (without quotes) for parameters:
      airlineid: "AA BB"
      connectionid: "0017"
      12. Receive error:
      org.teiid.runtime.client.TeiidClientException: java.lang.RuntimeException: Remote org.teiid.core.TeiidProcessingException: TEIID30504 flightdemo: TEIID17013 Wrong response from source with HTTP Response Code 404: Vendor Code "005056A509B11EE1B9A8FEC11C21D78E": With message "Resource not found for the segment 'GetFlightDetails%3Fairlineid='AA%20AB'&connectionid='0017''.": Detail Error null

      Show
      1. Do an import/Designer/Teiid Connection >> Source Model 2. Create a new datasource using webservice from available drivers 3. Enter Data Source Properties (can connect to the url in a browser): URL: https://sapes1.sapdevcenter.com/sap/opu/odata/IWFND/RMTSAMPLEFLIGHT/ WebService Security Used: HTTPBasic class-name: used prefilled default Authentication User Name: P1940027560 Authentication User Password: Foxrun1004 4. Selected the newly created driver and selected "Next" 5. Selected sap-nw-gateway translator and named the target model and selected "Next" 6. Enter Name and click "Next" 7. Click "Next" on "Get DDL for the Import" page 8. Click "Finish" 9. Select the newly created "GetFlightDetails" procedure 10. Click "Edit" -> "Modeling" -> "Preview Data" 11. Enter below values (without quotes) for parameters: airlineid: "AA BB" connectionid: "0017" 12. Receive error: org.teiid.runtime.client.TeiidClientException: java.lang.RuntimeException: Remote org.teiid.core.TeiidProcessingException: TEIID30504 flightdemo: TEIID17013 Wrong response from source with HTTP Response Code 404: Vendor Code "005056A509B11EE1B9A8FEC11C21D78E": With message "Resource not found for the segment 'GetFlightDetails%3Fairlineid='AA%20AB'&connectionid='0017''.": Detail Error null

      Submitting a function through the sap-nw-gateway translator results in overzealous encoding of the URL when one of the parameters includes a space like "AA AB". The '?' character (along with the spaces in any parameters) in the expected URL [1] is encoded to '%3F' resulting in an error like [2] below.

      [1] https://sapes1.sapdevcenter.com/sap/opu/odata/IWFND/RMTSAMPLEFLIGHT/GetFlightDetails?airlineid='AA AB'&connectionid='0017'
      [2] org.teiid.runtime.client.TeiidClientException: java.lang.RuntimeException: Remote org.teiid.core.TeiidProcessingException: TEIID30504 flightdemo: TEIID17013 Wrong response from source with HTTP Response Code 404: Vendor Code "005056A509B11EE1B9A8FEC11C21D78E": With message "Resource not found for the segment 'GetFlightDetails%3Fairlineid='AA%20AB'&connectionid='0017''.": Detail Error null

              rhn-engineering-shawkins Steven Hawkins
              rhn-support-mshirley Marc Shirley (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: