|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
SOAPInput node and CodedCharSetId |
« View previous topic :: View next topic » |
Author |
Message
|
matthewmatcham |
Posted: Thu Aug 12, 2010 1:03 am Post subject: SOAPInput node and CodedCharSetId |
|
|
Novice
Joined: 06 Sep 2006 Posts: 12 Location: UK
|
Broker version 6.1.0.2 on Windows
I have a flow with a SOAPInput node and have set the Parse timing to 'Immediate'. I am trying to handle and log errors from this node and create a SOAP Fault with some simple ESQL and a SOAPReply node. I'm sending messages from soapUI with invalid content that will fail parsing.
When I invoke the flow from soapUI the CCSID of the request is 1208, and the reply obviously needs to match this. However the value in Root.Properties.CodedCharSetId is 1252 immediately after the SOAPInput node. Any attempt to create a SOAP Fault manually in ESQL fails in soapUI due to a CCSID mismatch, and the value 1208 just isn't available to me anywhere in the flow.
If I wire the SOAPInput node directly into a SOAPReply node, and let the Broker create a SOAP Fault, it uses 1208 as the CCSID and everything is good. So it knows it, but doesn't let me see it.
Also, if I change the Parse timing to 'On Demand', the value of Root.Properties.CodedCharSetId becomes 1208 (i.e. the correct value) immediately after the SOAPInput node, and I can now access Root to generate, handle and log an exception and manually create a SOAP Fault to reply with.
I would rather have the SOAPInput node validate the input message immediately, particularly as I'm not actually accessing the message straight away in my flow. However, given my requirements to handle and log the error, it seems this feature (??) is going to force me to use On Demand parsing and place a dummy compute node at the start of my flow to force validation.
Any thoughts? Thanks |
|
Back to top |
|
 |
fjb_saper |
Posted: Sun Aug 22, 2010 6:14 am Post subject: Re: SOAPInput node and CodedCharSetId |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
matthewmatcham wrote: |
When I invoke the flow from soapUI the CCSID of the request is 1208, and the reply obviously needs to match this. However the value in Root.Properties.CodedCharSetId is 1252 immediately after the SOAPInput node. Any attempt to create a SOAP Fault manually in ESQL fails in soapUI due to a CCSID mismatch, and the value 1208 just isn't available to me anywhere in the flow.
Any thoughts? Thanks |
So my guess is that you are sending the response back with a header of
Code: |
<?xml version="1.0" encoding="UTF-8"> |
and you get a CCSID mismatch because your content is in CCSID 1252.
So in your ESQL node use following:
Code: |
SET OutputRoot.Properties.CodedCharSetId = 1208; |
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
matthewmatcham |
Posted: Mon Aug 23, 2010 3:36 am Post subject: Re: SOAPInput node and CodedCharSetId |
|
|
Novice
Joined: 06 Sep 2006 Posts: 12 Location: UK
|
fjb_saper wrote: |
So in your ESQL node use following:
Code: |
SET OutputRoot.Properties.CodedCharSetId = 1208; |
|
Thanks. That is actually the line of code I put in place originally as a little test.
The issue I have here - no doubt created by my confusion on this topic - is that I'm not sure how I know at that point in my flow what the corresponding Content Type of the reply message is (I'm not setting this, Broker is). In this case yes it is UTF-8, but will it always be? I can't find anything in the docs that specify this behaviour.
What happens if the original request message wasn't UTF-8? What will it be by default when I try to send a response? I could specify content-type as UTF-8 and CCSID as 1208 in my code, but without a better understanding of this I'm loathed to tinker.
 |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Aug 23, 2010 4:54 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
I haven't double-checked, but I expect the behavior in this area is significantly different between 6.1.0.2 and 6.1.0.8.
And by "different", I mean "better". |
|
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
|
|
|
|