With what you have above, I'm assuming you have a document such as:
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?
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
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.
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.
> 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
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
It does seem like a Designer issue, what version are you on?
A workaround would be to use a blob type instead of varbinary.