cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to convert imported document to WSDL

Former Member
0 Kudos

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..

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi Prema,

Try to open the xsd file using Internet explorer and see whether the syntax is correct.

Also check the starting where the namespaces are defined and see whether all the tags are properly closed.

This might be occured due to syntax error in your xsd file.

Thanks,

Tiny

Former Member
0 Kudos

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">

Former Member
0 Kudos

Praveen,

Then, what do I have to do now?

Former Member
0 Kudos

Hi,

The problem is with the xsd format.If you have Altova XML Spy try to open it in that.

Try to do Save As, then it will give you the exact line number where it goes errored out.

It is a syntactical error.

Thanks

Tiny

Former Member
0 Kudos

yes Tiny, Abhishek,

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..

former_member200962
Active Contributor
0 Kudos

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.

Former Member
0 Kudos

thanks..

Yes, the entire document was XSD except this, after changing this.. that error vanished, throwing another error..

former_member200962
Active Contributor
0 Kudos

what is that another error?....can you post it in sdn...alongwith the xsd format....

Regards,

Abhishek.

Former Member
0 Kudos

Can you please tell what is the new error???

Former Member
0 Kudos

the new error is:

Unable to convert imported document to WSDL

Reason:

Attribute "maxOccurs" with the value "unbounded" is not permitted in the "/schema/complexType("CUSTOMER")" elementCheck the selected category

former_member200962
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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>

former_member200962
Active Contributor
0 Kudos

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:)

Former Member
0 Kudos

now it gives me this error..

Unable to convert imported document to WSDL

Reason:

Unable to recognize document as valid XSDCheck the selected category

former_member200962
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

nope Jitender, Tiny that is not working...

VijayKonam
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Vijay, I did try importing as 'Data type' also...

former_member200962
Active Contributor
0 Kudos

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

former_member200962
Active Contributor
0 Kudos

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

Answers (6)

Answers (6)

rajasekhar_reddy14
Active Contributor
0 Kudos

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

jyothi_anagani
Active Contributor
0 Kudos

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.

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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.

former_member200962
Active Contributor
0 Kudos

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.

prateek
Active Contributor
0 Kudos

Make sure that while importing under External Definition, you have selected "XSD" and not "WSDL".

Regards,

Prateek

Former Member
0 Kudos

Make sure that you selected category as 'XSD' .

Regards

Srinivas

Former Member
0 Kudos

yes, i have imported selecting XSD, the same error..

former_member732072
Active Participant
0 Kudos

Hi Prema,

Could you please try to save your xsd file first as wsdl file by copying the contents in a notepad and saving as wsdl.

Then select the category as "wsdl" and see if it works.

I apologise , it probably will not work.

Best regards.

Edited by: Prakash Bhatia on Apr 22, 2009 5:05 AM

Former Member
0 Kudos

Prakash,

No luck, same error with your solution...