cancel
Showing results for 
Search instead for 
Did you mean: 

Add SOAP envelop with additional namespaces and remove namespaces from first fields

former_member60331
Participant
0 Kudos

Hi Experts,

I am using a wsdl for a proxy to soap synchronous scenario and I am facing an issue with the message format.

Required format :

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/" xmlns:ep4="http://demo" xmlns:ep41="http://demo1">
<soapenv:Header/>
<soapenv:Body>
<tem:PrintCertificateByContractNumber>
<!--Optional:-->
<tem:ContractNumber>121121</tem:ContractNumber>
<!--Optional:-->
<tem:Credentials>
<!--Optional:-->
<ep4:Password>xxxxxxxxxxxxxxxxxxx</ep4:Password>
<!--Optional:-->
<ep4:ResponseStatusList>
<!--Zero or more repetitions:-->
<ep41:ResponseStatus>
<!--Optional:-->
<ep41:ErrorMessage></ep41:ErrorMessage>
<!--Optional:-->
<ep41:ResponseType>Error</ep41:ResponseType>
</ep41:ResponseStatus>
</ep4:ResponseStatusList>
<!--Optional:-->
<ep4:UserName>uuuuuuuuuuuu</ep4:UserName>
<!--Optional:-->
<ep4:UserReferenceNumber>1234567890</ep4:UserReferenceNumber>
</tem:Credentials>
</tem:PrintCertificateByContractNumber>
</soapenv:Body>
</soapenv:Envelope>

Format I have :

<tem:PrintCertificateByContractNumber xmlns:tem='http://tempuri.org/' xmlns:ep4='http://demo' xmlns:ep41='http://demo1xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'>
<tem:ContractNumber>121121</tem:ContractNumber>

<tem:Credentials>
<ep4:Password>xxxxxxxxxxxxxxxxx</ep4:Password>
<ep4:ResponseStatusList>
<ep41:ResponseStatus>
<ep41:ErrorMessage/>


<ep41:ResponseType>Error</ep41:ResponseType>
</ep41:ResponseStatus>
</ep4:ResponseStatusList>
<ep4:UserName>uuuuuuuuuu</ep4:UserName>
<ep4:UserReferenceNumber>1234567890</ep4:UserReferenceNumber>
</tem:Credentials>
</tem:PrintCertificateByContractNumber>

I need the SOAP envelop with namespaces and also need to remove namespaces from <PrintCertificateByContractNumber> tag.

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member190293
Active Contributor
0 Kudos

Hi!

Are you quite sure that you need it?

Maybe you just need:

<tem:PrintCertificateByContractNumber xmlns:tem="http://tempuri.org/"> ?

Regards, Evgeniy.

0 Kudos

Hi Akash,

I would suggest adding an XSLT mapping step to your operation mapping. This way you can transform your target message the way you need. Here is some example on how to achieve this:

https://stackoverflow.com/questions/40937963/remove-selective-additional-namespace-from-selective-no...

Other useful links on how to create xsl in PI/PO:

https://blogs.sap.com/2015/03/07/how-to-create-xslt-mapping-in-sap-pi-po/

Best regards.

Michal