[JBoss JIRA] (TEIID-2694) Support for Blob Input in Teiid REST services
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-2694?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-2694:
---------------------------------------
Resteasy considers the charset automatically when calling getBodyAsString, but not when just getting the InputStream. So it looks like for character data, we'll need to get the charset :
String charset = mediaType.getParameters().get("charset");
That can then be set on the SQLXMLImpl and the ClobImpl.
> Support for Blob Input in Teiid REST services
> ---------------------------------------------
>
> Key: TEIID-2694
> URL: https://issues.jboss.org/browse/TEIID-2694
> Project: Teiid
> Issue Type: Enhancement
> Affects Versions: 8.5
> Environment: EAP 6.1 Alpha , Teiid 8.5
> Reporter: Madhu Garimilla
> Assignee: Ramesh Reddy
> Labels: Final
> Fix For: 8.10
>
>
> We are trying to upload large files as Blobs using Teiid REST service through VDB. Though we are writing the Blob objects to HttpUrlConnection object, it is not received on REST method. As per the conversation in the thread "https://community.jboss.org/thread/232840" Current parameter handling is done through strings and needs be enhanced to support Blob objects.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
10 years, 7 months
[JBoss JIRA] (TEIID-2694) Support for Blob Input in Teiid REST services
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-2694?page=com.atlassian.jira.plugin... ]
Ramesh Reddy commented on TEIID-2694:
-------------------------------------
Modified code to use multipart POST only when atleast one of the parameters is LOB or VARBINARY. We could support VARBINARY in regular POST but then we need to handle BASE64 handling, if anybody has this request we can consider later.
Since Clob implicitly uses UTF-8 and xml documents use the processing instruction, I am open for suggestions as how charset content type can influence the encoding further.
> Support for Blob Input in Teiid REST services
> ---------------------------------------------
>
> Key: TEIID-2694
> URL: https://issues.jboss.org/browse/TEIID-2694
> Project: Teiid
> Issue Type: Enhancement
> Affects Versions: 8.5
> Environment: EAP 6.1 Alpha , Teiid 8.5
> Reporter: Madhu Garimilla
> Assignee: Ramesh Reddy
> Labels: Final
> Fix For: 8.10
>
>
> We are trying to upload large files as Blobs using Teiid REST service through VDB. Though we are writing the Blob objects to HttpUrlConnection object, it is not received on REST method. As per the conversation in the thread "https://community.jboss.org/thread/232840" Current parameter handling is done through strings and needs be enhanced to support Blob objects.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
10 years, 7 months
[JBoss JIRA] (TEIID-2694) Support for Blob Input in Teiid REST services
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-2694?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-2694:
---------------------------------------
> Let me know if you think that is better approach, I will make the modifications.
It seems logical that you'd do multipart only with binary/lob data. Although you could support varbinary through a hex/base64 encoding.
> In case of blobs, clobs and xml, I just passed the inputstream content as is to the Teiid
It looks like from the spec that each part can have a content-type and charset. It wasn't clear to me from quickly looking at resteasy what that means for the inputstream.
> Support for Blob Input in Teiid REST services
> ---------------------------------------------
>
> Key: TEIID-2694
> URL: https://issues.jboss.org/browse/TEIID-2694
> Project: Teiid
> Issue Type: Enhancement
> Affects Versions: 8.5
> Environment: EAP 6.1 Alpha , Teiid 8.5
> Reporter: Madhu Garimilla
> Assignee: Ramesh Reddy
> Labels: Final
> Fix For: 8.10
>
>
> We are trying to upload large files as Blobs using Teiid REST service through VDB. Though we are writing the Blob objects to HttpUrlConnection object, it is not received on REST method. As per the conversation in the thread "https://community.jboss.org/thread/232840" Current parameter handling is done through strings and needs be enhanced to support Blob objects.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
10 years, 7 months
[JBoss JIRA] (TEIID-2694) Support for Blob Input in Teiid REST services
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-2694?page=com.atlassian.jira.plugin... ]
Ramesh Reddy commented on TEIID-2694:
-------------------------------------
Using multipart you can enter small string values along with any binary/large payloads. The only difference in calling style. Other option is, only *if* one of the parameter type is LOB/VARBINARY we can take the "mulitpart" approach. Let me know if you think that is better approach, I will make the modifications.
Each payload one can define the content-type that can define payload type, however I have tied that with the expected types on the procedure. In case of blobs, clobs and xml, I just passed the inputstream content as is to the Teiid. This should also support varbinary as designed.
> Support for Blob Input in Teiid REST services
> ---------------------------------------------
>
> Key: TEIID-2694
> URL: https://issues.jboss.org/browse/TEIID-2694
> Project: Teiid
> Issue Type: Enhancement
> Affects Versions: 8.5
> Environment: EAP 6.1 Alpha , Teiid 8.5
> Reporter: Madhu Garimilla
> Assignee: Ramesh Reddy
> Labels: Final
> Fix For: 8.10
>
>
> We are trying to upload large files as Blobs using Teiid REST service through VDB. Though we are writing the Blob objects to HttpUrlConnection object, it is not received on REST method. As per the conversation in the thread "https://community.jboss.org/thread/232840" Current parameter handling is done through strings and needs be enhanced to support Blob objects.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
10 years, 7 months
[JBoss JIRA] (TEIID-2694) Support for Blob Input in Teiid REST services
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-2694?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-2694:
---------------------------------------
> If you have client written before 8.10 that is doing POST operation, that will fail after the upgrade to 8.10, those clients would need to change to use "multipart" HTTP protocol.
Is that generally desirable? Or are you assuming that people only want to do a post for large binary data?
There may need to be some clarification on the encoding expectations. For Clob we'll effectively assume UTF-8. SQL/XML could have other encodings but would need to have that declared in the doc.
We may also need a handler for varbinary.
> Support for Blob Input in Teiid REST services
> ---------------------------------------------
>
> Key: TEIID-2694
> URL: https://issues.jboss.org/browse/TEIID-2694
> Project: Teiid
> Issue Type: Enhancement
> Affects Versions: 8.5
> Environment: EAP 6.1 Alpha , Teiid 8.5
> Reporter: Madhu Garimilla
> Assignee: Ramesh Reddy
> Labels: Final
> Fix For: 8.10
>
>
> We are trying to upload large files as Blobs using Teiid REST service through VDB. Though we are writing the Blob objects to HttpUrlConnection object, it is not received on REST method. As per the conversation in the thread "https://community.jboss.org/thread/232840" Current parameter handling is done through strings and needs be enhanced to support Blob objects.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
10 years, 7 months
[JBoss JIRA] (TEIID-2694) Support for Blob Input in Teiid REST services
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-2694?page=com.atlassian.jira.plugin... ]
Ramesh Reddy resolved TEIID-2694.
---------------------------------
Labels: Final (was: )
Fix Version/s: 8.10
Resolution: Done
Implemented the POST operation to only work with "multipart/form-data" which can handle any binary and large file or payload support. The GET operation is still same as before.
If you have client written before 8.10 that is doing POST operation, that will fail after the upgrade to 8.10, those clients would need to change to use "multipart" HTTP protocol.
You can find a full example of it here [https://github.com/teiid/teiid/blob/master/test-integration/common/src/te...]
> Support for Blob Input in Teiid REST services
> ---------------------------------------------
>
> Key: TEIID-2694
> URL: https://issues.jboss.org/browse/TEIID-2694
> Project: Teiid
> Issue Type: Enhancement
> Affects Versions: 8.5
> Environment: EAP 6.1 Alpha , Teiid 8.5
> Reporter: Madhu Garimilla
> Assignee: Ramesh Reddy
> Labels: Final
> Fix For: 8.10
>
>
> We are trying to upload large files as Blobs using Teiid REST service through VDB. Though we are writing the Blob objects to HttpUrlConnection object, it is not received on REST method. As per the conversation in the thread "https://community.jboss.org/thread/232840" Current parameter handling is done through strings and needs be enhanced to support Blob objects.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
10 years, 7 months
[JBoss JIRA] (TEIID-3345) NPE while accessing VDB via OData access
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-3345?page=com.atlassian.jira.plugin... ]
Ramesh Reddy updated TEIID-3345:
--------------------------------
Priority: Minor (was: Major)
> NPE while accessing VDB via OData access
> ----------------------------------------
>
> Key: TEIID-3345
> URL: https://issues.jboss.org/browse/TEIID-3345
> Project: Teiid
> Issue Type: Bug
> Reporter: Juraj Duráni
> Assignee: Ramesh Reddy
> Priority: Minor
>
> If wrong odata URL is provided, an internal error is displayed:
> URL: http://localhost:8080/odata/
> Exception: org.teiid.core.TeiidRuntimeException: TEIID16008 VDB name not defined on the URL. The url format is http://{host}:{port}/odata/{vdb-name}[.{vdb-version}]/...
> org.teiid.odata.TeiidProducerProvider.getContext(TeiidProducerProvider.java:88)
> org.teiid.odata.TeiidProducerProvider.getContext(TeiidProducerProvider.java:47)
> ....
> This behavior is quite expected.
> URL: http://localhost:8080/odata
> Exception: java.lang.NullPointerException
> org.teiid.odata.TeiidProducerProvider.getContext(TeiidProducerProvider.java:80)
> org.teiid.odata.TeiidProducerProvider.getContext(TeiidProducerProvider.java:47)
> ...
> I expect that teiid should return similar exception
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
10 years, 7 months
[JBoss JIRA] (TEIID-3345) NPE while accessing VDB via OData access
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-3345?page=com.atlassian.jira.plugin... ]
Ramesh Reddy reassigned TEIID-3345:
-----------------------------------
Assignee: Ramesh Reddy (was: Steven Hawkins)
> NPE while accessing VDB via OData access
> ----------------------------------------
>
> Key: TEIID-3345
> URL: https://issues.jboss.org/browse/TEIID-3345
> Project: Teiid
> Issue Type: Bug
> Reporter: Juraj Duráni
> Assignee: Ramesh Reddy
>
> If wrong odata URL is provided, an internal error is displayed:
> URL: http://localhost:8080/odata/
> Exception: org.teiid.core.TeiidRuntimeException: TEIID16008 VDB name not defined on the URL. The url format is http://{host}:{port}/odata/{vdb-name}[.{vdb-version}]/...
> org.teiid.odata.TeiidProducerProvider.getContext(TeiidProducerProvider.java:88)
> org.teiid.odata.TeiidProducerProvider.getContext(TeiidProducerProvider.java:47)
> ....
> This behavior is quite expected.
> URL: http://localhost:8080/odata
> Exception: java.lang.NullPointerException
> org.teiid.odata.TeiidProducerProvider.getContext(TeiidProducerProvider.java:80)
> org.teiid.odata.TeiidProducerProvider.getContext(TeiidProducerProvider.java:47)
> ...
> I expect that teiid should return similar exception
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
10 years, 7 months