Integrating Integrators – BizTalk, Windows Azure, Windows Workflow, and Beyond
Join
Sign in
Search Options
Search Everything
Search BizTalk 2004
Home
AppFabric
BizTalk Server
Windows Azure
Windows Workflow
Jobs (Hire A Guru)
More ...
Home
»
BizTalk Server
»
BizTalk 2004
»
BizTalk 2004 Forum
»
Mapping to an Abstract Type Node
Mapping to an Abstract Type Node
BizTalk 2004
This group is for all content related to BizTalk Server 2004. This includes a forum, samples, videos, labs, whitepapers, and tools. Most of the content here also applies to other versions of BizTalk beyond 2004.
Get this RSS feed
Home
Forum
Files
Sitewide Application Navigation
Home
Blogs
Media
Forums
Wikis
Groups
Details
10
Replies
0
Subscribers
Posted
over 7 years ago
Options
Subscribe via RSS
Share this
BizTalk 2004 Forum
Mapping to an Abstract Type Node
rated by 0 users
This post has
10 Replies |
0
Followers
Posted by
Anonymous
on
Mon, Jun 5 2006 2:53 AM
Mapping to an Abstract Type Node
Hi,
I have this situation wherein supposedly Node \"Detail\" is an abstract type. Then we have \"General Detail\" and \"Specific Detail\" as Node \"Detail\" 's subclass.
Here is more or less the picture of the map
Source---------------------------------->Destination
-------------------------------------------- [Detail] (*Abstract)
----------------------------------------------- [GeneralDetail]
[A]-------------Mapped To----------------------->@[type]
----------------------------------------------- [SpecificDetail]
------------------------------------------------------@[type]
The output would be like this:
(1)
<Detail xsi:type=\"GeneralDetail\" type=\"A\">
instead of
(2)
<GeneralDetail type=\"A\">
Is this okay? I want it to output the (2), not (1).
Is there an alternative way on the mapping to achieve (2) instead?
If there is something that is not clear, please let me know.
Thanks,
Fred
Edit tags
Edit
Reply
Posted by
greg.forsythe
on
Tue, Jun 6 2006 10:56 PM
Mapping to an Abstract Type Node
Can you show us you schema or at least the definition of the Detail element and associated element/types
Are you using abstract types or elements
Do you have control over the output schema or ar you interfacing using an existing schema.
Reply
Posted by
Anonymous
on
Thu, Jun 8 2006 3:01 AM
Mapping to an Abstract Type Node
Hi,
I encountered this error
\"A request-response for the \"Submit\" adapter at receive location \"Submit://OT\" has timed out before a response could be delivered\"
Does anyone knows why this happens?
Thanks...
Edit tags
Edit
Reply
Posted by
Anonymous
on
Thu, Jun 8 2006 3:13 AM
Mapping to an Abstract Type Node
Oops,
Sorry Fred, I thought I've created a new topic. I'm really sorry, I was reading your topic when I have encountered that error so when I tried to post it. I accidentally post it in your question.
I'm really sorry...
Anyways, I've re-create a new topic from my question. Sorry about that...
Thanks
Edit tags
Edit
Reply
Posted by
Anonymous
on
Thu, Jun 8 2006 3:19 AM
Mapping to an Abstract Type Node
Hi Greg,
Well... The schema was created by someone else so I can't change it nor can I show it.
The Detail in my example is the abstract type and General Detail and Specific Detail are subclass of the abstract type Detail. I think this is the simpliest way I could explain it but I'll try to ask permission.
Let me just explain the appearance of the Diagram that I've created earlier so it will be much clearer...
Basically in the Biztalk Map,
The \"Detail\" node Appears as a record eventhought it was an abstract.
then if you expand the \"Detail\" node. 2 nodes with <General> and <Specific> will appear. Note that you can't directly map into them but if you mapped into their child or attributes, This \" <Detail xsi:type=\"GeneralDetail\" type=\"A\"> \" will appear.
*Note: As for insanekid, that's okay.
Thanks,
Fred
Edit tags
Edit
Reply
Posted by
greg.forsythe
on
Thu, Jun 8 2006 5:10 AM
Mapping to an Abstract Type Node
It sounds like the schema is using abstract types rather than abstract elements.
something like this:
[code:1:6375a16c7c]<element name=\"Detail\" type=\"Detail\">
<complexType name = \"Detail\" abstract=\"true\">
<attribute name=\"Type\" type=\"string\" />
</complexType>
<complexType name=\"GeneralDetail\">
<complexContent mixed=\"false\">
<extension base=\"DetailType\"/>
</complexContent>
</complexType>
<complexType name=\"SpecificDetail\">
<complexContent mixed=\"false\">
<extension base=\"DetailType\"/>
</complexContent>
</complexType>[/code:1:6375a16c7c]
If this is the case then the output <Detail xsi:type=\"GeneralDetail\" Type=\"A\"/> is the correct output.
There is no element called GeneralDetail, so this <GeneralDetail Type=\"A\"/> is not valid.
If you wish to to use different element names then the schema needs to have the an abstract element and use a substitutionGroup
Reply
Posted by
Anonymous
on
Thu, Jun 8 2006 6:14 AM
Mapping to an Abstract Type Node
Hi Greg,
Yes, that is correct
except that instead of
[code:1:b3c2866306]
<element name=\"Detail\" type=\"Detail\">
[/code:1:b3c2866306]
an abstract=\"True\" is added to make it
[code:1:b3c2866306]
<element name=\"Detail\" type=\"Detail\" abstract=\"true\">
[/code:1:b3c2866306]
so will the result be the same?
Thanks,
Fred
Edit tags
Edit
Reply
Posted by
greg.forsythe
on
Thu, Jun 8 2006 7:11 AM
Mapping to an Abstract Type Node
Do you also have
[code:1:297183077f]<element name=\"GeneralDetail\" type=\"string\" substitutionGroup=\"Detail\"/>
<element name=\"SpecificDetail\" type=\"string\" substitutionGroup=\"Detail\"/>[/code:1:297183077f]
or are GeneralDetail and SpecificDetail only declared as complexTypes?
Not sure what happens if the element and the type are marked as abstract. The Xml schema spec doesn't seem to mention this case
Reply
Posted by
Anonymous
on
Thu, Jun 8 2006 7:36 AM
Mapping to an Abstract Type Node
Hi Greg,
Thanks for the quick response...
Ah i see...
Nope...No substitution Group was declared. They are just declared as complex type.
Thanks,
Fred
Edit tags
Edit
Reply
Posted by
greg.forsythe
on
Thu, Jun 8 2006 8:02 AM
Mapping to an Abstract Type Node
If thats the case then the schema is a bit ambiguous.
[quote:e7343b6206]
From W3.org - XML Schema Part 0: Primer Second Edition
When an element or type is declared to be \"abstract\", it cannot be used in an instance document. When an element is declared to be abstract, a member of that element's substitution group must appear in the instance document. When an element's corresponding type definition is declared as abstract, all instances of that element must use xsi:type to indicate a derived type that is not abstract.
If both the element and its type are marked as abstract the you have a small problem. You can't use <GeneralDetail> or <SpecificDetail> because they are types not elements and you can't use <Detail> because it is marked as abstract.
Can you refer this back to the schema author.
I just did a quick check, it looks like Biztalk ignores the abstract attribute on the element if there is no substitutionGroup.
It creates a Detail node with the xsi:type set and this passes instance validation even though the Detail element is marked as abstract.
Reply
Posted by
Anonymous
on
Thu, Jun 8 2006 8:12 AM
Mapping to an Abstract Type Node
Hi Greg,
I see...
Thanks for helping me out....
Thank you for your quick reply.
Thanks,
Fred
Edit tags
Edit
Reply
Page 1 of 1 (11 items)