cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

External definitions import into Message mapping

Former Member
0 Likes
1,943

Hi,

I have a DTD message in external definitions to be imported into the message mapping. But I am not able to choose the object in the mapping editor. It does not allow even if the message is a valid WSDL. The only time it allows to import into the message editor is when its an XSD.I am not sure why the external definitions in DTD or WSDL formats are not able to be imported or am I missing something??

-Ken

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Likes

Hi Ken,

I had the same problem, XI not accepting the dtd messages and the <!doctype>.

XI does not fully support every extension in the DTD standard, I had to rewrite the DTD and skip most of the fancy extensions.

<!doctype> is not supported by SAP. I created an java mapping to remove the <!doctype> when receiving the message in XI and wrote also a javamapping to add the <!doctype> when sending the message out of XI. If you are interested in de java code, send me an email and I will send it to you.

Cheers,

Frank

[email protected]

Former Member
0 Likes

Hi Frank,

Yes it would be greatly helpful, 'cos we have been breaking our head on this. My id is [email protected].

Also if we use java mapping at the beginning to remove doctype and add doctype while leaving XI, how do we do that? I would appreciate if you could specify some simple steps for it tool, as I am new to JAVA mapping?

Thanks,

Ken

Former Member
0 Likes

Hi Guys,

Thanks for all the input...I was able to solve the Doctype by doing a XSLT mapping adding Prolog also.Its a combination of both.

-Ken

Former Member
0 Likes

Hi Guys,

We are also trying to map the Purchase order ORDERS05 IDoc to a CXML purchase order. How can we convert the CXML dtd to a schema? Your help is appreciated.

Thanks,

Jay

Genentech SAP XI Team

Former Member
0 Likes

Hi Jay,

The CXML dtd is available in cxml.org and you can use any tool like Altova XMLSpy or Stylus studio to convert to the schema..Once you convert you can import into the repository using external definitions..

Hope it helps..

-Teresa

Former Member
0 Likes

Hi Guys,

Actually, we were able to generate the three xsd files for the cXML.dtd. We need to correlate the files and import them in XI. Let's see what happens.

Thanks,

Jay

Former Member
0 Likes

Thanks Teresa,

Wow - that was a fast response. We will try bringing all of the schemas into XI. At that point can we create a message for the OrderRequest.

Thanks,

Jay

Genentech SAP XI Team

Former Member
0 Likes

Hi Teresa,

I am running into issues correlating the three XSD files generated for the CXML DTD. Do you know how to relate the three files? I tried putting in the following in the first generated cxml xsd file. I am not able to validate the schema:

<xs:include schemaLocation="c:\cxml1.xsd"/>

<xs:include schemaLocation="c:\cxml2.xsd"/>

Thanks,

Jay

Genentech SAP XI Team

Former Member
0 Likes

Hi Jay,

maybe you find the description helpfull I put in

Greetings

Stephan

Former Member
0 Likes

Hi Ken

Could you explain your solution a bit more.

I know that the Prolog works off the Communication Channel but I’m not exactly sure what would go in there. And where exactly does the XSLT mapping come in?

Is it the one Udo Martens listed? How does it get pulled into the system?

Thank You for Any info

Rick

p_vanos
Active Participant
0 Likes

Hi Ken,

I have very good experiences using the tool "Stylus Studio Integration Edition". Maybe you can use this tool to generate a correct XSD from your XML files!

Cheers,

Paul

Former Member
0 Likes

Hi Ken,

now it becomes clear to me, why the DTD is not accepted as an External Definition.

Obviously the DTD contains the declaration of an element "ds:Signature".

The use of the symbol ':' indicates that XML namespaces are used.

In fact, the philosophies of DTD and XML namespaces are not compatible. This is the reason, why XI rejects DTDs that try to express namespace information.

XML Spy might be more flexible and try to convert the DTD on a heuristic base.

So if you convert the DTD to an XSD (e.g. with help of XML Spy) and then upload the XSD(s) as External Definitions, which problems do you encounter?

Greetings

Stephan

Former Member
0 Likes

Hi,

A conversion of the downloaded cXML DTD into XSD by using XMLSPY yields 3 XSD files. Using the initial XSD(which has the major fields) yields the same error(i.e cannot create messages or valid WSDL) in external definitions.

I also tried using one of the standard xml's from the cXML site and the funny part was XMLSPY validated them without errors and while importing them directly into the mapping editor, XI throws an error "XML NOT WELL FORMED". Its so weird.

Former Member
0 Likes

Hi Ken,

according to the XSDs resulting from XMLSpy I have the same question as for the DTDs:

If you load them up as External Definitions, choose the right Category and change to the WSDL-tab, what do you see?

Does it only say that it was not able to convert the imported file to WSDL or is there some more specific error message?

According to the XML document that the Mapping Tool considers not to be well-formed. Is there a more specific error message?

Can you describe in detail how to get this document from the web, such that I can test it myself?

Greetings

Stephan

Former Member
0 Likes

I think by now this must have been resolved.

But i am adding my comments to it about we could resolve the XML NOT WELL FORMED message.

Replace the XML with cXML and hit on the Recheck button in the XMLSPY and Convert it to XSD Schema, this will generate 3 XSD files which can be used in XI.

hope this helps.

p_vanos
Active Participant
0 Likes

Hi Ken,

What I usually do is import as XSD. Then use the export functionality to WSDL, and then reimport the WSDL. It seems a little bit strange but it does the trick!

Cheers,

Paul

Former Member
0 Likes

Hi Ken,

I assume there is a confusion regarding terminology.

In the Message Mapping you are allowed to import an XSD file directly from your local file system. As far as I know WSDL- and DTD-files are not allowed here.

A second possibility is to first import a file as External Definition into the Integration Builder. This file may be XSD, WSDL, or DTD (choose the correct category). This External Definition is an object of its own right. In the editor of the External Definition you can see which messages have been found in this object.

Now in a Message Mapping you can use all these messages.

You have to select them as repository objects.

Former Member
0 Likes

Thanks Stephan and PAUL,

I am able to create external definitions for WSDL and DTD formats. While importing the external defn into message mapping, those external defns. with XSD format are alone being able to get selected from repository objects while the external defns for WSDL and DTD formats are grayed out in the message mapping editor. I want to import the DTD external definition into the message mapping editor. I am able to view it but when I click it to select it I am not able to select it...Any ideas please??

-Ken

Former Member
0 Likes

Hi Ken,

in the editor for External Definitions there is a tab 'Messages'. Have you checked whether there are any Messages displayed for your External Definition?

If yes, it must be possible to select these Messages in the Message Mapping (otherwise this is a bug and you should open an OSS message).

If the Messages tab is empty, then the problem is with your External Definition (and not with the Message Mapping). In this case please check the content of the fields Category and Messages. Also check what happens if you change to the WSDL-tab.

Greetings

Stephan

Former Member
0 Likes

Hi Stephan,

Yes,you are correct the messages tab is empty.. But the DTD is a standard DTD from Ariba(cXML). Why is XI not able to import a standard DTD?

While importing the standard DTD, I am checking the WSDL tab, it gives me an "Unable to convert DTD" error whereas if I use a tool like XMLSPY, the DTD is a valid DTD...

I am just lost here...I need to get the DOCTYPE in the DTD declarations to pass through or atleast get identified, because while doing an XSD transformation the DOCTYPE is not brought over...

Any suggestions,please.

-Ken

Former Member
0 Likes

Hey Ken,

I am about to embark down the same road as you, needing to pass PO IDOC's to vendors accepting cXML. Since you are ahead of me, I have a few suggestions that I will move down in a couple of weeks, if it is not resolved on this board first.

Three suggestions:

1) If the prolog field on the HTTP communication channel is pushing everything before the XML tag, maybe you should open an OSS message regarding this since it seems to me that this is buggy.

2) You could write an XSL transformation intsead of using the mapping editor.

3) If you can't resolve the DTD issues, you may need to take the cXML examples and build your own data types and message types.

Hopefully someone with more experience will have a much more simple solution. Whatever the solution ends up being please post it here for future people!

Regards,

Chris

Former Member
0 Likes

Hi,

Yes, if we could only wish prolog could add fields in the payload rather than before payload..I guess XSL transformation could be the only suggestion making a simple mapping more complex...Do you have docs on XSL mapping? I am yet to explore XSL mapping..

Building datatypes from cXML format could be a method but the data type editor doesnt understand DTD declarations...eg : a <!DOCTYPE> tag will not be accepted because it does not begin with an alphabet but with a special character...

My 3rd party is adament on getting the <!DOCTYPE> and I am trying all possible ways to get it through XI..Funny is XSD transformation of a cXML swallows the entire <!DOCTYPE> tag..

Hope anybody would have more suggestions..

-Ken

Former Member
0 Likes

Hi Ken,

does the WSDL-tab contain any more information (e.g. why it is unable to convert the DTD)?

Can you describe me how to get the DTD from the web? Then I could investigate myself what the problem is with this DTD.

Greetings

Stephan

Former Member
0 Likes

Hi Stephan,

the main cXML DTD is at

http://www.cxml.org/files/downloads.cfm

then, download cXML 1.2.011. If you are using a different version Ken please correct me. When I try it, the WSDL gives me the following

Unable to convert imported document to WSDL

Reason: Name "ds:Signature" is incorrect

Check the selected category

Any ideas?

Chris

Former Member
0 Likes

Hi,

Yes, Richard its the same link for download...Its the same cXML version and same error that I get in the WSDL tab. I checked the compatability of XI, it can parse DTD declarations at message mapping editor, though we cant define them as tags in the Data type editor..

Any ideas? I need this DTD declaration to go through and I wish I could do it by using Message mapping and not complicate the simple mapping by XSL or ABAP mapping..

Another thought, suppose if I parse the DOCTYPE as a prolog my output looks like

"<?xml...utf-8>

<!DOCTYPE......'Cxml.org'>

<?xml.....utf-8>

<start tag></start tag>

The first 2 lines are from using the prolog of the HTTP adapter and from 3rd line the payload starts...This will fail as there is a second xml tag on line 3. Is there a way I add a prolog and remove the xml tag coming in the payload? This is a vague thought but I would like to know if its possible..

-Ken

-Ken

Former Member
0 Likes

That is a good question. I haven't been able to suppress the 2nd XML tag. What happens when you convert the DTD to XSD format in XMLSPY? That is the main thing, if we can get the DTD converted, the problem should be resolved. Then the messages would be available for message mapping. I will play around with it when I can. Have you approached the vendor about send xCBL format instead. Our first vendor is using it and it is much easier to work with from an XI perspective.

Sorry I can't be of more help right now!

Regards,

Chris

Former Member
0 Likes

Hi,

A conversion of the downloaded cXML DTD into XSD by using XMLSPY yields 3 XSD files. Using the initial XSD(which has the major fields) yields the same error(i.e cannot create messages or valid WSDL) in external definitions.

I also tried using one of the standard xml's from the cXML site and the funny part was XMLSPY validated them without errors and while importing them directly into the mapping editor, XI throws an error "XML NOT WELL FORMED". Its so weird.

Also is there a possibility to write a script to manipulate the payload message after passing through the adapters? For eg : Creating a script which will delete a valid tag in payload before it reaches the 3rd party. ...By adding the DOCTYPE in the prolog, the message would look like this :

"<?xml...utf-8>

<!DOCTYPE......'Cxml.org'>

<?xml.....utf-8>

<start tag></start tag>”

Therefore some kind of a script that would remove the second <?xml tag on line 3>..

This is just a round about thinking…

Any ideas..