You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are two ways to write the actual XML message body in a ws:send action :
<data> which is of type xs:string
<payload> which allows a arbitrary XML structure
To write the XML SOAP header in a ws:send action there is only <data>. This means that you must always wrap the XML structure in a CDATA tag.
I see no reason why <payload> is not allowed in a <header> tag.
Solution
Allow <payload> as child of <header>.
Example
<!-- Currently this is how you have to define a SOAP message -->
<ws:sendendpoint="someEndpoint">
<message>
<payload>
<someXmlStructure>
...
</someXmlStructure>
</payload>
</message>
<header>
<data>
<![CDATA[ <someHeaderXmlStructureEnclosedInCDATA> ... </someHeaderXmlStructureEnclosedInCDATA>]]>
</data>
</header>
</ws:send>
<!-- This should be possible -->
<ws:sendendpoint="someEndpoint">
<message>
<payload>
<someXmlStructure>
...
</someXmlStructure>
</payload>
</message>
<header>
<payload><!-- this is currently not possible -->
<someHeaderXmlStructure>
...
</someHeaderXmlStructure>
</payload>
</header>
</ws:send>
The text was updated successfully, but these errors were encountered:
christophd
changed the title
<header> does not allow <payload> child element (like <message> does)
Support header child elements (like payload in message element)
Jun 29, 2017
Background
Citrus version:
2.7.1
Problem
There are two ways to write the actual XML message body in a
ws:send
action :<data>
which is of typexs:string
<payload>
which allows a arbitrary XML structureTo write the XML SOAP header in a
ws:send
action there is only<data>
. This means that you must always wrap the XML structure in aCDATA
tag.I see no reason why
<payload>
is not allowed in a<header>
tag.Solution
Allow
<payload>
as child of<header>
.Example
The text was updated successfully, but these errors were encountered: