Skip to Content
0

XSLT mapping help to replace the value

Apr 27, 2017 at 09:23 AM

77

avatar image

Hi,

I have a Proxy to SOAP scenario which is sync.I have a below wsdl which sends the request to target.But the target structure is expecting the structure with SOAP envelope.

Could you please help in providing the XSLT mapping code.

Input payload:

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

<ns0:insert xmlns:ns0="abc">

<record>

<a> hello </a>

<b> good </b>

</record>

</ns0:insert>

target structure is expecting the structure as below:

<?xml version="1.0" encoding="utf-8"?>

<soapenv:Envelope

xmlns:u="abc" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">

<soapenv:Body>

<u:insert>

<record>

<a> hello </a>

<b> good </b>

</record>

<u:insert>

</soapenv:Body>

</soapenv:Envelope>

Please suggest your inputs.I can able to get the above structure but could not able to replace ns0 with U.Please let me know how can we replace ns0 with U.

Thanks in Advance

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Helmut Skolaut May 04, 2017 at 06:28 PM
2

Hi... for me it looks like you not need a mapping at all. The structure within the SOAP body looks identical to your source except that you are using a different namespace prefix - but the prefix should not be a problem right?

So you setup the flow w/o a mapping :)

Share
10 |10000 characters needed characters left characters exceeded
Mark Dihiansan May 05, 2017 at 03:48 AM
1

Hi,

The SOAP adapter automatically adds the SOAP Envelope when the Do Not Use SOAP Envelope is unchecked.

Regards,

Mark

Share
10 |10000 characters needed characters left characters exceeded
Apu Das Apr 27, 2017 at 11:06 AM
0

Hi Sahithi,

You can replace use standard module XMLAnonymizerBean to put 'u'. If that will not help then simple XSLT/Java mapping can be used to create custom soap envelope as per your requirement.

Thanks,

Apu

Share
10 |10000 characters needed characters left characters exceeded