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 » Trimming and justification settings are available using MRM

Post new topic  Reply to topic
 Trimming and justification settings are available using MRM « View previous topic :: View next topic » 
Author Message
doll
PostPosted: Fri Dec 24, 2010 4:53 am    Post subject: Trimming and justification settings are available using MRM Reply with quote

Novice

Joined: 04 Dec 2010
Posts: 19

Hi,
I'm using wmb version 7.
I need to validate and trim the incoming xml message using message set.
I gave whitespace as collapse.
But i get an warning message as:
MRM domain: Simple Type Definition 'string-' contains a whiteSpace facet, which is not supported and will be ignored by the broker. Trimming and justification settings are available using MRM physical format properties.

Is there any way to trim the incoming xml message using message set ?


Thanks in advance
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri Dec 24, 2010 5:07 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

The XMLNSC parser supports the full range of options available in XML Schema. So you just need to set the necessary XML Schema restrictions.
Back to top
View user's profile Send private message
doll
PostPosted: Fri Dec 24, 2010 9:10 am    Post subject: Trimming and justification settings are available using MRM Reply with quote

Novice

Joined: 04 Dec 2010
Posts: 19

Hi,

Thanks for the reply

I tried with the XMLNSC parser and gave the whitespace option collapse
but still i get the output xml without space trimmed

Thanks in advance!
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri Dec 24, 2010 9:11 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

that only handles whitespace *between* elements. If you wish to apply length restrictions to the contents of fields, you must apply restrictions therefore.
Back to top
View user's profile Send private message
doll
PostPosted: Sat Dec 25, 2010 10:51 pm    Post subject: Trimming and justification settings are available using MRM Reply with quote

Novice

Joined: 04 Dec 2010
Posts: 19

Thanks for the reply

I have applied length restrictions to the contents of fields such as string minlength as 3 and maxlength as 9.
But i need the content to be without leading and trailing spaces even if the maxlength of the content is 9.

eg: "BIC0123 "

I need the output to be "BIC0123" after i validate the ouput with the message set.

Back to top
View user's profile Send private message
smdavies99
PostPosted: Sun Dec 26, 2010 12:44 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.

Have you experimented with the Padding Characters (=NULL)?
_________________
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
doll
PostPosted: Sun Dec 26, 2010 1:41 am    Post subject: Trimming and justification settings are available using MRM Reply with quote

Novice

Joined: 04 Dec 2010
Posts: 19

Thanks for the reply

As for as i know,Padding Characters (=NULL) is available in CWF OR TDS wire format but i'm working on XML message that can have either MRM or XMLNSC parser in the message set to validate.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Sun Dec 26, 2010 7:19 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Okay, so I think I was misreading your initial statement.

You set WhiteSpace which is a logical property on a String. I thought you had set the options that control whether XMLNSC will retain the spaces between elements or not.

As you saw from the error, this logical property of string elements does not apply to the MRM parser, it only applies to XMLNSC. You should only be using MRM parser for NON-XML data anyway.

So don't use MRM and don't use an XML Physical layer in MRM. Just use XMLNSC and make sure the input node is set to validate Content and Value and to Build Tree using XML Schema Data Types.
Back to top
View user's profile Send private message
doll
PostPosted: Mon Dec 27, 2010 1:51 am    Post subject: Trimming and justification settings are available using MRM Reply with quote

Novice

Joined: 04 Dec 2010
Posts: 19

Thanks for the reply

As you said,"Build Tree using XML Schema Data Types" is the cause of this error.
But i need to include this thru esql as i'm validating output message.
I'm searching for that




Thanks for your help
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon Dec 27, 2010 2:56 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

I'm not sure that the XMLNSC parser will automatically truncate fields on output.

But since you're already executing a SET statement to construct the field, you can easily use an ESQL function to trim leading and trailing whitespace.
Back to top
View user's profile Send private message
doll
PostPosted: Mon Dec 27, 2010 3:19 am    Post subject: Trimming and justification settings are available using MRM Reply with quote

Novice

Joined: 04 Dec 2010
Posts: 19

thanks for your reply

As of now i have used trim function to trim the output message tree upto two level.

Disadvantages are:
1. One field can have space
2. They may include additional fields in future

If the change can be done by using a simple option that depends on message set properties,that will be easier to maintain.

Just dont want to change the code many times
Back to top
View user's profile Send private message
kimbert
PostPosted: Mon Dec 27, 2010 5:00 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

XMLNSC does not trim fields on output when the whitespace facet is specified. This is a known limitation.
Glad you found a workaround.
Back to top
View user's profile Send private message
doll
PostPosted: Mon Dec 27, 2010 9:21 am    Post subject: Trimming and justification settings are available using MRM Reply with quote

Novice

Joined: 04 Dec 2010
Posts: 19

Thanks for your reply

Sorry,i'm little late to know this limitation.

Special thanks mqjeff, for your patience to explain the cause of this error

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 » Trimming and justification settings are available using MRM
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.