I have few questions ,i want to send data from one TP to another through xml gateway and both the sides we need xml payload and we are using the custom doc protocol .First of all you need to deploy a composite with AppsAdapter which should pull messages from XMLGateway and then transform it to the B2B message format (if formats are different). This composite should pass the transformed message with required B2B headers to B2B. At B2B, you need to create and deploy the agreement.
Do i need ecs file for this ?No. For custom XML documents, you do not need ecs, instead you should have the XSD of the XML.
I want to add custom headers (remote TP need those ) ,how to add those if i don't use .ecs file ?If you want to include the headers in the payload then corresponding XSD should have the elements defined for it. If you want to add HTTP transport headers then in HTTP channel you need to provide the headers in Additional Transport Headers section.