cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with external definitions (XSD)

Former Member
0 Kudos

Hi people,

I've read a lot about this issue but I just couldn't find a way to solve it.

After loading and XSD schema as an ED, I tried to create a message interface but the ED created isn't available.

Nothing appears in "MESSAGES" and "EXTERNAL REFERENCES" tabs of the ED.

I've already checked the XSD (using XML Spy) and it's OK.

I'm not sure if it's helpful but, here is an example:

-


<?xml version="1.0" encoding="utf-8"?>

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="https://www.fazenda.sp.gov.br/wsAlcoolCombustivel/ws/schemas/Autorizacao.xsd" targetNamespace="https://www.fazenda.sp.gov.br/wsAlcoolCombustivel/ws/schemas/Autorizacao.xsd" elementFormDefault="qualified" version="1.1">

<xs:complexType name="autorizacoesType" id="autorizacoesType">

<xs:sequence minOccurs="0" maxOccurs="unbounded">

<xs:sequence minOccurs="1" maxOccurs="250">

<xs:element name="autorizacao" type="autorizacaoType" />

</xs:sequence>

</xs:sequence>

</xs:complexType>

<xs:complexType name="autorizacaoType" id="autorizacao">

<xs:sequence minOccurs="1" maxOccurs="1">

<xs:element name="dadosAutorizacao" type="dadosAutorizacaoType" />

</xs:sequence>

<xs:attribute name="idRequisicao" type="idRequisicaoType" use="optional">

</xs:attribute>

</xs:complexType>

<xs:complexType name="dadosAutorizacaoType" id="dadosAutorizacaoType">

<xs:sequence minOccurs="1" maxOccurs="1">

<xs:element name="dataRequisicao" type="dataRequisicaoType" minOccurs="1" maxOccurs="1" />

<xs:element name="cnpjRemetente" type="cnpjType" minOccurs="1" maxOccurs="1" />

<xs:element name="cnpjDestinatario" type="cnpjType" minOccurs="1" maxOccurs="1" />

<xs:element name="ufDestinatario" type="ufType" minOccurs="1" maxOccurs="1" />

<xs:element name="codAutorizacao" type="codAutorizacaoType" minOccurs="1" maxOccurs="1" />

<xs:element name="mensagemRetorno" type="xs:string" minOccurs="1" maxOccurs="1" />

</xs:sequence>

</xs:complexType>

<xs:simpleType name="idRequisicaoType" id="idRequisicaoType">

<xs:restriction base="xs:positiveInteger">

<xs:pattern value="\d{1,6}" />

</xs:restriction>

</xs:simpleType>

<xs:simpleType name="dataRequisicaoType" id="dataRequisicaoType">

<xs:restriction base="xs:string">

<xs:pattern value="\d/\d/\d \d:\d:\d" />

</xs:restriction>

</xs:simpleType>

<xs:simpleType name="cnpjType" id="cnpjType">

<xs:restriction base="xs:positiveInteger">

<xs:pattern value="\d" />

</xs:restriction>

</xs:simpleType>

<xs:simpleType name="ufType" id="ufType">

<xs:restriction base="xs:string">

<xs:enumeration value="SP" />

<xs:enumeration value="TO" />

</xs:restriction>

</xs:simpleType>

<xs:simpleType name="codAutorizacaoType" id="codAutorizacaoType">

<xs:restriction base="xs:string">

<xs:pattern value="\d{0,20}" />

</xs:restriction>

</xs:simpleType>

<xs:element name="root">

<xs:complexType>

<xs:sequence>

<xs:element name="nrAutorizacoes" type="xs:integer" minOccurs="1" maxOccurs="1" />

<xs:element name="autorizacoes" minOccurs="1" maxOccurs="1" type="autorizacoesType" />

</xs:sequence>

</xs:complexType>

</xs:element>

</xs:schema>

-


Can anyone give me a hand?

Thanks,

Rodrigo.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Rodrigo,

please have a look at SAP note 901988. I think this will solve your problem.

Greetings

Stephan

Former Member
0 Kudos

Rodrigo,

I always put targetNameSpace field value in the XSD as the namespace you define in the SWC. Then it will work. I loaded your XSD with the changed target name space and it worked for me.

--Archana

Former Member
0 Kudos

Hi,

Such kind of error ucccurs due bto problem in XSD.

check ur XSD.

Former Member
0 Kudos

Hi ,

