cancel
Showing results for 
Search instead for 
Did you mean: 

Problem to import IBM .XSD in SAP PI 7.11

Former Member
0 Kudos

I can't impot the follow .XSD in SAP PI, the system shows Name of element codigo-ISO-4217-Alfabetico contains errors:

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

<xsd:schema attributeFormDefault="unqualified"

elementFormDefault="unqualified"

targetNamespace="http://grupobancolombia.com/ents/ContableAdministrativa/Moneda/CodigoMoneda/V1.0"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<xsd:complexType name="CodigoMoneda">

<xsd:sequence>

<xsd:choice>

<xsd:element minOccurs="1" name="codigo-ISO-4217-Alfabetico">

<xsd:simpleType>

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

<xsd:pattern value="\w\w\w"></xsd:pattern>

</xsd:restriction>

</xsd:simpleType>

</xsd:element>

<xsd:element minOccurs="1" name="codigo-ISO-4217-Numerico">

<xsd:simpleType>

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

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

</xsd:restriction>

</xsd:simpleType>

</xsd:element>

</xsd:choice>

</xsd:sequence>

</xsd:complexType>

</xsd:schema>

What can I do to build that Element in Data Type and the interface works?. That Element is a sender part in scenary SOAP to SOAP.

Thanks

Accepted Solutions (0)

Answers (3)

Answers (3)

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,

The xsd is well-formed but it will be unable to display any message type because it is lacking two specifications:

1.) xmlns="yournamespace" attribute in your schema declaration

2.) and at the end of the last complexType, a declaration something like this is missing: <xsd:element name="CodigoMoneda" type="CodigoMoneda" />

Here is the edited xsd which you can import in PI


<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns="http://grupobancolombia.com/ents/ContableAdministrativa/Moneda/CodigoMoneda/V1.0"  attributeFormDefault="unqualified"
elementFormDefault="unqualified"
targetNamespace="http://grupobancolombia.com/ents/ContableAdministrativa/Moneda/CodigoMoneda/V1.0"
>
<xsd:complexType name="CodigoMoneda">
<xsd:sequence>
<xsd:choice>
<xsd:element minOccurs="1" name="codigo-ISO-4217-Alfabetico">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:pattern value="\w\w\w"></xsd:pattern>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element minOccurs="1" name="codigo-ISO-4217-Numerico">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:pattern value="\d\d\d"></xsd:pattern>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:choice>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="CodigoMoneda" type="CodigoMoneda" />
</xsd:schema>

Hope this helps,

Mark

Edited by: Mark Dihiansan on Sep 7, 2011 4:58 AM

Former Member
0 Kudos

The SAP PI shows:

Check Result for Object CodigoMoneda

Name of element codigo-ISO-4217-Alfabetico contains errors:

Name contains invalid characters: - Only a(A)-z(Z), 0-9, and "_" are permitted

Name of element codigo-ISO-4217-Numerico contains errors:

Name contains invalid characters: - Only a(A)-z(Z), 0-9, and "_" are permitted

The problem is, if I change the elment codigo-ISO-4217-Alfabetico to codigo_ISO_4217_Alfabetico I can build the interface, but the IBM receiver don't understand the squema when I try to send data from SAP PI to IBM receiver.

Former Member
0 Kudos

Hi Leo,

I was able to load the XSD easily with couple of changes

1. Reduced the length of xmlnamespace

2. added an element to cover the message

Try and let me know

<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://grupobancolombia.com/CodigoMoneda/V1.0" targetNamespace="http://grupobancolombia.com/CodigoMoneda/V1.0" elementFormDefault="unqualified" attributeFormDefault="unqualified">
	<xsd:element name="CodigoMoneda" type="CodigoMoneda"/>
	<xsd:complexType name="CodigoMoneda">
		<xsd:sequence>
			<xsd:choice>
				<xsd:element name="codigo-ISO-4217-Alfabetico" minOccurs="1">
					<xsd:simpleType>
						<xsd:restriction base="xsd:string">
							<xsd:pattern value="\w\w\w"/>
						</xsd:restriction>
					</xsd:simpleType>
				</xsd:element>
				<xsd:element name="codigo-ISO-4217-Numerico" minOccurs="1">
					<xsd:simpleType>
						<xsd:restriction base="xsd:string">
							<xsd:pattern value="\d\d\d"/>
						</xsd:restriction>
					</xsd:simpleType>
				</xsd:element>
			</xsd:choice>
		</xsd:sequence>
	</xsd:complexType>
</xsd:schema>

Regards

Ramesh

Former Member
0 Kudos

Can you put the changes here? because I don't see your indications

Thanks

Former Member
0 Kudos

1st Change

Before
http://grupobancolombia.com/ents/ContableAdministrativa/Moneda/CodigoMoneda/V1.0

After 
http://grupobancolombia.com/CodigoMoneda/V1.0

2nd Change

I have included 
	<xsd:element name="CodigoMoneda" type="CodigoMoneda"/>
before complex type declaration

Are you able to load it now??

regards

Ramesh

Former Member
0 Kudos

I import your indication in SAP PI and the system shows when I try to activate the Data Type

Check Result for Object CodigoMoneda

Name of element codigo-ISO-4217-Alfabetico contains errors:

Name contains invalid characters: - Only a(A)-z(Z), 0-9, and "_" are permitted

Name of element codigo-ISO-4217-Numerico contains errors:

Name contains invalid characters: - Only a(A)-z(Z), 0-9, and "_" are permitted

Former Member
0 Kudos

I am sorry, i was trying in PI 7.0

rgds,

Ramesh

Former Member
0 Kudos

Hi Leo,

You build the xsd using _ only and during mapping with the help of XSLT mapping option change the name from _ to -

Hope it fixes your problem.

regards

Ramesh

Former Member
0 Kudos

How can I do that? can you send me a XSLT example?

Edited by: leocelis2000 on Sep 8, 2011 10:07 PM

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,

I think I now know your problem. You are trying to create/replicate the structure of an xsd using data types but the dashes are not allowed in the message editor. Why not just import the xsd as an external definition instead? You can use notepad to save the xsd that we have provided earlier (save as all files and with a .xsd extension).

Hope this helps,

Mark

Former Member
0 Kudos

Hi leo,

Check out the following thread for XSLT mapping.

Also make use of the website http://www.w3schools.com

rgds

Ramesh

Former Member
0 Kudos

I think, the name codigo-ISO-4217-Alfabetico with "-" has problems. If I create the Data Type manually whitout "-" the interface doesn't work

Former Member
0 Kudos

Hello,

The XSD seems to be very much well-formed and valid. I am not sure why you are facing that error.

Try building the Data Type similar to that of XSD and try.

regards

Ramesh