BizTalk Server General - BizTalk Mapping not working!

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server General > June 2006 > BizTalk Mapping not working!





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author BizTalk Mapping not working!
Sudhir Darbha

2006-06-08, 7:18 pm

Alright, I am done breaking my head now! I have an extremely simple
orchestration that does the following:-
1. Receives an XML file (FILE port)
2. Transforms to an output schema
3. Write the output file to disk (FILE port)

The output XML file does not contain any data in it, all it contains is a
skeleton of the schema as follows :-->
<?xml version="1.0" encoding="utf-8"?><ns0:OrderOutput
xmlns:ns0="http://BTPlayGround.OrdersOutputFile"></ns0:OrderOutput>

I don't see any event logs, checked my mapping more than once, but couldn't
find any issue with it. FYI i'm posting my input and output schemas here :-


INPUT:
=====

<?xml version="1.0" encoding="utf-16" ?>
<xs:schema xmlns="http://BTPlayGround.OrdersInput"
xmlns:b="http://schemas.microsoft.com/BizTalk/2003"
targetNamespace="http://BTPlayGround.OrdersInput"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="CustomerPurchase">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="1" name="Orders">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" name="Order">
<xs:complexType>
<xs:sequence>
<xs:element name="ID" type="xs:int" />
<xs:element name="Price" type="xs:decimal" />
<xs:element name="Prod_Type" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element maxOccurs="1" name="Accessories">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" name="Accessory">
<xs:complexType>
<xs:sequence>
<xs:element name="Order_Id" type="xs:int" />
<xs:element name="Accessory_Name" type="xs:string" />
<xs:element name="Price" type="xs:decimal" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>

OUTPUT:
======
<?xml version="1.0" encoding="utf-16" ?>
<xs:schema xmlns="http://BTPlayGround.OrdersRelational"
xmlns:b="http://schemas.microsoft.com/BizTalk/2003"
targetNamespace="http://BTPlayGround.OrdersRelational"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="InOrdersData">
<xs:complexType>
<xs:sequence>
<xs:element name="sync">
<xs:complexType>
<xs:sequence>
<xs:element name="after">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" name="Orders">
<xs:complexType>
<xs:sequence>
<xs:element name="OrderId" type="xs:string" />
<xs:element name="AccessoryCount" type="xs:string" />
<xs:element name="TotalPrice" type="xs:string" />
<xs:element name="ProductType" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element maxOccurs="unbounded" name="OrderAccesories">
<xs:complexType>
<xs:sequence>
<xs:element name="OrderId" type="xs:string" />
<xs:element name="AccessoryIndex" type="xs:string" />
<xs:element name="Description" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="OutOrdersData">
<xs:complexType>
<xs:sequence>
<xs:element name="Success" type="xs:anyType" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>

Just thought an extra eye on my schema would be helpful.
Any help is highly appreciated,
Thanks,
Sudhir.
Randal van Splunteren

2006-06-09, 7:18 am

Hi Sudhir,

When I compare the namespace of your blank skeleton output message with the
output schema's namespace they don't match.
Looks like your map is creating the wrong message. Try to replace the right
hand schema with your output xsd.

HTH,

Randal van Splunteren
http://biztalkia.blogspot.com