Ur problem is solved ...give me the proper points

use the following XSD/Manipulated XSD....

=====================================

<?xml version="1.0" encoding="utf-8"?>

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">

<xs:complexType name="autorizacoesType" id="autorizacoesType">

<xs:sequence minOccurs="0" maxOccurs="unbounded">

<xs:sequence minOccurs="1" maxOccurs="250">

<xs:element name="autorizacao" type="autorizacaoType" />

</xs:sequence>

</xs:sequence>

</xs:complexType>

<xs:complexType name="autorizacaoType" id="autorizacao">

<xs:sequence minOccurs="1" maxOccurs="1">

<xs:element name="dadosAutorizacao" type="dadosAutorizacaoType" />

</xs:sequence>

<xs:attribute name="idRequisicao" type="idRequisicaoType" use="optional">

</xs:attribute>

</xs:complexType>

<xs:complexType name="dadosAutorizacaoType" id="dadosAutorizacaoType">

<xs:sequence minOccurs="1" maxOccurs="1">

<xs:element name="dataRequisicao" type="dataRequisicaoType" minOccurs="1" maxOccurs="1" />

<xs:element name="cnpjRemetente" type="cnpjType" minOccurs="1" maxOccurs="1" />

<xs:element name="cnpjDestinatario" type="cnpjType" minOccurs="1" maxOccurs="1" />

<xs:element name="ufDestinatario" type="ufType" minOccurs="1" maxOccurs="1" />

<xs:element name="codAutorizacao" type="codAutorizacaoType" minOccurs="1" maxOccurs="1" />

<xs:element name="mensagemRetorno" type="xs:string" minOccurs="1" maxOccurs="1" />

</xs:sequence>

</xs:complexType>

<xs:simpleType name="idRequisicaoType" id="idRequisicaoType">

<xs:restriction base="xs:positiveInteger">

<xs:pattern value="\d{1,6}" />

</xs:restriction>

</xs:simpleType>

<xs:simpleType name="dataRequisicaoType" id="dataRequisicaoType">

<xs:restriction base="xs:string">

<xs:pattern value="\d/\d/\d \d:\d:\d" />

</xs:restriction>

</xs:simpleType>

<xs:simpleType name="cnpjType" id="cnpjType">

<xs:restriction base="xs:positiveInteger">

<xs:pattern value="\d" />

</xs:restriction>

</xs:simpleType>

<xs:simpleType name="ufType" id="ufType">

<xs:restriction base="xs:string">

<xs:enumeration value="SP" />

<xs:enumeration value="TO" />

</xs:restriction>

</xs:simpleType>

<xs:simpleType name="codAutorizacaoType" id="codAutorizacaoType">

<xs:restriction base="xs:string">

<xs:pattern value="\d{0,20}" />

</xs:restriction>

</xs:simpleType>

<xs:element name="root">

<xs:complexType>

<xs:sequence>

<xs:element name="nrAutorizacoes" type="xs:integer" minOccurs="1" maxOccurs="1" />

<xs:element name="autorizacoes" minOccurs="1" maxOccurs="1" type="autorizacoesType" />

</xs:sequence>

</xs:complexType>

</xs:element>

</xs:schema>

Former Member
0 Kudos

Rodrigo,

After logging into your Integration Repository --> Right Click on External Definition --> Give the name of External Definition --> Then click on Create.

Here there is a drop down box. Click on XSD and import your external definition. Then after this save.

I think you are missing something in this process. Try out once again.

---Satish

Former Member
0 Kudos

Hi, Satish!

Thanks for your help.

That's exactly what I've done... I've created and saved the ED with XSD category.

I put the same name "SolicitacaoAutorizacao.xsd" in fields File and Source. After that, I activated the ED.

Then, when I tried to create a Message Interface, the ED was not available.

Thanks again!

Rodrigo.

Former Member
0 Kudos

Rodrigo,

I think you are directly specifying the file name. Just try to import the XSD from your machine. Because if you import you will definitely see it.

---Satish

Former Member
0 Kudos

Hi...

actually that's what I did. I imported the XSD from my computer and, manually specified the SOURCE.

I can see the "IMPORTED DOCUMENT" and the "WSDL" but the tabs "MESSAGES" and "EXTERNAL REFERENCES" are empty.

The ED is active but it's not available when I try to create the MESSAGE INTERFACE.

Thanks again!!!!

Rodrigo.