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 » XML element padding - how to?

Post new topic  Reply to topic
 XML element padding - how to? « View previous topic :: View next topic » 
Author Message
HOMETOWN47
PostPosted: Thu Apr 16, 2009 2:30 am    Post subject: XML element padding - how to? Reply with quote

Apprentice

Joined: 25 Mar 2003
Posts: 34

I've got a message set that has been created via the WSDL/XSD import wizard. This has by default set the Default message domain as SOAP and the supported message domains are SOAP and XMLNSC.

Within the message defn I have an element called productId that is defined as type xsd:string.

The logical properties are:

Simple type : xsd:string
Value Constraints: Length - blank, Min -1, Max -18, all other properties default.


How do I set the element so that the field is padded (with '0' character) to the max field length of 18. For example, the Web service call send in the XML element as '123' and I want to send an output message as '000000000000000123' from the message flow. I know that I can do the padding in a compute node the message flow but I'm assuming this can be done in the message set definition....

I've done searches on MQSeries.net to no avail and also trawled the toolkit help.
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu Apr 16, 2009 12:04 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

XMLNSC uses the facilities of XML schema. XML schema does not provide any such padding facility.
XMLNSC does not use the information in the message set. It only uses the XML schemas which are generated from the mxsd files, and which are deployed in the xsdzip file. So fiddling with message set properties would be a waste of time.

I suggest that you use a Compute node.
...or speak to the team which maintains the downstream application and persuade them not to be so picky about the format of their input XML
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Apr 16, 2009 12:08 pm    Post subject: Re: XML element padding - how to? Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

HOMETOWN47 wrote:
How do I set the element so that the field is padded (with '0' character) to the max field length of 18


Why? That's not what the schema defines. If it did, the min length would be 18 (and that's not even starting with this padding with zeros).
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
HOMETOWN47
PostPosted: Fri Apr 17, 2009 2:11 am    Post subject: Reply with quote

Apprentice

Joined: 25 Mar 2003
Posts: 34

Vitor, schema should be min=18 and max=18 but SAP adapter incorrectly setit as min=1, max=18.

Agree with Kimbert and will do the padding in the ESQL. Is there a simple way of doing this ?
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri Apr 17, 2009 2:22 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

HOMETOWN47 wrote:
Vitor, schema should be min=18 and max=18 but SAP adapter incorrectly setit as min=1, max=18.

Agree with Kimbert and will do the padding in the ESQL. Is there a simple way of doing this ?


Yes. There's a simple ESQL function.
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 » XML element padding - how to?
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.