# createTarget in a Mediator sequence

**URL:** <https://techcommunity.softwareag.com/t/createtarget-in-a-mediator-sequence/59529>\
**Category:** Forum\
**Tags:** Former-Crossvision-Products, Service-Orchestrator\
**Created:** [December 6, 2005, 3:21am UTC](https://techcommunity.softwareag.com/t/createtarget-in-a-mediator-sequence/59529 "2005-12-06T03:21:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jj1](https://avatars.discourse-cdn.com/v4/letter/j/c68b51/32.png) [@jj1](https://techcommunity.softwareag.com/u/jj1)\
**Post date:** [December 6, 2005, 3:21am UTC](https://techcommunity.softwareag.com/t/createtarget-in-a-mediator-sequence/59529/1 "2005-12-06T03:21:13Z")

</div>

Trying to perform a set using createTarget in a Mediator sequence. When the destination node exists, it works fine and is set correctly. But if the destination node is not present, then I get an error. In the help text for the set sequence statement it states :-  
Use the createTarget property to specify and create, if necessary, the destination node in the message payload where the set value should be stored. If a current payload is not identified during sequence processing or if the current payload is empty, Mediator creates it. If any part of the specified path (except the root node) is missing, Mediator creates it.

The properties and values for the set statement are :-  
createTarget := ‘/_[name()=‘Request’]/_[name()=‘ApplicationHeader’]/_[name()=‘ApplCustAuditISN’][2]/text()’  
value := '{/_[name()=‘Request’]/_[name()=‘Response’]/_[name()=‘ApplCustAuditISN’][2]/text()}’

The error I get is :-  
Mediator Internal Error: org.w3c.dom.DOMException: INVALID\_CHARACTER\_ERR: An invalid or illegal XML character is specified.

---

<div class="post-metadata">

**Author:** ![Matthew](https://avatars.discourse-cdn.com/v4/letter/m/ed655f/32.png) [@Matthew](https://techcommunity.softwareag.com/u/Matthew)\
**Post date:** [December 8, 2005, 7:51pm UTC](https://techcommunity.softwareag.com/t/createtarget-in-a-mediator-sequence/59529/2 "2005-12-08T19:51:49Z")

</div>

I think this would work much better if you were to specify an absolute path for the target.

---

<div class="post-metadata">

**Author:** ![jj1](https://avatars.discourse-cdn.com/v4/letter/j/c68b51/32.png) [@jj1](https://techcommunity.softwareag.com/u/jj1)\
**Post date:** [December 21, 2005, 11:37am UTC](https://techcommunity.softwareag.com/t/createtarget-in-a-mediator-sequence/59529/3 "2005-12-21T11:37:57Z")

</div>

This was a namespace problem need to define default name space in path

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 2:39pm UTC](https://techcommunity.softwareag.com/t/createtarget-in-a-mediator-sequence/59529/4 "2021-04-02T14:39:53Z")

</div>


