Blank Xml generated after transformation in BizTalk
-
יום רביעי 22 אוגוסט 2012 09:15
Hi All,
I have Xml as mentioned below
<?xml version="1.0" encoding="utf-16" ?> - <RequestSP_NonLimit xmlns="http://schemas.microsoft.com/BizTalk/2003"> - <NON_LIMIT_EXPENSE_MAIN> <BU>4000</BU> <VOUCHER_TYPE>KE</VOUCHER_TYPE> <NL_EXP_MAIN_CREATED_ON>2012-08-22T14:06:41.537</NL_EXP_MAIN_CREATED_ON> <APP_SERIAL_NO>GEN-270612-63908</APP_SERIAL_NO> <ECODE>E0439R</ECODE> - <Voucher> <COST_CENTRE>400400</COST_CENTRE> <GLCODE>600213</GLCODE> <NL_EXP_DETAILS>for new house</NL_EXP_DETAILS> <NL_EXP_AMOUNT>4750</NL_EXP_AMOUNT> <POSTING_KEY>40</POSTING_KEY> <Row>1</Row> <DEBIT_CREDIT>S</DEBIT_CREDIT> </Voucher> - <Voucher> <COST_CENTRE>400400</COST_CENTRE> <GLCODE>E0439R</GLCODE> <NL_EXP_DETAILS>Expense: 4750...........</NL_EXP_DETAILS> <NL_EXP_AMOUNT>4750</NL_EXP_AMOUNT> <POSTING_KEY>31</POSTING_KEY> <Row>2</Row> <DEBIT_CREDIT>H</DEBIT_CREDIT> <UMSKZ /> </Voucher> </NON_LIMIT_EXPENSE_MAIN> - <NON_LIMIT_EXPENSE_MAIN> <BU>3000</BU> <VOUCHER_TYPE>KE</VOUCHER_TYPE> <NL_EXP_MAIN_CREATED_ON>2012-08-22T14:06:41.537</NL_EXP_MAIN_CREATED_ON> <APP_SERIAL_NO>GEN-310712-19783</APP_SERIAL_NO> <ECODE>DS10160</ECODE> - <Voucher> <COST_CENTRE /> <GLCODE>542000</GLCODE> <NL_EXP_DETAILS>Cash paid to hans travels</NL_EXP_DETAILS> <NL_EXP_AMOUNT>320</NL_EXP_AMOUNT> <POSTING_KEY>40</POSTING_KEY> <Row>1</Row> <DEBIT_CREDIT>S</DEBIT_CREDIT> </Voucher> - <Voucher> <COST_CENTRE /> <GLCODE>DS10160</GLCODE> <NL_EXP_DETAILS>Expense: 320...........</NL_EXP_DETAILS> <NL_EXP_AMOUNT>320</NL_EXP_AMOUNT> <POSTING_KEY>31</POSTING_KEY> <Row>2</Row> <DEBIT_CREDIT>H</DEBIT_CREDIT> <UMSKZ /> </Voucher> </NON_LIMIT_EXPENSE_MAIN> </RequestSP_NonLimit>
And when i do transformation to a different xml i get blank xml.
In aboev xml there are two voucher xml with tag name <NON_LIMIT_EXPENSE_MAIN>
Please advise what would i have to do in transformation to get values in xml.
-- Kind Regards Sandeep
- נערך על-ידי Sandeep.Handa יום רביעי 22 אוגוסט 2012 11:20
כל התגובות
-
יום רביעי 22 אוגוסט 2012 10:08
I would suggest you to use call BizTalk map from visual studio in debugger mode.
Before that, you could double check if your inbound message is valid with its XSD schema.
Christophe BRANDO...If this answers your question, please Mark as the Answer. If this post is helpful, please vote as helpful.
-
יום רביעי 22 אוגוסט 2012 11:21
Hi ,
Yes inbound xml is valid with the schema. Actually the above xml is generated before transformation.
-- Kind Regards Sandeep
-
יום רביעי 22 אוגוסט 2012 12:06מנחה דיון
You can test your transformation (map) using visual studio and can check the reason why empty XML is getting generated. You can follow the steps mentioned in this article to do it.
The reason that I can guess from the above XML is that the transformation is not getting executed because in the source schema you have most probably set the value of property elementFormDefault to “unqualified” if yes then change it to “Qualified” and try again.
Please mark the post answered your question as answer, and mark other helpful posts as helpful, it'll help other users who are visiting your thread for the similar problem, Regards -Rohit Sharma (http://rohitt-sharma.blogspot.com/)
-
יום רביעי 22 אוגוסט 2012 14:40
What exactly are doing in your transformation?
Shiva Sadayan
-
יום רביעי 22 אוגוסט 2012 15:58
For me, it's usually a namespace issue. For example, we assign a namespace in our Receive Pipeline.
When I do a test map, and take a file from a trading partner, I have to manually add that namespace before doing the testmap.Neal Walters
-
יום שישי 24 אוגוסט 2012 06:38
Hi All,
I am only mapping fields from above xml to the destination xml ..its one to one mapping.
But before transformation the file is OK but when i do transformation the file is blank..
-- Kind Regards Sandeep
-
יום שישי 24 אוגוסט 2012 08:17מנחה דיון
Have you tried my suggestion of testing this map using Visual Studio?
Can you share the source schema for this map?
Please mark the post answered your question as answer, and mark other helpful posts as helpful, it'll help other users who are visiting your thread for the similar problem, Regards -Rohit Sharma (http://rohitt-sharma.blogspot.com/)
-
יום שישי 24 אוגוסט 2012 08:37
Hi Rohit,
Below is the source schema:
<?xml version="1.0" encoding="utf-16" ?> - <xs:schema xmlns:b="http://schemas.microsoft.com/BizTalk/2003" xmlns="http://VoucherParkingManual.NL" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://VoucherParkingManual.NL" version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema"> - <xs:annotation> - <xs:appinfo> <msbtssql:sqlScript value="exec [NonLimit_Voucher]" xmlns:msbtssql="http://schemas.microsoft.com/BizTalk/2003" /> </xs:appinfo> </xs:annotation> - <xs:element name="RequestSP_NonLimit"> - <xs:complexType> - <xs:sequence> <xs:element xmlns:q1="http://schemas.microsoft.com/BizTalk/2003" minOccurs="0" maxOccurs="unbounded" name="NON_LIMIT_EXPENSE_MAIN" type="NON_LIMIT_EXPENSE_MAINType" /> </xs:sequence> </xs:complexType> </xs:element> - <xs:complexType name="NON_LIMIT_EXPENSE_MAINType"> - <xs:choice minOccurs="0" maxOccurs="unbounded"> <xs:element xmlns:q2="http://schemas.microsoft.com/BizTalk/2003" maxOccurs="unbounded" name="Voucher" type="VoucherType" /> </xs:choice> <xs:attribute name="BU" type="xs:string" /> <xs:attribute name="VOUCHER_TYPE" type="xs:string" /> <xs:attribute name="NL_EXP_MAIN_CREATED_ON" type="xs:string" /> <xs:attribute name="APP_SERIAL_NO" type="xs:string" /> <xs:attribute name="ECODE" type="xs:string" /> </xs:complexType> - <xs:complexType name="VoucherType"> <xs:attribute name="COST_CENTRE" type="xs:string" /> <xs:attribute name="GLCODE" type="xs:string" /> <xs:attribute name="NL_EXP_DETAILS" type="xs:string" /> <xs:attribute name="NL_EXP_AMOUNT" type="xs:long" /> <xs:attribute name="POSTING_KEY" type="xs:int" /> <xs:attribute name="Row" type="xs:long" /> <xs:attribute name="DEBIT_CREDIT" type="xs:string" /> <xs:attribute name="ZUONR" type="xs:string" /> <xs:attribute name="UMSKZ" type="xs:string" /> </xs:complexType> </xs:schema>
And Destination Schema:
<?xml version="1.0" encoding="utf-16" ?> - <xs:schema xmlns:b="http://schemas.microsoft.com/BizTalk/2003" targetNamespace="http://schemas.microsoft.com/BizTalk/2003" version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema"> - <xs:simpleType name="RFCTYPE.RFCTYPE_TIME"> - <xs:restriction base="xs:string"> <xs:pattern value="(([0-1][0-9])|([2][0-3]))([0-5][0-9])([0-5][0-9])" /> </xs:restriction> </xs:simpleType> - <xs:simpleType name="RFCTYPE.RFCTYPE_DATE"> - <xs:restriction base="xs:string"> <xs:pattern value="[0][0][0][0][0][0][0][0]|^((\d{2}(([02468][048])|([13579][26]))?((((0?[13578])|(1[02]))?((0?[1-9])|([1-2][0-9])|(3[01])))|(((0?[469])|(11))?((0?[1-9])|([1-2][0-9])|(30)))|(0?2?((0?[1-9])|([1-2][0-9])))))|(\d{2}(([02468][1235679])|([13579][01345789]))?((((0?[13578])|(1[02]))?((0?[1-9])|([1-2][0-9])|(3[01])))|(((0?[469])|(11))?((0?[1-9])|([1-2][0-9])|(30)))|(0?2?((0?[1-9])|(1[0-9])|(2[0-8]))))))?$" /> </xs:restriction> </xs:simpleType> - <xs:element name="Z_BC_FI_PARK_DOCUMENT_Request"> - <xs:complexType> - <xs:sequence> - <xs:element minOccurs="1" maxOccurs="1" name="ZFILENAME"> - <xs:annotation> <xs:documentation /> <xs:appinfo /> </xs:annotation> - <xs:simpleType> - <xs:restriction base="xs:string"> <xs:maxLength value="70" /> </xs:restriction> </xs:simpleType> </xs:element> - <xs:element minOccurs="0" maxOccurs="unbounded" name="I_BKPF"> - <xs:annotation> <xs:documentation /> <xs:appinfo /> </xs:annotation> - <xs:complexType> - <xs:sequence minOccurs="0" maxOccurs="unbounded"> - <xs:element minOccurs="0" name="BUKRS"> - <xs:simpleType> - <xs:restriction base="xs:string"> <xs:maxLength value="4" /> </xs:restriction> </xs:simpleType> </xs:element> - <xs:element minOccurs="0" name="BLART"> - <xs:simpleType> - <xs:restriction base="xs:string"> <xs:maxLength value="2" /> </xs:restriction> </xs:simpleType> </xs:element> <xs:element minOccurs="0" name="BUDAT" type="b:RFCTYPE.RFCTYPE_DATE" /> - <xs:element minOccurs="0" name="XBLNR"> - <xs:simpleType> - <xs:restriction base="xs:string"> <xs:maxLength value="16" /> </xs:restriction> </xs:simpleType> </xs:element> - <xs:element minOccurs="0" name="BKTXT"> - <xs:simpleType> - <xs:restriction base="xs:string"> <xs:maxLength value="25" /> </xs:restriction> </xs:simpleType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> - <xs:element minOccurs="0" maxOccurs="unbounded" name="I_BSEG"> - <xs:annotation> <xs:documentation /> <xs:appinfo /> </xs:annotation> - <xs:complexType> - <xs:sequence minOccurs="0" maxOccurs="unbounded"> - <xs:element minOccurs="0" name="BUZEI"> - <xs:simpleType> - <xs:restriction base="xs:string"> <xs:pattern value="\d+" /> <xs:maxLength value="3" /> </xs:restriction> </xs:simpleType> </xs:element> - <xs:element minOccurs="0" name="BSCHL"> - <xs:simpleType> - <xs:restriction base="xs:string"> <xs:maxLength value="2" /> </xs:restriction> </xs:simpleType> </xs:element> - <xs:element minOccurs="0" name="UMSKZ"> - <xs:simpleType> - <xs:restriction base="xs:string"> <xs:maxLength value="1" /> </xs:restriction> </xs:simpleType> </xs:element> - <xs:element minOccurs="0" name="SHKZG"> - <xs:simpleType> - <xs:restriction base="xs:string"> <xs:maxLength value="1" /> </xs:restriction> </xs:simpleType> </xs:element> - <xs:element minOccurs="0" name="DMBTR"> - <xs:simpleType> - <xs:restriction base="xs:decimal"> <xs:totalDigits value="7" /> <xs:fractionDigits value="2" /> </xs:restriction> </xs:simpleType> </xs:element> - <xs:element minOccurs="0" name="SGTXT"> - <xs:simpleType> - <xs:restriction base="xs:string"> <xs:maxLength value="50" /> </xs:restriction> </xs:simpleType> </xs:element> - <xs:element minOccurs="0" name="ZUONR"> - <xs:simpleType> - <xs:restriction base="xs:string"> <xs:maxLength value="18" /> </xs:restriction> </xs:simpleType> </xs:element> - <xs:element minOccurs="0" name="KOSTL"> - <xs:simpleType> - <xs:restriction base="xs:string"> <xs:maxLength value="10" /> </xs:restriction> </xs:simpleType> </xs:element> - <xs:element minOccurs="0" name="ZSAKNR"> - <xs:simpleType> - <xs:restriction base="xs:string"> <xs:maxLength value="10" /> </xs:restriction> </xs:simpleType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> - <xs:element minOccurs="0" maxOccurs="unbounded" name="I_PARK_DOC"> - <xs:annotation> <xs:documentation>FOR FI-BC PARKING DOCUMENT NO</xs:documentation> <xs:appinfo /> </xs:annotation> - <xs:complexType> - <xs:sequence> - <xs:element minOccurs="0" name="PARK_DOC"> - <xs:simpleType> - <xs:restriction base="xs:string"> <xs:maxLength value="10" /> </xs:restriction> </xs:simpleType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> - <xs:element minOccurs="0" maxOccurs="unbounded" name="ZMESSAGE"> - <xs:annotation> <xs:documentation>BC MESSAGE</xs:documentation> <xs:appinfo /> </xs:annotation> - <xs:complexType> - <xs:sequence> - <xs:element minOccurs="0" name="ZMESSAGE"> - <xs:simpleType> - <xs:restriction base="xs:string"> <xs:maxLength value="100" /> </xs:restriction> </xs:simpleType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> - <xs:element name="Z_BC_FI_PARK_DOCUMENT_Response"> - <xs:complexType> - <xs:sequence> - <xs:element minOccurs="0" maxOccurs="unbounded" name="I_BKPF"> - <xs:annotation> <xs:documentation /> <xs:appinfo /> </xs:annotation> - <xs:complexType> - <xs:sequence> - <xs:element minOccurs="0" name="BUKRS"> - <xs:simpleType> - <xs:restriction base="xs:string"> <xs:maxLength value="4" /> </xs:restriction> </xs:simpleType> </xs:element> - <xs:element minOccurs="0" name="BLART"> - <xs:simpleType> - <xs:restriction base="xs:string"> <xs:maxLength value="2" /> </xs:restriction> </xs:simpleType> </xs:element> <xs:element minOccurs="0" name="BUDAT" type="b:RFCTYPE.RFCTYPE_DATE" /> - <xs:element minOccurs="0" name="XBLNR"> - <xs:simpleType> - <xs:restriction base="xs:string"> <xs:maxLength value="16" /> </xs:restriction> </xs:simpleType> </xs:element> - <xs:element minOccurs="0" name="BKTXT"> - <xs:simpleType> - <xs:restriction base="xs:string"> <xs:maxLength value="25" /> </xs:restriction> </xs:simpleType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> - <xs:element minOccurs="0" maxOccurs="unbounded" name="I_BSEG"> - <xs:annotation> <xs:documentation /> <xs:appinfo /> </xs:annotation> - <xs:complexType> - <xs:sequence> - <xs:element minOccurs="0" name="BUZEI"> - <xs:simpleType> - <xs:restriction base="xs:string"> <xs:pattern value="\d+" /> <xs:maxLength value="3" /> </xs:restriction> </xs:simpleType> </xs:element> - <xs:element minOccurs="0" name="BSCHL"> - <xs:simpleType> - <xs:restriction base="xs:string"> <xs:maxLength value="2" /> </xs:restriction> </xs:simpleType> </xs:element> - <xs:element minOccurs="0" name="UMSKZ"> - <xs:simpleType> - <xs:restriction base="xs:string"> <xs:maxLength value="1" /> </xs:restriction> </xs:simpleType> </xs:element> - <xs:element minOccurs="0" name="SHKZG"> - <xs:simpleType> - <xs:restriction base="xs:string"> <xs:maxLength value="1" /> </xs:restriction> </xs:simpleType> </xs:element> - <xs:element minOccurs="0" name="DMBTR"> - <xs:simpleType> - <xs:restriction base="xs:decimal"> <xs:totalDigits value="7" /> <xs:fractionDigits value="2" /> </xs:restriction> </xs:simpleType> </xs:element> - <xs:element minOccurs="0" name="SGTXT"> - <xs:simpleType> - <xs:restriction base="xs:string"> <xs:maxLength value="50" /> </xs:restriction> </xs:simpleType> </xs:element> - <xs:element minOccurs="0" name="ZUONR"> - <xs:simpleType> - <xs:restriction base="xs:string"> <xs:maxLength value="18" /> </xs:restriction> </xs:simpleType> </xs:element> - <xs:element minOccurs="0" name="KOSTL"> - <xs:simpleType> - <xs:restriction base="xs:string"> <xs:maxLength value="10" /> </xs:restriction> </xs:simpleType> </xs:element> - <xs:element minOccurs="0" name="ZSAKNR"> - <xs:simpleType> - <xs:restriction base="xs:string"> <xs:maxLength value="10" /> </xs:restriction> </xs:simpleType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> - <xs:element minOccurs="0" maxOccurs="unbounded" name="I_PARK_DOC"> - <xs:annotation> <xs:documentation>FOR FI-BC PARKING DOCUMENT NO</xs:documentation> <xs:appinfo /> </xs:annotation> - <xs:complexType> - <xs:sequence> - <xs:element minOccurs="0" name="PARK_DOC"> - <xs:simpleType> - <xs:restriction base="xs:string"> <xs:maxLength value="10" /> </xs:restriction> </xs:simpleType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> - <xs:element minOccurs="0" maxOccurs="unbounded" name="ZMESSAGE"> - <xs:annotation> <xs:documentation>BC MESSAGE</xs:documentation> <xs:appinfo /> </xs:annotation> - <xs:complexType> - <xs:sequence> - <xs:element minOccurs="0" name="ZMESSAGE"> - <xs:simpleType> - <xs:restriction base="xs:string"> <xs:maxLength value="100" /> </xs:restriction> </xs:simpleType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:schema>
-- Kind Regards Sandeep
-
יום שישי 24 אוגוסט 2012 09:48
Your input XML does NOT validate against your Schema.
Your Schema expects a document with the following namespace:
"http://VoucherParkingManual.NL"
But you are submitting an XML document with the following namespace:
"http://schemas.microsoft.com/BizTalk/2003"
Morten la Cour
- הוצע כתשובה על-ידי Leonid GanelineMVP, Moderator יום שישי 24 אוגוסט 2012 20:12
-
יום שישי 24 אוגוסט 2012 10:13מנחה דיון
Morten is correct based on the information shared
The target namespace in schema is
targetNamespace="http://VoucherParkingManual.NL"
While in instance wrong namespace is provided:
<RequestSP_NonLimit xmlns="http://schemas.microsoft.com/BizTalk/2003">
Please mark the post answered your question as answer, and mark other helpful posts as helpful, it'll help other users who are visiting your thread for the similar problem, Regards -Rohit Sharma (http://rohitt-sharma.blogspot.com/)
-
יום שישי 24 אוגוסט 2012 11:09
Hi All,
I have changed the namespace in the xml but still the blank xml.
Would this be the issue in target schema there is no root element under which multiple vouchers can be filled.
Like Suppose for new Root node <Main> there would be <Z_BC_FI_PARK_DOCUMENT_Request> tag should be there then only multiple vouchers can be filled in destination xml.
-- Kind Regards Sandeep
- נערך על-ידי Sandeep.Handa יום שישי 24 אוגוסט 2012 11:12
-
יום שישי 24 אוגוסט 2012 13:08מנחה דיון
Sandeep it would be better if you can Debug this map using the Visual Studio. If you don't know how to do it then you can refer to this article.Please mark the post answered your question as answer, and mark other helpful posts as helpful, it'll help other users who are visiting your thread for the similar problem, Regards -Rohit Sharma (http://rohitt-sharma.blogspot.com/)
- הוצע כתשובה על-ידי Leonid GanelineMVP, Moderator יום שישי 24 אוגוסט 2012 20:13
- סומן כתשובה על-ידי LeoTangModerator יום רביעי 29 אוגוסט 2012 08:28