on 04-21-2009 9:08 PM
Hi all,
When i want to upload XSD file as External Defination, i get this error;
Unable to convert imported document to WSDL
Reason:
Error when parsing an XML document (The prefix "xsd" for element "xsd:schema" is not bound.)Check the selected category
I did read related threads.. but not helping me..
Hi Prema,
Both XSD, WSDL types what you import as External Definition Object, It will convert the imported XSD, WSDL to PI/XI understandable WSDL. This means document is parsed for name space changes. This is the reason, you are getting error.
For that you need to import the document with that got proper name space 'BINDING'.
Please check this for furthur assistance.
[http://www.w3.org/TR/xmlschema11-1/]
Regards
Praveen K
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Tiny,
when i try opening the file with internet explorer, i get this error;
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
----
The operation completed successfully. Error processing resource 'file:///C:/Documents and Settings/pkris/Local Settings/Tem...
<xsd:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
Hi,
looked at the error when opened in internet explorer i see that there is XS insted of XSD
<xsd:schema xmlns:*xs*="http://www.w3.org/2001/XMLSchema">
After changing and re-importing it gives another error..
both xs and xsd will be supported ......the only thing that you need to take care is that if you are having XS then make sure that the entire document has XS
If you have XSD then make sure that entire document has XSD
XS and XSD both equally used and supported:)
Regards,
Abhishek.
Attribute "maxOccurs" with the value "unbounded" is not permitted in the "/schema/complexType("CUSTOMER")" elementCheck the selected category
Check the definition for the CUSTOMER field.....
It should be like:
<xsd:element name="CUSTOMER" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Name" type="xs:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
Also there may be one more reference of CUSTOMER field.....this may be where CUSTOMER is used under another complex type.....here check for the occurence given.....where ever CUSTOMER is used the occurence has to be maxOccurs="unbounded"......
Regards,
Abhishek
I tried your solution, but No luck..
Yes, in my XSD there are two CUSTOMERS...
My XSD is something like this..
<?xml version="1.0" encoding="UTF-8"?>
<!--W3C Schema generated by XMLSpy v2008 rel. 2 sp2 (http://www.altova.com)-->
<xsd:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xsd:complexType name="Record">
<xsd:sequence>
<xsd:element name="Additional_Name_1" minOccurs="0" type="xsd:string"/>
<xsd:element name="Corporate_Email" minOccurs="0" type="xsd:string"/>
<xsd:element name="Corporate_Fax" minOccurs="0" type="xsd:string"/>
<xsd:element name="Corporate_Phone" minOccurs="0" type="xsd:string"/>
<xsd:element name="CUSTOMER" minOccurs="0" type="xsd:string"/>
<xsd:element name="Customer_Entity_Type" minOccurs="0" type="xsd:string"/>
<xsd:element name="Physical_StreeName" minOccurs="0" type="xsd:string"/>
<xsd:element name="Physical_StreeNumber" minOccurs="0" type="xsd:string"/>
<xsd:element name="Physical_StreeType" minOccurs="0" type="xsd:string"/>
<xsd:element name="Update_Date" minOccurs="0" type="xsd:string"/>
<xsd:element name="WB-Domestic_Ultimate_Details " minOccurs="0" type="xsd:string"/>
<xsd:element name="WB-Global_Ultimate_Details" minOccurs="0" type="xsd:string"/>
<xsd:element name="WB-Headquarters_ParenDetails" minOccurs="0" type="xsd:string"/>
<xsd:element name="WWP_ID" minOccurs="0" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CUSTOMER" maxOccurs="unbounded">
<xsd:sequence>
<xsd:element ref="Record"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
Hi,
Try this change:
<xsd:complexType name="Record">
<xsd:sequence>
<xsd:element name="CUSTOMER" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CUSTOMER">
<xsd:sequence>
<xsd:element ref="Record"/>
</xsd:sequence>
</xsd:complexType>
Regards,
Abhishek.
Signing-off for the day:)
i was editing the message:(
<xsd:complexType name="Record">
<xsd:sequence>
<xsd:element name="CUSTOMER" minOccurs="0" maxOccurs="unbounded">
<xsd:ComplexType>
<xsd:sequence>
<xsd:element ref="Record"/>
</xsd:sequence>
</xsd:ComplexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
Other elements remain the same....
Whenever you are declaring complex elements your declaration should be of the following type:
<xs:element name="persons">
<xs:complexType>
<xs:sequence>
<xs:element name="person" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="full_name" type="xs:string"/>
<xs:element name="child_name" type="xs:string"
minOccurs="0" maxOccurs="5"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
OR:
<xs:element name="person" type="personinfo"/>
<xs:complexType name="personinfo">
<xs:sequence>
<xs:element ref="persongroup"/>
<xs:element name="country" type="xs:string"/>
</xs:sequence>
</xs:complexType>
For more info you can check: http://www.w3schools.com/Schema/schema_complex_indicators.asp
Regards,
Abhishek
Edited by: abhishek salvi on Apr 23, 2009 9:14 PM
Use this XSD. It will work.
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xsd:element name="Record">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Additional_Name_1" minOccurs="0" type="xsd:string"/>
<xsd:element name="Corporate_Email" minOccurs="0" type="xsd:string"/>
<xsd:element name="Corporate_Fax" minOccurs="0" type="xsd:string"/>
<xsd:element name="Corporate_Phone" minOccurs="0" type="xsd:string"/>
<xsd:element name="CUSTOMER" minOccurs="0" type="xsd:string"/>
<xsd:element name="Customer_Entity_Type" minOccurs="0" type="xsd:string"/>
<xsd:element name="Physical_StreeName" minOccurs="0" type="xsd:string"/>
<xsd:element name="Physical_StreeNumber" minOccurs="0" type="xsd:string"/>
<xsd:element name="Physical_StreeType" minOccurs="0" type="xsd:string"/>
<xsd:element name="Update_Date" minOccurs="0" type="xsd:string"/>
<xsd:element name="WB-Domestic_Ultimate_Details " minOccurs="0" type="xsd:string"/>
<xsd:element name="WB-Global_Ultimate_Details" minOccurs="0" type="xsd:string"/>
<xsd:element name="WB-Headquarters_ParenDetails" minOccurs="0" type="xsd:string"/>
<xsd:element name="WWP_ID" minOccurs="0" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="Customer">
<xsd:complexType>
<xsd:sequence maxOccurs="unbounded">
<xsd:element ref="Record"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
Edited by: Jitender Chauhan on Apr 24, 2009 6:24 AM
You can not import XSDs as External Definitions as far as I know. You can import them only into the data type definitions directly, provided you have the right name and name space mentioned in XSD.
EDs are mostly WSDLs with message types defined inside them. When you are trying to import XSD XI is trying to compare it with WSDL skeleten schema and throwing errors.
VJ
Hi Vijay,
You can not import XSDs as External Definitions as far as I know.
Had this been the case then how can we import the mail package (which is an XSD) into External Definition....
External Definition can accept XSD, WSDL and DTD formats....you can check in the dropdown...the problem prema is facing is due to improper definition of the xsd and nothing else.
Regards,
Abhishek
Hi,
The first error lies in the secnd line:)...this is not the proper declaration....
<xsd:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
A proper declaration is
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="namespace"targetNamespace="namespace">
in the above statement replace namespace with the actual namepace under which you have to import the XSD or namespace of the system from which you got this XSD...both the namespaces should be same
The second lies here:
<xsd:element name="WB-Domestic_Ultimate_Details " minOccurs="0" type="xsd:string"/>
there should be no space after an element name
<xsd:element name="WB-Domestic_Ultimate_Details" minOccurs="0" type="xsd:string"/>
The third and last error here
<xsd:complexType name="CUSTOMER" maxOccurs="unbounded">
the correct format should be:
<xsd:complexType name="CUSTOMER">
keep the rest things similar....finally your problem solved:)...i have checked these things for myself
and even tested the XSD (provided by you in one of the replies) by importing in my XI box
So your final XSD will be:
<?xml version="1.0" encoding="UTF-8"?>
<!--W3C Schema generated by XMLSpy v2008 rel. 2 sp2 (http://www.altova.com)-->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="namespace" targetNamespace="namespace">
<xsd:complexType name="Record">
<xsd:sequence>
<xsd:element name="Additional_Name_1" minOccurs="0" type="xsd:string"/>
<xsd:element name="Corporate_Email" minOccurs="0" type="xsd:string"/>
<xsd:element name="Corporate_Fax" minOccurs="0" type="xsd:string"/>
<xsd:element name="Corporate_Phone" minOccurs="0" type="xsd:string"/>
<xsd:element name="CUSTOMER" minOccurs="0" type="xsd:string"/>
<xsd:element name="Customer_Entity_Type" minOccurs="0" type="xsd:string"/>
<xsd:element name="Physical_StreeName" minOccurs="0" type="xsd:string"/>
<xsd:element name="Physical_StreeNumber" minOccurs="0" type="xsd:string"/>
<xsd:element name="Physical_StreeType" minOccurs="0" type="xsd:string"/>
<xsd:element name="Update_Date" minOccurs="0" type="xsd:string"/>
<xsd:element name="WB-Domestic_Ultimate_Details" minOccurs="0" type="xsd:string"/>
<xsd:element name="WB-Global_Ultimate_Details" minOccurs="0" type="xsd:string"/>
<xsd:element name="WB-Headquarters_ParenDetails" minOccurs="0" type="xsd:string"/>
<xsd:element name="WWP_ID" minOccurs="0" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CUSTOMER">
<xsd:sequence>
<xsd:element ref="Record"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
Check this and let me know....
Regards,
Abhishek
Hi Prema,
Imported XSD not valid format it wont genarate WSDL,check your XSD in Stylus Studio and XML Spy and Validate it and Check for WellFormed or not.
when importing any XSD it should be WellFormed and Valid XSD.then only WSDL file wl genaarate.
Cheers,
Raj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I think that error in the WSDL file. Dont copy that while downloading. Because some times it will give a problem.so while saving the file use that as save page as on that page and save it in Deskktop with .wsdl extension only.
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI,
Try this
<xsd:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xsd:complexType name="Record">
<xsd:sequence>
<xsd:element name="Additional_Name_1" minOccurs="0" type="xsd:string"/>
<xsd:element name="Corporate_Email" minOccurs="0" type="xsd:string"/>
<xsd:element name="Corporate_Fax" minOccurs="0" type="xsd:string"/>
<xsd:element name="Corporate_Phone" minOccurs="0" type="xsd:string"/>
<xsd:element name="CUSTOMER" minOccurs="0" maxOccurs="unbounded" type="xsd:string"/>
<xsd:element name="Customer_Entity_Type" minOccurs="0" type="xsd:string"/>
<xsd:element name="Physical_StreeName" minOccurs="0" type="xsd:string"/>
<xsd:element name="Physical_StreeNumber" minOccurs="0" type="xsd:string"/>
<xsd:element name="Physical_StreeType" minOccurs="0" type="xsd:string"/>
<xsd:element name="Update_Date" minOccurs="0" type="xsd:string"/>
<xsd:element name="WB-Domestic_Ultimate_Details " minOccurs="0" type="xsd:string"/>
<xsd:element name="WB-Global_Ultimate_Details" minOccurs="0" type="xsd:string"/>
<xsd:element name="WB-Headquarters_ParenDetails" minOccurs="0" type="xsd:string"/>
<xsd:element name="WWP_ID" minOccurs="0" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CUSTOMER">
<xsd:sequence>
<xsd:element ref="Record"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
Thanks,
Tiny
Hi,
I also have faced the similar problem,
dont copy the file because u may not copy properly but save the WSDL as it is choosing FILE---SAVE AS--on desktop
while importing choose from the desktop.If u copy the wsdl with that it may take "-" also that is why u get that error
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Test your Schema file either with any Internet browser or XML Editor.
The namespace declarations is very important. It seems you have a mismatch in the declaration itself. Use the first (xmlns:xsd="http://www.w3.org/2001/XMLSchema") to prefix xsd to identify the elements. Like this
<xsd:schema
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://MyExample.com/ns/books/"
targetNamespace="http://MyExample.com/ns/books/"
elementFormDefault="qualified"
attributeFormDefault="unqualified" >
<xsd:element name="Books"></xsd:element>
</xsd:schema>
You can chose any prefix instead of xsd but that should be same everywhere.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
The prefix "xsd" for element "xsd:schema" is not bound
The XSD you are importing is not in proper format. To check what the proper format should be open any DataType and go to its XSD tab.....now compare your XSD format with the XSD of the DataType.
Specifically check for the definition of xsd:schema element....the one which is at the top
Regards,
Abhishek.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Make sure that while importing under External Definition, you have selected "XSD" and not "WSDL".
Regards,
Prateek
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 | |
9 | |
7 | |
6 | |
5 | |
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.