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

Steven Hawkins (JIRA) issues at jboss.org
Tue May 13 14:22:56 EDT 2014


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

Steven Hawkins resolved TEIID-2956.
-----------------------------------

    Fix Version/s: 8.7.1
                   8.8
       Resolution: Done


We'll use a content-type of application/octet-stream (the recommended default) if the content-type is not in the metadata.  Since this is an optionally used value already it doesn't seem necessary to add another parameter.

> 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
>             Fix For: 8.7.1, 8.8
>
>
> 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