cancel
Showing results for 
Search instead for 
Did you mean: 

Handling the Additional Namespace as Prefix in Response message

jagesh_lakdawala
Active Participant
0 Kudos

Hello Experts,

I have a Scenario lets say SAP ECC to PI to Thirs Party server in a Synchronous mode.

On receiver side SOAP Receiver Adapter is used for accessing the Web service in Sych mode.

I am working on PI 7.1.

Issue:

In Response message, from Third Party server to PI, additional Namespace is coming as prefix for all the Elements a shown below.

For example:-

<ns0:OrderpromisingESAIResponse xmlns:ns0="checkWSDL" Status="Success" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

<ns0:CUSTOMER_ORDER>

<ns0:SalesOrderId>0008000118</ns0:SalesOrderId>

<ns0:SalesChannel>1</ns0:SalesChannel>

<ns0:SalesOrderLine>

<ns0:SalesOrderLineID>000010</ns0:SalesOrderLineID>

</ns0:SalesOrderLine>

<ns0:ErrorMessage>Allocation Code is not present</ns0:ErrorMessage>

</ns0:CUSTOMER_ORDER>

</ns0:OrderpromisingESAIResponse>

Here additional Tags are coming starting from the Node CUSTOMER_ORDER, beacause as per the given WSDL file by the Third Part Team, there should not be any Namespace as Prefix from Node CUSTOMER_ORDER.

Due to this, Mapping error is coming in Response message mapping object at node CUSTOMER_ORDER.

please suggest.

Regards

Jagesh

Accepted Solutions (1)

Accepted Solutions (1)

PriyankaAnagani
Active Contributor
0 Kudos

Hi,

Use XMLAnonymizerBean to remove the namespace prefix.

Regards,

Priyanka

jagesh_lakdawala
Active Participant
0 Kudos

Hi Priyanka,

Thanks for your reply.

Is this Module applicable in case of SOAP receiver Adapter also?

here in my case, i want to remove the adiitional Prefixes from the Node CSUTOMER_ORDER.

As per the Response message structure defined in the given WSDL, Namespace prefix is desirable in the Root Node but not for the subsequent Elements.

This is what i want:

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

<ns0:OrderpromisingESAIResponse Status="" xmlns:ns0="checkWSDL">

<CUSTOMER_ORDER>

<SalesOrderId/>

<SalesChannel/>

<ErrorMessage/>

</CUSTOMER_ORDER>

</ns0:OrderpromisingESAIResponse>

Regards,

Jagesh

PriyankaAnagani
Active Contributor
0 Kudos

Hi,

>>>Is this Module applicable in case of SOAP receiver Adapter also

Yes....You can use the XMLAnonymizerBean module in your SOAP receiver.

Regards,

Priyanka

jagesh_lakdawala
Active Participant
0 Kudos

Hi Priyanka,

yes.. true i configured the same as per the suggested Blog and SAP Note mentioned within this Blog.

I have observed the below points after configuring the SOAP Receiver with this module

(1)it is modifying the SOAP request message also. which is not required here

(2)it works for the entire Response message, but i want to remove prefixes from all the Elements except the Root Node

due to these, unfortunately i can't use this module.

please suggest other alternative.

Thanks & Regards

Jagesh

PriyankaAnagani
Active Contributor
0 Kudos

Hi,

Another alternative could be java or xslt mapping...Please go through this link for java mapping basics.

Regards,

Priyanka

baskar_gopalakrishnan2
Active Contributor
0 Kudos

>(2)it works for the entire Response message, but i want to remove prefixes from all the Elements except the Root Node

Yes, if you want to add or remove namespace prefix entirely or evenly then you can use XMLAnonymizerBean. you can use XSLT mapping to achieve this.

jagesh_lakdawala
Active Participant
0 Kudos

Hi,

Unfortunately, error comes in the fly, i.e. SOAP response message when enters into the PI Box and even it is not reaching upto the Response message mapping object in PI. So use of any ther mapping Techniques wont work here.

Anyway thanks for help and efforts.

Regards,

Jagesh

jagesh_lakdawala
Active Participant
0 Kudos

Hello,

Instead of editing the Response message through the SOAP receiver Adapter, i have modified the imported WSDL file by adding the attribute 'elementFormDefault="qualified' in the Target Schema Element, i.e. inside the <XSD:SCHEMA> tag.

This addition of elements automatically puts the Prefix for all the Elements in a Request and Response message strutcure at the Inbound side.

Thanks for your help.

Regards

Jagesh

Answers (0)