Control character when retrieving a field from an Oracle Array

Hi, I am connecting to an Oracle 9i DB using a web service and fetching data to populate and XML file. The server used here is WAS 6.1. There seems to be an issue with the value returned from a VARCHAR2 field. The data in this field has an asterisk(*).

We have a separate application calling this field and we get the value on the screen as ERROR*. When we directly call the query to the DB we get the value back correctly as ERROR*.

The webservice gets the record as an array from a stored procedure. The error: We are getting all the values correctly, except the value with the *. the value being returned here is 'ERROR'(without the quotes). There seems to be a control character at the end. When we put it in in the XML and do a system.out we can see the character showing up as ERROR& #25 (without the space in between, this is getting translated here on the screen).

We are using WSJdbcUtil.getNativeConnection method to get the array back from the stored procedure. Everything except this is working fine. And due to this charater, the XML validation fails.

Have you worked out what 25 is? You go to Unicode and search for "basic Latin" and open that and look for 19 (hex for 25). And you find EM which is end-of-medium. You may be able to parse the chars in Java and get it to print 19, which is also (I think ctrl-Y).

That is as far as I know, but try googling for end-of-medium and see whether you get anything useful (as opposed to 9435983759 sites about ouija boards ).

Ben George
Greenhorn

Joined: Nov 26, 2004
Posts: 3

posted Aug 21, 2008 15:29:00

0

The cause for my confusion is why are we getting the asterisk converted to the EM character? Is this something to do with the table data type of Oracle being wrapped in the WebSphere Connection object and then unwrapped for the data? Because I cannot see anywhere else in the flow where this gets converted.