> Alright, I am done breaking my head now! I have an extremely simple
> orchestration that does the following:-
> 1. Receives an XML file (FILE port)
> 2. Transforms to an output schema
> 3. Write the output file to disk (FILE port)
> The output XML file does not contain any data in it, all it contains
> is a
> skeleton of the schema as follows :-->
> <?xml version="1.0" encoding="utf-8"?><ns0:OrderOutput
> xmlns:ns0="http://BTPlayGround.OrdersOutputFile"></ns0:OrderOutput>
> I don't see any event logs, checked my mapping more than once, but
> couldn't find any issue with it. FYI i'm posting my input and output
> schemas here :-
>
> INPUT:
> =====
> <?xml version="1.0" encoding="utf-16" ?>
> <xs:schema xmlns="http://BTPlayGround.OrdersInput"
> xmlns:b="http://schemas.microsoft.com/BizTalk/2003"
> targetNamespace="http://BTPlayGround.OrdersInput"
> xmlns:xs="http://www.w3.org/2001/XMLSchema">
> <xs:element name="CustomerPurchase">
> <xs:complexType>
> <xs:sequence>
> <xs:element maxOccurs="1" name="Orders">
> <xs:complexType>
> <xs:sequence>
> <xs:element maxOccurs="unbounded" name="Order">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="ID" type="xs:int" />
> <xs:element name="Price" type="xs:decimal" />
> <xs:element name="Prod_Type" type="xs:string" />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:element maxOccurs="1" name="Accessories">
> <xs:complexType>
> <xs:sequence>
> <xs:element maxOccurs="unbounded" name="Accessory">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="Order_Id" type="xs:int" />
> <xs:element name="Accessory_Name" type="xs:string" />
> <xs:element name="Price" type="xs:decimal" />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> </xs:schema>
> OUTPUT:
> ======
> <?xml version="1.0" encoding="utf-16" ?>
> <xs:schema xmlns="http://BTPlayGround.OrdersRelational"
> xmlns:b="http://schemas.microsoft.com/BizTalk/2003"
> targetNamespace="http://BTPlayGround.OrdersRelational"
> xmlns:xs="http://www.w3.org/2001/XMLSchema">
> <xs:element name="InOrdersData">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="sync">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="after">
> <xs:complexType>
> <xs:sequence>
> <xs:element maxOccurs="unbounded" name="Orders">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="OrderId" type="xs:string" />
> <xs:element name="AccessoryCount" type="xs:string" />
> <xs:element name="TotalPrice" type="xs:string" />
> <xs:element name="ProductType" type="xs:string" />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:element maxOccurs="unbounded" name="OrderAccesories">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="OrderId" type="xs:string" />
> <xs:element name="AccessoryIndex" type="xs:string" />
> <xs:element name="Description" type="xs:string" />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:element name="OutOrdersData">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="Success" type="xs:anyType" />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> </xs:schema>
> Just thought an extra eye on my schema would be helpful.
> Any help is highly appreciated,
> Thanks,
> Sudhir.



Sudhir Darbha

2006-06-09, 1:18 pm

Randal,
Thanks for the reply. My bad, I posted the wrong schema. But I did check
the destination schema in mapper and the one in the output file and they both
look the same. But I still have no clue as to why this is returning an empty
message without any errors. Would posting my mappings file here of any help.
Also, here's my actual destination schema:
<?xml version="1.0" encoding="utf-16" ?>
<xs:schema xmlns="http://BTPlayGround.OrdersOutputFile"
xmlns:b="http://schemas.microsoft.com/BizTalk/2003"
targetNamespace="http://BTPlayGround.OrdersOutputFile"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="OrderOutput">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" name="Orders">
<xs:complexType>
<xs:attribute name="OrderId" type="xs:string" />
<xs:attribute name="AccessoryCount" type="xs:string" />
<xs:attribute name="TotalPrice" type="xs:string" />
<xs:attribute name="ProductType" type="xs:string" />
</xs:complexType>
</xs:element>
<xs:element maxOccurs="unbounded" name="OrderAccessories">
<xs:complexType>
<xs:sequence />
<xs:attribute name="OrderId" type="xs:string" />
<xs:attribute name="AccessoryIndex" type="xs:string" />
<xs:attribute name="Description" type="xs:string" />
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>

Thank you,
Sudhir.

"Randal van Splunteren" wrote:

> Hi Sudhir,
>
> When I compare the namespace of your blank skeleton output message with the
> output schema's namespace they don't match.
> Looks like your map is creating the wrong message. Try to replace the right
> hand schema with your output xsd.
>
> HTH,
>
> Randal van Splunteren
> http://biztalkia.blogspot.com
>
>
>
>

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com