Author |
Message
|
junzi88 |
Posted: Thu Aug 06, 2015 6:31 am Post subject: Validate Message After MQInput Node Against Schema |
|
|
Novice
Joined: 25 Sep 2013 Posts: 16
|
Hello, we have a mainflow to call a webservice which is on different broker. Because webservice takes very long time to response due to its complex business logic It holding mainflow threads causes many incoming calls timeout. To solve the issue, we change the mainflow to drop the message to MQ to release the thread and change the webservice to use MQInput node. The problem is how to vaidate the request against WSDL and schema. Before SOAPINput node does the job. We tried message set. But some one said message set will go away in WMB 10(we are on WMB 8 now). What is the best way to validate message now? |
|
Back to top |
|
 |
Vitor |
Posted: Thu Aug 06, 2015 6:43 am Post subject: Re: Validate Message After MQInput Node Against Schema |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
junzi88 wrote: |
change the webservice to use MQInput node. |
Why not change the SOAPInput node to use JMS rather than HTTP, and point it at the queue with the message on it?
junzi88 wrote: |
But some one said message set will go away in WMB 10(we are on WMB 8 now). What is the best way to validate message now? |
I can hear @kimbert grinding his teeth from here....
Message sets are not "going away"; from v8 onwards they're depreciated in favour of DFDL and the much richer (and easier to use) modeling techniques it offers. Also in later versions, you don't need to model an XSD with a message set or similar, you can use the XSD directly.
In any event, nothing in this space limits the ability of IIB to validate a message against an XSD, which is all the SOAPInput node is doing. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Aug 06, 2015 6:45 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
You can't validate the message *before* an input node.
Broker doesn't *have* a message until it's read by an input node.
A SOAP message should always conform to the WSDL that specifies the service.
If you are using a SOAPRequest node to call the webservice, it will (or should) validate the message against the WSDL before it sends it.
What do you mean by "a message set"? Surely you didn't create an MRM model of the XML Soap data!
Import the WSDL into both flows. It will create the necessary message models for you.
Don't listen to "some one". Verify what you're told against IBM's website. |
|
Back to top |
|
 |
junzi88 |
Posted: Thu Aug 06, 2015 8:03 am Post subject: |
|
|
Novice
Joined: 25 Sep 2013 Posts: 16
|
Thank Jeff and Victor. In mainflow SOAPRequest node holds the threads. That's why we want to use MQ output node instead. On webservice side, we use MQ input node to get the message. After get message we are required to validate it with Acord schema. Before we create message model from WSDL and SOAPInput node can validate the SOAP message.
Victor, beside message set, do you suggested to use DFDL? Is it for SOAP message? or other coding validation?JAXB?
Jeff's answer makes me think of SOAPAsyncRequest node. Does it release the thread? |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Aug 06, 2015 8:06 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
junzi88 wrote: |
Jeff's answer makes me think of SOAPAsyncRequest node. Does it release the thread? |
It uses a background thread to wait for the response, and then starts a new instance of the message flow at the SOAPAsyncResponse node.
There's nothing different about validating any message using any input node from validating any other message using any other input node. |
|
Back to top |
|
 |
Vitor |
Posted: Thu Aug 06, 2015 8:46 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
junzi88 wrote: |
Thank Jeff and Victor. In mainflow SOAPRequest node holds the threads. That's why we want to use MQ output node instead. On webservice side, we use MQ input node to get the message. |
And as I said before, what's wrong with using an MQOutput node to put the message onto a queue, and a SOAPInput node with a JMS binding to reading it off and validate it (exactly as it does for a message received over HTTP).
junzi88 wrote: |
After get message we are required to validate it with Acord schema. Before we create message model from WSDL and SOAPInput node can validate the SOAP message. |
And an MQInput node can validate the message just as well. The only difference is that there is specific tooling within the Toolkit that sets up the validation automatically for a SOAPInput node; for an MQInput node you have to set the node properties manually.
Or use a SOAPInput node with a JMS binding.
junzi88 wrote: |
Victor, beside message set, do you suggested to use DFDL? Is it for SOAP message? or other coding validation?JAXB? |
Your inability to spell my name is matched only by your inability to read what I said:
Vitor wrote: |
Also in later versions, you don't need to model an XSD with a message set or similar, you can use the XSD directly. |
What part of that sounds like "model the XSD in DFDL"?
WMBv8 and IIBv9 use XSD schemas directly. They don't need to be wrapped in message sets, or anything else, as they were in v7 and below.
Hence an MQInput node can validate a message by directly referencing the XSD (which is part of the WSDL). This is what the SOAPInput node is doing, except that (as I said) the Toolkit sets that up for you and does not for the MQInput node.
junzi88 wrote: |
Jeff's answer makes me think of SOAPAsyncRequest node. Does it release the thread? |
I agree with his comments about threads as he agrees with my comments about validation. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Vitor |
Posted: Thu Aug 06, 2015 8:49 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
For the benefit of future readers, and to be completely clear:
- Message sets are supported and work fine through WMB/IIB v8,v9 and v10
- For these versions non-XML data should be modeled using DFDL in preference to message sets because DFDL is better than message sets
- For XML data you don't need to model it with anything in WMB/IIB but use a schema (XSD). _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|