cancel
Showing results for 
Search instead for 
Did you mean: 

xCBL 4.0 in XI 3.0

Former Member
0 Kudos

Hi,

I have the task to receive a xCBL 4.0 Order document and map it to an ORDERS05 IDOC. Has anybody been able to import the xCBL 4.0 schema ordermanagement.xsd into XI?

I can import the schema, but it does not show any Messages. It includes hundreds of other schemas and I think it is not feasible to import all of them manually.

Unlike older versions xCBL 4.0 is not distributed as a single root schema.

Anybody any ideas???

Thanks in advance!

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi to all,

I am trying to import the xCBL 4.0 specification files into XI as well and I am having problems. I can't do it.

I have tried to follow the steps you have provided here but the 2 files I get (i.e. one for core and one for ordermanagement) do not upload correctly in XI.

I am still not getting any message in the "message tab" of the External definitions I am creating.

Can any of you help me? Is there a chance you could send me a copy of the files you created. The ones that are ready to be imported in XI...

It is extremely important for me to import this structure as it is a requirement for our client.

I would really appreciate your help.

Many thanks to all,

Aldo

Former Member
0 Kudos

Hi Chris/Dieter,

I'm new to xslt transformation. If possible, could you please let me know how all these Orders xsd's can be converted into single root xsd or How thsi can be imported in XI 3.0.

Any kind of help would be really great. If possible, please mail me the consolidated single root xsd to tm_santhu@yahoo.com.

Thanks in Advance,

Santhosh.

Former Member
0 Kudos

Hi Santhosh,

you need a xslt processor tool to perform the conversion.

I used the Altova processor: http://www.altova.com/altovaxml.html

It is a command line tool to perform a XSLT transformation.

You need to store the xslt definition file Chris provided before in your file system. You also have to download the xCBL library and expand the zip file somewhere in you file system.

I ran the tool twice. Once to convert core.xsd to a single root schema and once for ordermanagement.xsd

That is it.

Regards,

Dieter

Former Member
0 Kudos

Dieter,

Seems like there are 2 issues here... regardless of the includes, XI should be picking up the messages as it is simply looking for global elements.. As for getting the included files without doing it by hand (I agree, uploading all into XI would be infeasible.) - would be easier if XI followed <includes> automatically... but what you can do however is turn each xCBL namespace into a single file, which would mean you would only have to include the ordermanagement schema file and the core schema file, and perhaps the external definition schemas. I just tried this and it worked in terms of creating a valid schema with all of the content, probably doesn't solve the problem as to why XI does not recognise the global elements. I can give you the schemas I ended up with, (I used an XSLT on ordermanagement.xsd to follow each xsd:include and copy the contents) but they are big files and I don't think I can attach...

Cheers,

Chris

Former Member
0 Kudos

Dieter,

Interesting... I looked into it a little further and it seems like the problem is that uri's longer than 60 chars mean that Integration Builder does not recognise the global elements as messages..

Try it, import the following as external definition, and then add one char to the uri and try again.

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

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

xmlns="add_one_more_char_to_this_uri_and_messages_will_not_be_found"

targetNamespace="add_one_more_char_to_this_uri_and_messages_will_not_be_found"

elementFormDefault="qualified"

version="1.0" >

<xsd:element name="TestMessage" type="TestType"/>

<xsd:complexType name="TestType">

<xsd:sequence>

<xsd:element name="Test1" type="xsd:string"/>

<xsd:element minOccurs="0" name="Test2" type="xsd:string"/>

<xsd:element minOccurs="0" name="Test3" type="xsd:string"/>

</xsd:sequence>

</xsd:complexType>

</xsd:schema>

As for how to proceed, I am afraid I am not sure.. other than start an oss ticket.

Chris

Former Member
0 Kudos

Chris,

thanks for the input. I will open an OSS call regarding the 60 Char limit.

As for the schemas you created: I can receive e-mail with a maximum size of 5 MB. So, maybe you can zip the schemas and attach it to one or several e-mail.

A different approach would be if I created the schemas myself. So, maybe you can explain which tool you use and how you did it???

Thanks in advance,

Dieter

Former Member
0 Kudos

Dieter,

I include below the XSLT I used to create the joined-up schemas. Provided with the disclaimer that it is a quick kludge and I have not done any testing! (I just checked that the schema is valid and looks at a glance to be an equivalent of the original xCBL 4.0 schemas.)

You will need to run it first on ordermanagement.xsd, then on core.xsd and then it would also be easiest to alter the schemaLocations of the imports in ordermanagement so that you can just put the schemas in the same folder.

Cheers

Chris

joinschemas.xsl:

<?xml version="1.0"?>

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"

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

version="1.0">

<xsl:output method="xml" indent="yes"/>

<xsl:template match="/">

<xsl:for-each select="xsd:schema">

<xsl:copy>

<xsl:for-each select="@*">

<xsl:copy/>

</xsl:for-each>

<xsl:for-each select="xsd:import">

<xsl:copy>

<xsl:apply-templates mode="copyall" select="|@|comment()|processing-instruction()|text()"/>

</xsl:copy>

</xsl:for-each>

<xsl:for-each select="xsd:element">

<xsl:copy>

<xsl:apply-templates mode="copyall" select="|@|comment()|processing-instruction()|text()"/>

</xsl:copy>

</xsl:for-each>

<xsl:for-each select="xsd:include">

<xsl:for-each select="document(@schemaLocation)/xsd:schema">

<xsl:apply-templates mode="copyschema" select="|@|comment()|processing-instruction()|text()"/>

</xsl:for-each>

</xsl:for-each>

</xsl:copy>

</xsl:for-each>

</xsl:template>

<xsl:template mode="copyschema" match="|@|comment()|processing-instruction()|text()">

<xsl:choose>

<xsl:when test="name(.)='xsd:import'">

<xsl:message terminate="no">no need to include every import..</xsl:message>

</xsl:when>

<xsl:otherwise>

<xsl:copy>

<xsl:apply-templates mode="copyall" select="|@|comment()|processing-instruction()|text()"/>

</xsl:copy>

</xsl:otherwise>

</xsl:choose>

</xsl:template>

<xsl:template mode="copyall" match="|@|comment()|processing-instruction()|text()">

<xsl:copy>

<xsl:apply-templates mode="copyall" select="|@|comment()|processing-instruction()|text()"/>

</xsl:copy>

</xsl:template>

</xsl:stylesheet>

Former Member
0 Kudos

Hi Dieter - I believe the 60 character limit is a known issue and addressed in SP15. Regards, james

Former Member
0 Kudos

Great! It works! With a workaround given by the OSS I was able to import the schema.

Here is the workaround to avoid the 60 char limit:

You have to put all xsd's from which messages are extracted into the types section of an

enclosing WSDL. For the import of WSDL the length restriction applies to the target namespace of the WSDL, not to the target namespace of the schema.

Thanks a lot,

Dieter

Former Member
0 Kudos

Hello Dieter.

What kind of mapping are you planning to do? Graphical, XSL, Java?

Best regards,

Jacob

Former Member
0 Kudos

Jacob,

it will probably be a message mapping. Maybe XSLT. No Java. First of all I have to be able to receive a message through https post. It is no option to use a different xCBL version, because xCBL 4.0 is a customers requirement.

Best regards,

Dieter

Message was edited by: Dieter Aelker