Insert a custom header in pub.xml:documentToXMLString

Hi all,

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

[FONT=Arial][SIZE=5][FONT=Arial][SIZE=5]
[/size][/font][/SIZE][/FONT]

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

HTH

Hi,

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…

Thanks,
Sireesha.Avala

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

pub.xml:xmlStringToXMLNode
pub.xml:xmlNodeToDocument
pub.xml:documentToXMLString

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

http://advantage.webmethods.com/article/?id=SR-1-52686551
→ 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!

cheers!
nD

Hi,

I followed ur suggestion.I got below output…

<?xml version="1.0"?>
<@version>1.0/@version
<@encoding>UTF-8/@encoding
<@Siebel-Property-Set EscapeNames>false</@Siebel-Property-Set EscapeNames>
<@MessageId>1-2Y07L/@MessageId
<@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">

</SiebelMessage>

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,
Logi.