on 06-26-2007 8:47 PM
Hi Guys,
I have xml from the 3rd party which comes into xi. I need to generate .xsd's for them and then import that structure through the external definition.
How to generate a xsd from the given xml ? any help would be appreciated
Thanks,
srini
Hi,
try this free page:
http://www.hitsw.com/xml_utilites/
Regards,
michal
-
<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Micheal,
I have used this and generated xml schema and copied to notepad and saved as .xsd and when i import into xi as external definition i am getting the following error
Unable to convert imported document to WSDL
Reason: Error when parsing the XML document (Fatal Error: com.sap.engine.lib.xml.parser.ParserException: XML Declaration not allowed here.(:main:, row:1, col:8))
Check the selected category
The xsd is as follows
<?xml version="1.0" encoding="UTF-8" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="AcctOverride" type="xs:string" />
<xs:element name="address">
<xs:complexType mixed="true" />
</xs:element>
<xs:element name="Bearer">
<xs:complexType>
<xs:sequence>
<xs:element ref="Owner" />
<xs:element ref="InterestType" />
<xs:element ref="OwnISQ" />
<xs:element ref="BearerPercent" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="BearerGroup">
<xs:complexType mixed="true" />
</xs:element>
<xs:element name="BearerGroupUse">
<xs:complexType>
<xs:sequence>
<xs:element ref="BearerGroup" />
<xs:element ref="EffectiveFrom" />
<xs:element ref="EffectiveTo" />
<xs:element ref="BearerGrpType" />
<xs:element ref="Bearer" maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="BearerGrpType">
<xs:complexType mixed="true" />
</xs:element>
<xs:element name="BearerPercent">
<xs:complexType mixed="true" />
</xs:element>
<xs:element name="biztalk_1">
<xs:complexType>
<xs:sequence>
<xs:element ref="header" />
<xs:element ref="body" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="body">
<xs:complexType>
<xs:sequence>
<xs:element ref="doc:DOI.CheckIn" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="CarriedBearer" type="xs:string" />
<xs:element name="Combprdcd">
<xs:complexType mixed="true" />
</xs:element>
<xs:element name="CompanyCode">
<xs:complexType mixed="true" />
</xs:element>
<xs:element name="Country">
<xs:complexType mixed="true" />
</xs:element>
<xs:element name="delivery">
<xs:complexType>
<xs:sequence>
<xs:element ref="message" />
<xs:element ref="to" />
<xs:element ref="from" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="DivisionOfInterest">
<xs:complexType>
<xs:sequence>
<xs:element ref="CompanyCode" />
<xs:element ref="Jointventure" />
<xs:element ref="VentureDOI" />
<xs:element ref="DOIName" />
<xs:element ref="Combprdcd" />
<xs:element ref="Country" />
<xs:element ref="Primarygeoloc" />
<xs:element ref="Secndrygeoloc" />
<xs:element ref="PermTemp" />
<xs:element ref="StartDate" />
<xs:element ref="EndDate" />
<xs:element ref="GeneratePPA" />
<xs:element ref="PPNprocdate" />
<xs:element ref="MktDateOil" />
<xs:element ref="MktDateGas" />
<xs:element ref="Ownership" maxOccurs="unbounded" />
<xs:element ref="BearerGroupUse" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="doc:DOI.CheckIn">
<xs:complexType>
<xs:sequence>
<xs:element ref="DivisionOfInterest" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="DOIName">
<xs:complexType mixed="true" />
</xs:element>
<xs:element name="DualAccounting" type="xs:string" />
<xs:element name="EffectiveFrom">
<xs:complexType mixed="true" />
</xs:element>
<xs:element name="EffectiveTo">
<xs:complexType mixed="true" />
</xs:element>
<xs:element name="EndDate">
<xs:complexType mixed="true" />
</xs:element>
<xs:element name="EntitlementCD">
<xs:complexType mixed="true" />
</xs:element>
<xs:element name="EntityType">
<xs:complexType mixed="true" />
</xs:element>
<xs:element name="from">
<xs:complexType>
<xs:sequence>
<xs:element ref="address" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="GeneratePPA" type="xs:string" />
<xs:element name="header">
<xs:complexType>
<xs:sequence>
<xs:element ref="delivery" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="InterestCat">
<xs:complexType mixed="true" />
</xs:element>
<xs:element name="InterestType">
<xs:complexType mixed="true" />
</xs:element>
<xs:element name="JIBOffset" type="xs:string" />
<xs:element name="JIBOffsetBA" type="xs:string" />
<xs:element name="Jointventure">
<xs:complexType mixed="true" />
</xs:element>
<xs:element name="LeaseUseFuel">
<xs:complexType mixed="true" />
</xs:element>
<xs:element name="message">
<xs:complexType>
<xs:sequence>
<xs:element ref="messageID" />
<xs:element ref="sent" />
<xs:element ref="subject" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="messageID">
<xs:complexType mixed="true" />
</xs:element>
<xs:element name="MktDateGas" type="xs:string" />
<xs:element name="MktDateOil" type="xs:string" />
<xs:element name="MMSProceeds" type="xs:string" />
<xs:element name="MMSReconcile" type="xs:string" />
<xs:element name="NRI">
<xs:complexType mixed="true" />
</xs:element>
<xs:element name="Owner">
<xs:complexType mixed="true" />
</xs:element>
<xs:element name="Ownership">
<xs:complexType>
<xs:sequence>
<xs:element ref="Owner" />
<xs:element ref="InterestType" />
<xs:element ref="OwnISQ" />
<xs:element ref="EffectiveFrom" />
<xs:element ref="EffectiveTo" />
<xs:element ref="JIBOffset" />
<xs:element ref="NRI" />
<xs:element ref="SuspenseReason" />
<xs:element ref="TaxFree" />
<xs:element ref="BearerGroup" />
<xs:element ref="PayoutCode" />
<xs:element ref="PayCode" />
<xs:element ref="EntitlementCD" />
<xs:element ref="MMSProceeds" />
<xs:element ref="DualAccounting" />
<xs:element ref="EntityType" />
<xs:element ref="AcctOverride" />
<xs:element ref="InterestCat" />
<xs:element ref="CarriedBearer" />
<xs:element ref="LeaseUseFuel" />
<xs:element ref="JIBOffsetBA" />
<xs:element ref="ProdPayOwn" />
<xs:element ref="MMSReconcile" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="OwnISQ">
<xs:complexType mixed="true" />
</xs:element>
<xs:element name="PayCode">
<xs:complexType mixed="true" />
</xs:element>
<xs:element name="PayoutCode" type="xs:string" />
<xs:element name="PermTemp">
<xs:complexType mixed="true" />
</xs:element>
<xs:element name="PPNprocdate" type="xs:string" />
<xs:element name="Primarygeoloc">
<xs:complexType mixed="true" />
</xs:element>
<xs:element name="ProdPayOwn" type="xs:string" />
<xs:element name="Secndrygeoloc">
<xs:complexType mixed="true" />
</xs:element>
<xs:element name="sent">
<xs:complexType mixed="true" />
</xs:element>
<xs:element name="StartDate">
<xs:complexType mixed="true" />
</xs:element>
<xs:element name="subject">
<xs:complexType mixed="true" />
</xs:element>
<xs:element name="SuspenseReason">
<xs:complexType mixed="true" />
</xs:element>
<xs:element name="TaxFree">
<xs:complexType mixed="true" />
</xs:element>
<xs:element name="to">
<xs:complexType>
<xs:sequence>
<xs:element ref="address" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="VentureDOI">
<xs:complexType mixed="true" />
</xs:element>
</xs:schema>
any help would be appreciated
Thanks,
srini
Srinivas,
First of all to overcome the error what you are getting is open the xsd in notepad and see whether it has any spaces or blank lines during the starting of the notepad. If yes remove that and then it is complaing about:
Its complaining about:
<xs:element name="doc:DOI.CheckIn">
<xs:element ref="doc:DOI.CheckIn" >
Check this two. If I put the values as doc.DOI.CheckIn the xsd is fine. So check this values.
I am using Altova XML spy to test.
Regards,
---Satish
Srinivas,
There are some external tools which convert XML to XSD. Can you please give your xml so that I can give back your XSD.
Else
You can use this link:
http://www.hitsw.com/xml_utilites/
Regards,
---Satish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Srini,
If you know the XML structure then ,u candirectly create Data type objects in IR. Why u want to create XSD and import in Exte.Defn?
Best regards,
raj.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.