I am facing an issue. I’m trying to get some data from the SQL database and converting to an XML before sending it to Trading partner.
Here is the issue. The database has a value “Markets-Super” but in the target XML. The ‘-’ symbol is converted to ‘?’. The value appears as “Market?Super”.
I am doing encoding=true when converting documentToXML. Any thoughts on this bug?
The dash in the DB is likely a Windows extended character–Word and other Office apps “helpfully” convert a normal dash into an en or em dash. Depending upon the character set used, those dashes may get translated to a ?. Or it may just be a display issue for whatever utility you’re using the view the XML–it may not be able to display en/em dash so it shows ? instead. But the “real” char is still there.
The first thing I would check is to see what char is in the DB. If it really is an normal dash, then the issue lays elsewhere. If it is an en/em dash, ask if it can be change. It’s likely that it is unintentionally an en/em dash.
I have checked with DB team and its a normal dash that they are using. I even asked the DB team to populate the dash manually. I am able to receive it properly via JDBC select…but after converting it to XML. It is showing as ?. Not only dash…even the apostrophe symbol is getting converted as ? for this particular field. Not sure whats the issue is. Any thoughts?
But I still believe some thing to do with returned from the result set from JDBC adapter…what is the data type being used in oracle source and JDBC field type in your adapter service selection?
Did you check the more in the pipeline before converting to xmldata?
Sorry for the delayed reply. I found the fix. There is a place where we’re converting the xmldata to a stream and submitting it to TN. So, during the stringtobytes step. I am encoding it to utf-8 and it fixed the issue.