|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
XML to DataInsert Node --> problems with single-quotes |
« View previous topic :: View next topic » |
Author |
Message
|
mapa |
Posted: Wed Oct 12, 2011 4:59 am Post subject: XML to DataInsert Node --> problems with single-quotes |
|
|
 Master
Joined: 09 Aug 2001 Posts: 257 Location: Malmö, Sweden
|
Hi,
I'm migrating message flows from 6.1 to 7.0 and removed some not so good Java code which now causes the message flow to fail if any element contains a single-quote.
Simple flow:
Input node --> error handling subflow --> RCD --> DataInsert Node.
Data is coming from a RAD WMB 7 and is a SAP IDOC as a DataObject.
Some elements contain correctly escaped ' for single-quote:
Code: |
<Belnr>l'att. Mr. Rol</Belnr>
|
In the DataInsert node there is a messagemap which maps the value as-is and doing so it is unescaped into single-quote ' and this causes the following exception:
Code: |
[IBM][ODBC SQL Server Driver][SQL Server]Unclosed quotation mark after the character string ')'.
|
This must be escaped with another single-quote to make it work.
That is l'att must be l''att.
Is there a way to circumvent this?
It would be fine to keep the ' even though not entirely correct.
As a work around someone has created a JCN that loops through all elements in the IDOC, cast the value to String and scan for single-quote. If found it escapes the single-quote with a single-quote.
This approach works but is consuming massive CPU since we receive hundred of thousands IDOCs.
WMB version = 7.0.0.3 on AIX (same behaviour on 6.1)
Target DB ODBC
Code: |
hv039@susehv55:/home/hv039 > mqsicvp BROKER -n PRSTG
BIP8270I: Connected to Datasource 'PRSTG' as user 'ESB'. The datasource platform is 'Microsoft SQL Server', version '10.50.1790'.
===========================
databaseProviderVersion = 10.50.1790
driverVersion = 06.00.0146 (b0101, U0089)
driverOdbcVersion = 03.52
driverManagerVersion = 3.52.0000
driverManagerOdbcVersion = 03.52.0000
databaseProviderName = Microsoft SQL Server
datasourceServerName = SWSEHSQ061
databaseName = HQV_PreStaging
odbcDatasourceName = PRSTG
driverName = UKmsss24.so
supportsStoredProcedures = Yes
procedureTerm = stored procedure
accessibleTables = Yes
accessibleProcedures = Yes
identifierQuote =
specialCharacters = None
describeParameter = Yes
schemaTerm = owner
tableTerm = table
|
|
|
Back to top |
|
 |
Gaya3 |
Posted: Wed Oct 12, 2011 6:06 am Post subject: Re: XML to DataInsert Node --> problems with single-quote |
|
|
 Jedi
Joined: 12 Sep 2006 Posts: 2493 Location: Boston, US
|
mapa wrote: |
Hi,
As a work around someone has created a JCN that loops through all elements in the IDOC, cast the value to String and scan for single-quote. If found it escapes the single-quote with a single-quote.
This approach works but is consuming massive CPU since we receive hundred of thousands IDOCs.
|
this design will kill your broker for sure,
i suggest you to change the code and deploy or look for any fixes from IBM - raise a PMR _________________ Regards
Gayathri
-----------------------------------------------
Do Something Before you Die |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|