Skip to Content
avatar image
Former Member

XSLT mapping help to replace the value

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • May 04, 2017 at 06:28 PM

    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 :)

    Add comment
    10|10000 characters needed characters exceeded

  • May 05, 2017 at 03:48 AM

    Hi,

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

    Regards,

    Mark

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 27, 2017 at 11:06 AM

    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

    Add comment
    10|10000 characters needed characters exceeded