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 » [solved]:Validating xml in filter node

Post new topic  Reply to topic
 [solved]:Validating xml in filter node « View previous topic :: View next topic » 
Author Message
bshankar
PostPosted: Tue Jul 22, 2008 11:14 pm    Post subject: [solved]:Validating xml in filter node Reply with quote

Novice

Joined: 14 Jul 2008
Posts: 16

Hai friends,
I am using filter node to validate my xml.. i am wring the validation conditions.
In one of the conditions i have to check whether the xml element is integer or not. can any body tell me how to check this condition in ESQL.
I appreciate if you tell me how to check the date forat whether the xml element containing the yyyy-mm-dd format value.

Thanks in advance


Last edited by bshankar on Mon Sep 01, 2008 10:57 pm; edited 1 time in total
Back to top
View user's profile Send private message
kimbert
PostPosted: Wed Jul 23, 2008 12:33 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Any reason why you are not using the validation facilities that are available in the MRM domain?
Back to top
View user's profile Send private message
bshankar
PostPosted: Wed Jul 23, 2008 1:11 am    Post subject: Reply with quote

Novice

Joined: 14 Jul 2008
Posts: 16

I have to perform more validations on the element values

i thought it is the easiest way. instead of creating another message set project and using message defintion files i am using filter node to validate.
Back to top
View user's profile Send private message
kimbert
PostPosted: Wed Jul 23, 2008 1:22 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

So you want to write ESQL to do something which the MRM parser can do automatically...
I know the MRM parser can be difficult to set up ( that's why I monitor this forum ) but I am not convinced that you are taking the easiest road. Maybe you have some validation requirements that the MRM parser cannot handle?
Back to top
View user's profile Send private message
bshankar
PostPosted: Wed Jul 23, 2008 1:33 am    Post subject: Reply with quote

Novice

Joined: 14 Jul 2008
Posts: 16

YES, i have to do some validations at the element value level, and i'm new to the message broker. i have somany confusions in using message set and mrm domains. thats the reason why i have choosen this way.

I am validating the values using esql..

my main problem is i need to check the one value whether it is integer or not.

and few more like checking date format(yyyy-mm-dd) and time stamp.(yyyy-mm-dd hh:mm:ss)

if you know these things please tell me.
Back to top
View user's profile Send private message
kimbert
PostPosted: Wed Jul 23, 2008 3:35 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Hi bshankar,

Q1 : Which version of WMB are you using?
Q2 : Which XML domain are you using?
Q3 : Do you have an XML Schema available for your input XML?

Quote:
i have somany confusions in using message set and mrm domains. thats the reason why i have choosen this way.

I am validating the values using esql..
Message sets are a core feature of message broker. They allow you so separate the definition of the message from the processing of the message. If you ignore and avoid message sets you will simply create a problem for the person who maintains your message flows.
Back to top
View user's profile Send private message
bshankar
PostPosted: Wed Jul 23, 2008 4:24 am    Post subject: Reply with quote

Novice

Joined: 14 Jul 2008
Posts: 16

Hi Padawan

1. i am using wmb6.1
2. i am using xmlnsc domain
3. I am checking wether the input xml is well formed or not in input node itself
4. and i'm using filter node for validating the element values of the xml
5. I have xml schema also. but i'm not using it.

if possible please give me your contact details.
Back to top
View user's profile Send private message
kimbert
PostPosted: Wed Jul 23, 2008 4:47 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Thanks for the details. Please read this:
http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r1m0/topic/com.ibm.etools.mft.doc/ad67020_.htm
...and make sure you read the topic about validation.

It would be very strange to do the validation in a Filter node when
a) you have the XML Schema
b) you can import the XML Schema to create your message definition file
c) XMLNSC supports validation

Quote:
if possible please give me your contact details.
Sorry - I don't give out my email address online. I'm an IBM developer, and I work on the message broker parsers. You can contact me on this forum whenever you like.
Back to top
View user's profile Send private message
bshankar
PostPosted: Wed Jul 23, 2008 4:54 am    Post subject: Reply with quote

Novice

Joined: 14 Jul 2008
Posts: 16

i tried out validating xml using message set with the domain mrm. but it is not validating properly it is sending the message to failure node eventhough i'm sending the valid xml.

i fed up with that method. so i started writing esql.
Back to top
View user's profile Send private message
kimbert
PostPosted: Wed Jul 23, 2008 5:55 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
it is sending the message to failure node eventhough i'm sending the valid xml.
The MRM domain does not support 100% of XML Schema. That is why v6.1 offers XML validation in the XMLNSC domain. Please switch to XMLNSC and try again.
If you hit a problem, just post the error message here.
Back to top
View user's profile Send private message
bshankar
PostPosted: Wed Jul 23, 2008 8:06 am    Post subject: Reply with quote

Novice

Joined: 14 Jul 2008
Posts: 16

hi kimbart
Thanks for your advice.. I'l follow the same. and I'll let you know if get any problem in validating the xml.
Back to top
View user's profile Send private message
bshankar
PostPosted: Thu Jul 24, 2008 9:46 pm    Post subject: Reply with quote

Novice

Joined: 14 Jul 2008
Posts: 16

Kimbeart,
It is working fine with xmlnsc domain. but the thing is, it is not validating some validations like i have provided restriction tag in the xsd. in that i have metioned some values.It has to accept those values only. but it is accepting anything as a value..
I hope u understand my doubt.

thanks
Bhargav
Back to top
View user's profile Send private message
kimbert
PostPosted: Fri Jul 25, 2008 12:47 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
it is not validating some validations like i have provided restriction tag in the xsd. in that i have metioned some values.It has to accept those values only. but it is accepting anything as a value..
Let me see whether I have understood that correctly.
- Your XSD contains a simple type with some enumeration facets.
- Your XSD contains an element or attribute based on that simple type.
- In your input XML, the element/attribute has a value which does not match one of the enumerations but you are not getting a validation exception
- You are getting validation errors for other types of bad input

Please post the XML Schema and the input XML.
- Use [code] tags to preserve the indentation and make it readable
- Cut it down if necessary.
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 » [solved]:Validating xml in filter node
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.