Insert a custom header in pub.xml:documentToXMLString

Hi all,

Can anyone please help me on inserting a custom header in pub.xml:documentToXMLString


what kind of error are you getting? by hitting F1 key on the service u can find detail information on the service.



Actually issue is when I am converting a document to xml string I am getting output as below.Just I gave only first line since the issue is with this only…
<?xml version="1.0" encoding="UTF-8" Siebel-Property-Set EscapeNames="false"?>

But I need that first line as

<?xml version="1.0" encoding="UTF-8" ?>
<?Siebel-Property-Set EscapeNames="false"?>

i.e I need version and encoding fields in first line of header and the rest in second line …

So,i thought of creating a custom header to solve this issue.But dont know how to create?can you please look over the issue and tell me the appropriate solution…


If you only wants to update the header, and remove Siebel-Property-Set EscapeNames=“false”. do following step.


set the addHeader parameter to “false” in pub.xml:documentToXMLString
and add manually your Siebel header including the xml header in the string.

→ [URL][/URL]
→ also check the webMethods Integration Server Built-In Services Reference in pdf about the addHeader parameter.

Thats a cool trick… and it works!

include a new variable with @**** (name) and then pass the value with other document values.

In documentToXmlString Service there is a parameter “attrPrefix” set as \n for new line, you will get the xml version tag and ur custom header attribute in different lines.

hope it helps!



I followed ur suggestion.I got below output…

<?xml version="1.0"?>
<@Siebel-Property-Set EscapeNames>false</@Siebel-Property-Set EscapeNames>
<@IntObjectName>GEA CFM Service Request inbound IO/@IntObjectName
<@MessageType>Integration Object/@MessageType
<@IntObjectFormat>Siebel Hierarchical/@IntObjectFormat

But i need the output as below

<?xml version="1.0" encoding="UTF-8" ?>
<?Siebel-Property-Set EscapeNames="false"?>
<SiebelMessage MessageId="1-31BQD" IntObjectName="CFM Service Request Attachment IO" MessageType="Integration Object" IntObjectFormat="Siebel Hierarchical">


please tell if u have any idea…

Hi All,

Can you please help me with the including custom header to an XML file generated by WmPublic/pub.xml:documentToXMLString?

When I read about the builtin service documentToXMLString, addheader needs to be false and dtdheaderinfo can be used for custom header.

Can someone guide me with how to achieve this?

Thanks & Regards,