Ariba cXML DTD avoid unnecessary datatypes

Hi,

we are planning to integrate webemthods with Ariba by sending cXML via HTTP post to Ariba. Ariba provides a DTD file through which we can create required documenttypes. The problem is I want to create a flowservice for sending purcase order. So I have create a documenttype using DTD that ariba provides and used documenttoXMLstring to convert the document to xmlstring and then used pub.client.http to post it to Ariba.

The problem here is, the DTD Ariba is a generic one and has data type definitions for other documents as well other than purchase order ( for example PurchoutOrder mesage etc.,). So when I send the message, some unnecessary tags as well are getting added to cXML and this is causing issue in Ariba side. When I do documenttoXMLstring, can I avoid certain segments of the document ? or what is the best approach here?

Hello Naresh,

You can use setHTTPResponse to explicitly set the response which Ariba is expecting.
We did the same for one of our customer with the below in cloud.

You can refer the same and add extra headers before sending to Ariba.

Hi Bharat
Thanks for the reply. weare using integration server. I have used documenttoxmlstring and then called pub.client.http. where should i call the setHTTPResponse exactly

Hi,

you might find this link helfpul:

This lists the available Ariba DTDs as well as a possible solution how to convert the DTD into a XSD, which is more precise when it comes to validation.

Regards,
Holger