Author |
Message
|
Duke |
Posted: Mon Jan 17, 2005 11:17 pm Post subject: Wildcard in Mapping |
|
|
 Apprentice
Joined: 09 Mar 2004 Posts: 49 Location: Belgium
|
Hello,
I would like to use the wildcard in the mapping editor.
I have an input message that has to be embedded inside an envelloppe:
Example:
incoming:
<Order><Data>any data</Data></Order>
Enveloppe:
<Msg><Origin></Origin><Dta>"wildcard"</Dta></Msg>
Output:
<Msg><Origin></Origin><Dta><Order><Data>any data</Data></Order></Dta></Msg>
Does any one knows how i can do this in the mapping editor? Because the editor doesn't allow me to drag and drop the incoming message onto the wildcard....
Thanks for help ! _________________ Pierre Richelle
Engineer
IBM Certified MQSeries Developper V5.3
IBM Certified WMQ Administration V6 |
|
Back to top |
|
 |
alexey |
Posted: Wed Jan 19, 2005 1:11 am Post subject: |
|
|
 Acolyte
Joined: 18 Dec 2003 Posts: 62 Location: Israel
|
Hi!
Try to do one of the two following alternatives:
1. Define your wildcard element as global element of compex type based on "xsd:anyURI" derived by extension. You will see an "xsd:anyURI +" in your MXSD file. Define a message from your element. Try to map.
2. Define your wildcard element as global element of complex type with "message" composition. Define a message from your element. Try to map.
In both cases REMOVE the "sorce IS NOT NULL" automatic condition in the mapping that will be created, it makes things not to work.
Good luck.
Alexey. |
|
Back to top |
|
 |
Duke |
Posted: Wed Jan 19, 2005 10:38 pm Post subject: |
|
|
 Apprentice
Joined: 09 Mar 2004 Posts: 49 Location: Belgium
|
The first solution doesn't work... perhap's I have made something wrong.
I have add a message Test. Then I specify that it is a new complex type based on xsd:anyURI derived by extension. I can then see the xsd:anyURI+...
Then I add to the Msg (my example) this new message Test.
prefix1:Msg
|-prefix1:Origin
|-prefix1:Test (anyURI+)
The other message is
prefix2:Order
|-prefix2:Data
In the mapping I have in the incoming message the Order (my example) and in the output Msg.
Then I drag and drop the Order onto the Test.
Then the toolkit ask me to create a new mapping... _________________ Pierre Richelle
Engineer
IBM Certified MQSeries Developper V5.3
IBM Certified WMQ Administration V6 |
|
Back to top |
|
 |
alexey |
Posted: Thu Jan 20, 2005 5:42 am Post subject: |
|
|
 Acolyte
Joined: 18 Dec 2003 Posts: 62 Location: Israel
|
Hi!
Quote: |
Then the toolkit ask me to create a new mapping... |
Yes, the toolkit does the correct thing - you did not mention that you have namespaces: only the same types could be mapped without creating sub-mappings, and the namespace "kill" the message->message mapping.
Do not hasitate - create a new mapping and than drag&drop root input message to the root output message - it will work fine, even with namesapces, probably....
Alexey. |
|
Back to top |
|
 |
Duke |
Posted: Thu Jan 20, 2005 10:07 pm Post subject: |
|
|
 Apprentice
Joined: 09 Mar 2004 Posts: 49 Location: Belgium
|
Alexey,
Thank you very much for your help !
It works indeed ! _________________ Pierre Richelle
Engineer
IBM Certified MQSeries Developper V5.3
IBM Certified WMQ Administration V6 |
|
Back to top |
|
 |
|