-
1. Re: Webservice datasource only getting partial result.
shawkins Jan 8, 2016 12:11 PM (in response to realmad)With what you have above, I'm assuming you have a document such as:
getFileInputResponse
--return
----content
----name
----path
--return
----content
----name
----path
...
Then you are filtering to only the return elements that had an id of 1, correct? So are you saying that there are other return element contents that should be returned but are not?
-
2. Re: Webservice datasource only getting partial result.
realmad Jan 8, 2016 1:30 PM (in response to shawkins)oh no what I wanted to say was content element holds the base64 string representation of file content but the length of the value is only 4000 characters instead of 8496 characters. So its truncated.
If I call the web service directly the value of content is 8496 characters.
Here is the properties for content field
Thanks.
-
3. Re: Webservice datasource only getting partial result.
shawkins Jan 8, 2016 2:08 PM (in response to realmad)See FROM Clause - Teiid 8.12 - Project Documentation Editor
Rather than using the string type, which has a default limit of 4000 characters, you would use:
content varbinary PATH 'xs:base64Binary(/content)'
That should give the fully content as a byte array.
-
4. Re: Webservice datasource only getting partial result.
realmad Jan 11, 2016 10:00 AM (in response to shawkins)Hi,
Thanks for the tip.
I have changed my transformation to
BEGIN SELECT t.* FROM XMLTABLE(XMLNAMESPACES('http://webservices.samples.jboss.org/' AS tns), '/tns:getFileInputResponse/return' PASSING DataServiceView.getFileInput_response.xml_in COLUMNS content varbinary PATH 'xs:base64Binary(/content)', name string PATH '/name', id integer PATH '/id') AS t; END
and I have changed the property of content to varbinary
but I get the following error in Teiid designer
The column 'content' with runtime type 'string' does not match the runtime type 'varbinary' from the query transformation.
I see the run time type for varbinary is string and I don't see varbinary type in runtime.
I need help on how to proceed further.
Thanks.
-
5. Re: Webservice datasource only getting partial result.
shawkins Jan 11, 2016 10:10 AM (in response to realmad)> but I get the following error in Teiid designer
That should be saying that the procedure result set or some other place in your vdb still thinks that the type for content is string. Teiid Designer won't automatically correct the usage of a column once the type is changed. So check any where you are referencing content and see if you are expecting a string and change it to varbinary.
> I see the run time type for varbinary is string and I don't see varbinary type in runtime.
The runtime type for varbinary is the varbinary type. Depending upon what you are looking at, you may be seeing Designer walk the xsd base types for varbinary, which will go varbinary->base64Binary->anySimpleType and then may show the base representation of anySimpleType as string. If it seems to actually be saying that the runtime type will be string, then please capture a screenshot and log a Teiid Designer issue - https://issues.jboss.org/browse/TEIIDDES
-
6. Re: Webservice datasource only getting partial result.
xyran Jan 11, 2016 2:02 PM (in response to shawkins)I am not sure whats happening. I have changed all the references to varbinary and still have the error.
Here is my model
getFileInput_response() --> GetFileInput() // wrapper procedure --> FileInput_View // final view
The content type in all of them is varbinary.
Below is the screenshot that shows run-time type of varbinary as a string. Not sure how relevant this is
I am using Jboss dev studio 8 with teiid designer 9.2
Thanks.
-
7. Re: Webservice datasource only getting partial result.
shawkins Jan 11, 2016 5:46 PM (in response to xyran)It does seem like a Designer issue, what version are you on?
A workaround would be to use a blob type instead of varbinary.
-
8. Re: Webservice datasource only getting partial result.
shawkins Jan 12, 2016 1:36 PM (in response to shawkins)was captured to address the designer issue.