[teiid-issues] [JBoss JIRA] (TEIID-2956) NullPointerException using webservice translator against a webservice that's missing 'Content-Type' in the response header

gaurav singhal (JIRA) issues at jboss.org
Tue May 13 13:00:56 EDT 2014


     [ https://issues.jboss.org/browse/TEIID-2956?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

gaurav singhal updated TEIID-2956:
----------------------------------

    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.

  was:
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));



> NullPointerException using webservice translator against a webservice that's missing 'Content-Type' in the response header
> --------------------------------------------------------------------------------------------------------------------------
>
>                 Key: TEIID-2956
>                 URL: https://issues.jboss.org/browse/TEIID-2956
>             Project: Teiid
>          Issue Type: Bug
>          Components: Misc. Connectors
>    Affects Versions: 8.7
>         Environment: windows 7, teiid 8.7
>            Reporter: gaurav singhal
>            Assignee: Steven Hawkins
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.2.3#6260)


More information about the teiid-issues mailing list