cancel
Showing results for 
Search instead for 
Did you mean: 

How to Create DTD to import into SAP PI

Former Member
0 Kudos

Hi,

I have a DTD structure --->

<?xml version=u201D1.0u201D >

<!DOCTYPE NewDate [

<!ELEMENT NewDate (TransactionId, ActionDate, UserId,

SendingPartyType)>

<!ELEMENT TransactionId (#PCDATA)>

<!ELEMENT ActionDate (#PCDATA)>

<!ELEMENT UserId (#PCDATA)>

<!ELEMENT SendingPartyType (#PCDATA)>

]

Now I need to import this in ESR of PI 7.11 so how should I create a DTD file out of this which can be imported into ESR of PI 7.11?

I hope that we import DTD just like we import the XSD i.e. we need to have a soft-copy of the file to be imported.

Thank you,

Pankaj

Accepted Solutions (1)

Accepted Solutions (1)

rajasekhar_reddy14
Active Contributor
0 Kudos

>

> I hope that we import DTD just like we import the XSD i.e. we need to have a soft-copy of the file to be imported.

>

Yes correct, if you have a DTD structure , then import same way like XSD,but select import type dtd thats it.

Regards,

Raj

Former Member
0 Kudos

Hi,

Yes that will be the way, but my real question is now I have the structure (as in first thread), should i put the structure in a Notepad and save it as .dtd in my local system and then import?

If I do like that (Notepad - Save as .dtd - import) then I get an error in ESR saying WSDL cannot be formed.

Thank you,

Pankaj.

rajasekhar_reddy14
Active Contributor
0 Kudos

Hi ,

When ever you try to import DTD/XSD/WSDL first you have to validate the structure is well formed or not and validate it.

if it satisfy both of the conditions then import it in to PI ,then you will see WSDL too.

for this you should have some XML tools like ALTOVE XML Spy or STYLUS Studio, open you XSD using any XML tool and save it as DTD,it is well formed and valid and import it in to PI.

Regards,

Raj

Former Member
0 Kudos

Hi,

Ok. I will try to use Altova or Stylus and let you know the result.

The error in ESR is -

Unable to convert imported document to WSDL

Reason:

Declaration incorrect: "<?xml version=1.0>"Check selected category

I select - category: dtd and Messages: From the DOCTYPE.

No idea why the XML declaration is shown as incorrect.

open you XSD using any XML tool and save it as DTD

Actually i do not have the XSD, i am just given the DTD structure. I have a pdf document in which these structures are mentioned. I copy from that and try to create the DTD.

Thank you,

Pankaj.

Edited by: Pankaj Sharma XI on Sep 15, 2010 8:53 AM

rajasekhar_reddy14
Active Contributor
0 Kudos

typo mistake it is DTD

stefan_grube
Active Contributor
0 Kudos

> Declaration incorrect: "<?xml version=1.0>"Check selected category

> No idea why the XML declaration is shown as incorrect.

It is shown as incorrect, as a dtd is no XML, therefore it must not have an XML declaration.

This worked for me:

<!DOCTYPE NewDate [
<!ELEMENT NewDate (TransactionId, ActionDate, UserId, SendingPartyType)>
<!ELEMENT TransactionId (#PCDATA)>
<!ELEMENT ActionDate (#PCDATA)>
<!ELEMENT UserId (#PCDATA)>
<!ELEMENT SendingPartyType (#PCDATA)>
]>

Former Member
0 Kudos
It is shown as incorrect, as a dtd is no XML, therefore it must not have an XML declaration.

Tried it without XML declaration also, but still it failed.

Missed ">" as the closing tag and hence the errors. Now it is working fine.

Thanks a lot Sir.

Answers (0)