|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
WMD message structure development - type extension in wsdl |
« View previous topic :: View next topic » |
Author |
Message
|
szfamman |
Posted: Mon Jul 07, 2014 1:17 am Post subject: WMD message structure development - type extension in wsdl |
|
|
Newbie
Joined: 07 Jul 2014 Posts: 9
|
Hi guys,
I’m migrating an old esb (which uses XSLT for transformations) to broker(i’m using ESQL for transformations) and i encountered an interesting problem.
I have a wsdl, which contains a hierarchically extended complex type (sorry guys, i’m not allowed copy the wsdl , so i’ll just show you a same stucture).
Let there be 4 types: A, B, C, D. We can say, that D is extending C, C is extending B, and B is extending A.
A contains these fields (i used bold style to mark the most important fields):
B contains these fields:
(and all the extended ones)
C contains these fields:
(and all the extended ones)
D contains these fields:
(and all the extended ones)
Now, i need to make a message structure.
The corresponding XSLT snippet is this:
Code: |
<myverygoodelement xsi:type="tns:B">
<base xsi:type="ar:D">
<aa>base type’s field</aa>
<da>extension type’s field</da>
</base>
</arrangement> |
How can i manage to do this? I tried a lot of variation for CREATE LASTCHILD OF. Do i only have to set the namespace correcty? Or do i need something else as well?
If you guys need more info, just say it, and i’ll make more specific sample wsdl snippets (though i really don’t want to give out the wsdl for the public).
Thanks,
Thomas |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Jul 07, 2014 4:32 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Hi Thomas,
You really need to determine if your message/complex type is of type A, B, C, or D. You can then extend it by adding more elements either simple or complex type...
Ideally you would have a new type like this:
Code: |
New Type name
element1 type D
element2 string
element3 date
element4 type DBUpdateInfo
element5 boolean
end New Type
|
If you then look at the message tree in the toolkit, you will see all the levels that you will have to create / populate.
Hope this helps
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
kimbert |
Posted: Mon Jul 07, 2014 12:49 pm Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
How can i manage to do this? I tried a lot of variation for CREATE LASTCHILD OF. |
Well, that tells us that you tried, but failed. But we are left wondering exactly how you failed. Without that info, we are reduced to offering sympathy and/or generic advice. I'll try the latter...
I assume that you have imported your WSDL, so the ESQL editor should give you 'content assist' when you start typing a path and then press ctrl+space.
The advice about using the debugger is sound advice - but remember that the debugger does not display namespaces. If you need to check the exact contents of the message tree then you should add one or more Trace nodes to your flow and set their Pattern property to ${Root}.
And finally, remember that a message tree is like ( though not exactly like ) a DOM tree. Every node in the tree must have its namespace set correctly. Namespaces are not inherited from the parent as happens in an XML document. More info about this in the IIB knowledge center. _________________ Before you criticize someone, walk a mile in their shoes. That way you're a mile away, and you have their shoes too. |
|
Back to top |
|
 |
szfamman |
Posted: Wed Jul 09, 2014 1:45 am Post subject: |
|
|
Newbie
Joined: 07 Jul 2014 Posts: 9
|
Hi guys,
Thank you for the responses.
The main problem is that i don't know what should i expect (and i don't have any example messages...).
Yes i imported the WSDL, and i tried to use content assist, but i think the xsd's extension is f***ing things up.
(if i use content assist, i can't see the extended fields)
I'll set up some trace nodes for sure
Code: |
<myverygoodelement xsi:type="tns:B">
<base xsi:type="ar:D">
<aa>base type’s field</aa>
<da>extension type’s field</da>
</base>
</arrangement> |
When i try to write this in esql, should i just set the namespace for "myveryimportantfield" to the namespace of type B?
If i make a base type (A) for the message, the content assist shows me it's field only (so it show "aa"). But if i make the most extended type (D) i can set the field "da", but i can't see "aa". But it should be there because D extending A in a way and thus it should contain all of A's fields (so "aa" as well). Or am i wrong?
Regards,
Thomas |
|
Back to top |
|
 |
kimbert |
Posted: Wed Jul 09, 2014 3:50 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
The main problem is that i don't know what should i expect (and i don't have any example messages...). |
OK - so the solution to that problem is here:
http://www.w3.org/TR/xmlschema-0/
...with full details in the 'normative' specifications:
http://www.w3.org/TR/xmlschema-1/
http://www.w3.org/TR/xmlschema-2/
I suggest that you bookmark those specifications.
btw, your XML example contains several simple errors, and your question refers to a tag that does not exist in your XML. _________________ Before you criticize someone, walk a mile in their shoes. That way you're a mile away, and you have their shoes too. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|