cancel
Showing results for 
Search instead for 
Did you mean: 

Doctype handling in XI

Former Member
0 Kudos

I am using XI to integrate with a system that uses established XML document specifications. As part of these specs, it is required that the XML documents have a doctype specified and point to the correct .dtd file, but apparently XI doesn't support doctypes. I was able to use the Java mapping code I found in an SAP note to get XI to load the DTD for incoming messages and strip out the doctype, but I'm having trouble figuring out how to write a Java mapping that places a doctype definition on outgoing messages.

Has anyone done this in the past? If so, how?

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member190389
Active Contributor
0 Kudos

Hi,

I tried the same but mine was using an XSD .

Place the corresponding XSD in the /usr/sap/<SID>/DVEB<>/j2ee/cluster/server0 folder on the XI server.

See if it works for you.

Also , I dont remember exactly , but there is a dtd folder on server where i guess you can place the dtd file there also and give it a try.

former_member190389
Active Contributor
0 Kudos

Also if you want to strip out the doc type from xml & tthen insert it ,

then insert it in the adapter module part of receiver channel and not mapping because the later stages of XI erases the Doc type tag .

Former Member
0 Kudos

Not clear...can you please elaborate more.

Nilesh

Former Member
0 Kudos

The incoming message looks like this:

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

<!DOCTYPE GET_HOSTPING_001 SYSTEM "get_hostping_001.dtd">

<GET_HOSTPING_001>

.....

</GET_HOSTPING_001>

Originally, XI complained that it couldn't find the dtd file and failed to process the message. By following the instructions in note 812966, I was able to implement a Java mapping that loads the dtd and removes the doctype definition. This allows XI to successfully process the message.

My problem is that I need the outgoing message to contain a doctype and dtd reference as well. How do I do this?

Former Member
0 Kudos

I am trying to achieve exactly exactly the same result. It seems strange that there is no way to get this working out of the box, it is an industry standard afterall. Did you get a solution?