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

NullPointerException using webservice translator against a webservice that's missing 'Content-Type' in the response header

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 8.8, 8.7.1
    • 8.7
    • Misc. Connectors
    • None

    Description

      If you deploy a vdb that uses the webservices translator in teiid 8.7, and that webservice doesn't have 'Content-Type' set in the response headers then the web service connector code throws a NullPointerException as it tries to retrieve the Content-Type and use it. This happens in the WSConnectionImpl.java class on these 2 lines specifically:

      ArrayList contentTypes = (ArrayList)this.responseContext.get("content-type"); //$NON-NLS-1$
      return new HttpDataSource(url, (InputStream)response.getEntity(), (String)contentTypes.get(0));

      so basically the contentTypes array is null if the response header doesn't containt any 'Content-Type' specified and then 2nd line gets the NullPointerException.

      Attachments

        Activity

          People

            rhn-engineering-shawkins Steven Hawkins
            gsinghal_jira gaurav singhal (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: