Soap output


1 - I want to put my output field value from an RPC soap call directly in a property.
Is this possible or do I have to put the result in an element?

2 - I would also like to put another output field VALUE in an element, but how would I get it to insert after the tag and Before the tag in a new tag called ?



1. You can assign the string value of an XPath expression to a property. Example:
<set property=“” value="{/a/b}"

2. You will need to use a transformer step to
insert an element into the message.



Thanks Jason,

1 - I don’t want to put the result element in my xml document, I only need the value in a property. I have a work around by using the payload setter to create a new multi part message, add the result element to it, assign it to the property and delete the document. I just thought there might be an easier way.

2 - Like above, thought there might an easier way to do this.


Hi Jean,

Regarding number 2, the XPath api that Mediator uses does not provide a way to insert elements at a specific location relative to its siblings. You can only insert as a child of an element, and I believe the behavior is to insert it as the last child.

Best regards,

Thanks Mike and Jason, just another question on the soap gateway.

I’m currently having a problem with the solution in 1, where I put the result in my document. I’m nearly sure that at first the result element with the value was inserted into my xml document but now I can’t get it to do it again.

This is what I got previously, how do I get it to do it again?

My xml before call

My xml after call


My sequence
<?xml version="1.0" encoding="UTF-8"?>

Hi Jean,

Our SOAP expert writes:

It looks like the SOAP Gateway call is missing the XPath expression for where to map the output:


Besides that, since this is an RPC call, the element needs to exist before the result is copied. Thus the initial document should look like:

And the parameter should be:


However, in the version Mediator that just went out(7311), I added a flag to the SOAP Gateway that will create simple paths that are missing as needed. In that case, if the initial payload were:

You could use the res0 parameter as shown and add another property to the SOAP Gateway:




Thanks Jason, that is just what I was looking for.