ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Message Validation

Post new topic  Reply to topic
 Message Validation « View previous topic :: View next topic » 
Author Message
siri2083
PostPosted: Wed Jul 29, 2009 5:49 am    Post subject: Message Validation Reply with quote

Apprentice

Joined: 16 Apr 2009
Posts: 39

Hi,

I want to check the validation of message is working fine for my flow. Presnetly i am working MB6.0.2 version. My flow looks like: MQINputNode ----->MqOutputnode

In the mqinput node properties, i have decalred messagesetID, message type,message domain as MRM and format.

my meeasgedefinition has a complex element of min occurence as '0' and this complex element has 2 choice elements of min occurence as '0' and 2 simple elements of min occurence '0'.

My flow is working fine in below scenarios:
1. when i place correct xml
2. when place wrong xml (Ex: end tag missing) validation fails and goes fail terminal of input queue.

myflow is not working in below scenario:

when i place xml by misssing both the choice elements. and just has simple elements in that complex type.

the message is not going to fail terminal of the flow or to out termial and broker getting stuck. i was need to restart the broker and configuration mager to test again.

none of the debugging mechanisms giving the clue, where were the message went and where was the problem is.

in the event viewer and event logs are telling that message went in to the infinate loop.

when change message domain to XMLNSC,the message is going to output queue for the wrong message too.

i even tested in MB6.1 too, there was no difference in the both the cases.

can any one please tell me, what could be the problem and how can i resolve this issue.
Back to top
View user's profile Send private message
WMBDEV1
PostPosted: Wed Jul 29, 2009 5:57 am    Post subject: Reply with quote

Sentinel

Joined: 05 Mar 2009
Posts: 888
Location: UK

Do you have a backout queue defined for your input queue?

If you attempt the parse in an RCD node (set the options to immediate parse and "content and value") after the input node do you get more clues from a trace?
Back to top
View user's profile Send private message
smdavies99
PostPosted: Wed Jul 29, 2009 6:23 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

IF you flow is as you indicate

MQInput----->MQOutput

Then you should set the message domain to BLOB as obviously, with nothing between the input & output nodes apart from a connection you can't do anything with the message.

If however there is more to your flow than you are revealling please remove any debugger connections and take a user trace.
The trace output will (especialy on V6.1) give us lots of information. If you don't know how to do the user trace, I suggest you get some training before diving in at the deep end like you seem to be.
I would also (for dev purposes), wire up thecatch & failure terminals of the MQInput Node to a TRace node and then to an MQOutputNode which would allow the message to be specifically sent to an error destination.

Finally, is there a good reason for using the MRM parser and not say the XMLNSC one?
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
WMBDEV1
PostPosted: Wed Jul 29, 2009 6:34 am    Post subject: Reply with quote

Sentinel

Joined: 05 Mar 2009
Posts: 888
Location: UK

smdavies99 wrote:

Finally, is there a good reason for using the MRM parser and not say the XMLNSC one?


XMLNSC does not provide the validation required in 6.0
Back to top
View user's profile Send private message
dilse
PostPosted: Wed Jul 29, 2009 8:03 am    Post subject: Reply with quote

Master

Joined: 24 Jun 2004
Posts: 270

As WMBDEV1 suggested, defining a back out queue should fix your Broker getting stuck problem.

Also try to enable the validation by setting the validation to "Content and Value" and see how it behaves.
Back to top
View user's profile Send private message
siri2083
PostPosted: Wed Jul 29, 2009 9:33 pm    Post subject: Reply with quote

Apprentice

Joined: 16 Apr 2009
Posts: 39

Hi dilse and WMBDEV1,

In the MQinputnode properties i have set the options to immediate parse and "content and value" and my MQinput node is wired catch & failure terminals to a Trace node and then to an MQOutputNodes. even declared the backout queue.

but there is no change in the behaviour of the flow and broker.

as per the requirement, it is needed to validate every incoming and out going messages which are passing thru the flow.

so, it was needed to use MRM to validate the message. where XMLNSC doesnt provide validation.

Thank you.
Back to top
View user's profile Send private message
AkankshA
PostPosted: Wed Jul 29, 2009 11:37 pm    Post subject: Reply with quote

Grand Master

Joined: 12 Jan 2006
Posts: 1494
Location: Singapore

whats the composition for the top level complex type element ?
_________________
Cheers
Back to top
View user's profile Send private message Visit poster's website
WMBDEV1
PostPosted: Wed Jul 29, 2009 11:42 pm    Post subject: Reply with quote

Sentinel

Joined: 05 Mar 2009
Posts: 888
Location: UK

siri2083 wrote:
In the MQinputnode properties i have set the options to immediate parse and "content and value" and my MQinput node is wired catch & failure terminals to a Trace node and then to an MQOutputNodes. even declared the backout queue.


and how about moving the parse out to an RCD node as I suggested?
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu Jul 30, 2009 12:23 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Have you tested your input message using a different schema validation tool? ( there are plenty of them on the web )

Your description of the message definition is not clear. I suggest that you
- cut down the schema until only the problem element is left
- post the schema and an example input message
Back to top
View user's profile Send private message
siri2083
PostPosted: Thu Jul 30, 2009 4:25 am    Post subject: Reply with quote

Apprentice

Joined: 16 Apr 2009
Posts: 39

Hi Kimbert/AkankshA/WMBDEV1,

I am pasting the schama, sample xml message for your reference.

schema:

<xsd:schema version="0.1" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:complexType name="EstablishType">
<xsd:sequence>
<xsd:element name="Header" type="xsd:string" />
<xsd:element minOccurs="0" maxOccurs="unbounded" name="Summary" type="SummaryType" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="SummaryType">
<xsd:sequence>
<xsd:element minOccurs="0" name="frequency" type="xsd:string" />
<xsd:choice>
<xsd:element minOccurs="0" name="BankAccount" type="xsd:string" />
<xsd:element minOccurs="0" name="ChargeCard" type="xsd:string" />
</xsd:choice>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="establish" type="EstablishType" />
</xsd:schema>

Input Xml message:

<establish xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="file:///C:/Documents%20and%20Settings/Administrator/Desktop/Establish.xsd">
<Header>string</Header>
<Summary>
<frequency>string</frequency>
<!-- BackAccount is oneof thechioce element. commented it to make this xml as invalid. -->
<!-- <BankAccount>string</BankAccount> -->
</Summary>
</establish>

when i validate above xml and xsd using xmlspy both are valid.

I have created the message set using above schema, broker creates a as 'choice' and its min occurence is '1'.
and when i place above test data in the input queue of my flow, broker gets stuck and in the user trace it shows exceptions saying :

BIP2087E: Broker WMBBRK was unable to process the internal configuration message.
The entire internal configuration message failed to be processed successfully.
The internal configuration message failed to be processed, use the messages following this message to determine the reasons for the failure.

BIP4041E: Execution group 'default' received an invalid configuration message. See the following messages for details of the error.The message broker received an invalid configuration message and has not updated its configuration. This can arise as a result of errors in the specification of either message flows or message sets which the configuration manager was unabl
e to detect.
It can also result from a message flow requiring a type of node that is not supported by the broker installation, from the broker having become out of step with the configuration database or from other applications sending extraneous messages to the broker's configuration queues (SYSTEM.BROKER.ADMIN.QUEUE & SYSTEM.BROKER.EXECUTIONGROUP.QUEUE).
Check the relevant message flow and message set definitions, check that all necessary user-defined extensions are installed, perform a complete redeploy of thebroker's configuration and ensure that no applications are writing to the broker
's configuration queues.

BIP2242E: Message flow 'M123456' could not be reconfigured because it remained busy for longer than the timeout period of '300000'A request to reconfigure the message flow 'M123456' was received but this couldnot be processed because it remained busy processing a message for longer than the timeout specified.This can be caused by the timeout being too short considering the complexity ofthe flow and the size of the messages being processed. In such cases the timeout should be increased. It can also be caused by message flows containing infinite loops. In such cases the SQL should be corrected.

BIP8036E: Negative response received.
This command sends an internal configuration message to the broker, the response received indicated that the internal configuration message was unsuccessful.Check that the WebSphere MQ transport is available. Check the system log for fur
ther information.
Back to top
View user's profile Send private message
siri2083
PostPosted: Wed Aug 05, 2009 4:42 am    Post subject: Reply with quote

Apprentice

Joined: 16 Apr 2009
Posts: 39

Hi All,

I am still facing same issue. but atleast i could able to find out where the problem occurces.

its the problem with min and max occureces of the element. in the above sample xsd, the choice element has not declared any min occurences.

<xsd:choice>
<xsd:element minOccurs="0" name="BankAccount" type="xsd:string" />
<xsd:element minOccurs="0" name="ChargeCard" type="xsd:string" />
</xsd:choice>


with respective to the above xsd, below 2 xml's are valid.

Correct.xml
<?xml version="1.0" encoding="utf-8"?>
<establish xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="file:///C:/Documents%20and%20Settings/Administrator/Desktop/Establish.xsd">
<Header>string</Header>
<Summary>
<frequency>string</frequency>
<BankAccount>string</BankAccount>
</Summary>
<Summary>
<frequency>string</frequency>
<BankAccount>string</BankAccount>
</Summary>
</establish>

Wrong.xml
<?xml version="1.0" encoding="utf-8"?>
<establish xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="file:///C:/Documents%20and%20Settings/Administrator/Desktop/Establish.xsd">
<Header>string</Header>
<Summary>
<frequency>string</frequency>
<!-- <BankAccount>string</BankAccount> -->
</Summary>
<Summary>
<frequency>string</frequency>
<!-- <BankAccount>string</BankAccount> -->
</Summary>
</establish>

but when i create a mesage set,in the message definition, it creates an local group called 'choice' with Min occurence as '1' and max occurence as '1'. which causes all this problem( It makes the choice group as manditory by seting min occurence to '1' ).

if i change the min occurence of choice group to '0' from '1', above both xmls are parsing fine.

But my confusion is that,why broker is not throwing validation exception here. it just goes to infinate loop and gets stuck. and it is providing min&max occurences as '1' when is not defined in schema.
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu Aug 06, 2009 12:34 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Please make it easy for the people who are helping you - put [code] tags around your XML snippets so that the indentation is preserved.

Your description of the problem is not very clear.
- I cannot work out whether it is MRM or XMLNSC that is looping.
- You say 'both xmls are valid' but you have labelled the second one as 'wrong XML'! What is 'wrong' about it? What do you mean by 'valid'?

Quote:
when i create a mesage set,in the message definition, it creates an local group called 'choice' with Min occurence as '1' and max occurence as '1'. which causes all this problem( It makes the choice group as manditory by seting min occurence to '1' ).
That change is harmless. In a choice group, all members implicitly have minOccurs="0", whether or not you make it explicit. The importer is simply making the imported schema say what it means.

If you can prove that the broker is looping then you should raise a PMR.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Message Validation
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.