cancel
Showing results for 
Search instead for 
Did you mean: 

Error while importing the XSD to external definition in PI 7.1

Former Member
0 Kudos

Hi Experts,

I have an XSD, which was working perfectly in PI 7.0, but when i import the same XSD to the PI 7.1. it is giving me an error like

Unable to convert imported document to WSDL

Reason:

Unable to recognize document as valid XSDCheck the selected category.

when i did a check(F7), it says

Attribute "minOccurs" with the value "0" is not permitted in the "/schema/element("VALUTA")" element

I have few fields with minOccurs "0", when i remove the minOccurs it works fine.but i need the minOccurs to be mentioned in the XSD.

Could you please help me, what changes i need to make in XSD so that it is imported successfully.

Thanks,

Hemanth.

Accepted Solutions (1)

Accepted Solutions (1)

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,

You can refer to this list for the Supported XML Schema and WSDL in PI 7.1

http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/00a9a425-1769-2a10-9196-bd8eeed72...

Not sure why you are getting the error, can you paste the xsd here?

Hope this helps,

Mark

Former Member
0 Kudos

Hi Mark,

Thanks For the Reply, please find the XSD and do the helpful.

<?xml version="1.0" encoding="ISO-8859-1"?>

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xs:element name="BU" type="xs:string" />
<xs:element name="Body">
  <xs:complexType>
   <xs:sequence>
    <xs:element ref="NOTE" />
    <xs:element ref="SALREP" />
    <xs:element ref="NOPOS" />
    <xs:element ref="VALUTA" minOccurs="0" />
    <xs:element ref="DAYS" minOccurs="0" />
    <xs:element ref="ORDREASON" minOccurs="0" />
    <xs:element ref="BILLTEXT" minOccurs="0" />
    <xs:element ref="AG" minOccurs="0" />
    <xs:element ref="ENDMARK" />
   </xs:sequence>
  </xs:complexType>
</xs:element>
<xs:element name="CUSTNO" type="xs:string" />
<xs:element name="CUSTORDID" type="xs:string" />
<xs:element name="DELDATE" type="xs:string" />
<xs:element name="ENDMARK" type="xs:string" />
<xs:element name="FMARK" type="xs:string" />
<xs:element name="Header">
  <xs:complexType>
   <xs:sequence>
    <xs:element ref="HMARK" />
    <xs:element ref="HTRANS" />
    <xs:element ref="HSA" />
   </xs:sequence>
  </xs:complexType>
</xs:element>
<xs:element name="MAN" type="xs:string" />
<xs:element name="NOPOS" type="xs:string" />
<xs:element name="VALUTA" type="xs:string" minOccurs="0" />
<xs:element name="DAYS" type="xs:string" minOccurs="0" />
<xs:element name="ORDREASON" type="xs:string" minOccurs="0" />
<xs:element name="BILLTEXT" type="xs:string" minOccurs="0" />
<xs:element name="AG" type="xs:string" minOccurs="0" />
<xs:element name="NOTE" type="xs:string" />
<xs:element name="Trailer">
  <xs:complexType>
   <xs:sequence>
    <xs:element ref="FMARK" />
    <xs:element ref="FZAEHL" />
   </xs:sequence>
  </xs:complexType>
</xs:element>
<xs:element name="VO" type="xs:string" />
<xs:element name="Z2H_KO">
  <xs:complexType>
   <xs:sequence>
    <xs:element ref="file" />
   </xs:sequence>
  </xs:complexType>
</xs:element>
<xs:element name="file">
  <xs:complexType>
   <xs:sequence>
    <xs:element ref="Header" />
    <xs:element ref="Body" minOccurs="0" maxOccurs="unbounded" />
    <xs:element ref="Trailer" />
   </xs:sequence>
  </xs:complexType>
</xs:element>
</xs:schema>

Thanks,

Hemanth.

former_member184681
Active Contributor
0 Kudos

Hi,

I believe this might be caused by the fact that you try to mark some attributes as optional twice - here:

<xs:element ref="VALUTA" minOccurs="0" />

and here:

<xs:element name="VALUTA" type="xs:string" minOccurs="0" />

Regards,

Greg

iaki_vila
Active Contributor
0 Kudos

Hi Hemmath,

The problem is the next:

With this stament you say: I have an element, named VALUTA,  with ocurrence 0 that is defined in the element VALUTA

<xs:element ref="VALUTA" minOccurs="0" />

With this stament you are defining VALUTA, it has no sense to establish the ocurrence here, this is the definition and the ocurrency can be variable:

<xs:element name="VALUTA" type="xs:string" minOccurs="0" />

Regards

Former Member
0 Kudos

Please remove the minOccurs text at the element name sections, because you already have defined it in the element ref sections. Then it should work, You do not loose information.

CSY

Former Member
0 Kudos

Hi Greg,

Yes you are correct, when i remove the minOccurs in this

<xs:element name="VALUTA" type="xs:string" minOccurs="0" />

it works but when i remove the minOccurs for the ref element and keep the elament name it again throws error.

can you suggest me the solution what to do in this case, because both the places the filed VALUTA needs to be optional.

Thanks,

Hemanth.

Former Member
0 Kudos

Thanks Greg,Christaian and Inaki Villa, it works now.

Thanks,

Hemanth.

Answers (1)

Answers (1)

former_member184681
Active Contributor
0 Kudos

Hi,

Once you have created an External Definition and trying to load a file into it, check the value of "Category" attribute. Since you are trying to load an .xsd file, it should be set to xsd, while the default value is wsdl.

Regards,

Greg

Former Member
0 Kudos

Hi Greg,

I have used the category as xsd only while loading the .xsd file.

Thanks,

Hemanth.