cancel
Showing results for 
Search instead for 
Did you mean: 

Remove Namespace Prefix from SOAP response

Former Member
0 Kudos

Hi

I have a File-XI-SOAP scenario. I pass data from the file to SOAP. If the data is good, I receive a Response and If the data is bad I get an fault message called AccountUtilsException. But I am not able to read this message properly.

The message we receive from the webservice is

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?><!-- Request Message Mapping --> <edu.purdue.account.AccountUtils.AccountUtilsException xsi:type='ns1:AccountUtilsException' xmlns:ns1='urn://www.purdue.edu/apps/account/ns'><message xsi:type='soapenc:string' xmlns:soapenc='http://schemas.xmlsoap.org/soap/encoding/'>lastName is a required field</message><type xsi:type='xsd:int'>5</type></edu.purdue.account.AccountUtils.AccountUtilsException>

In sxmb_moni when we try to read this message I get the error Reference to undeclared namespace prefix: 'xsi'.

I tried removing the xsi prefix using anonymizer.acceptNamespaces = urn://www.purdue.edu/apps/account/ns ns1.

I tried this too urn://www.purdue.edu/apps/account/ns ''.

the AF_MODULES/AnonymizerBean is second in my processing sequence immediately following the XISOAPAdapterBean.

The problem still persists. Any suggestions? The webservice people are not willing to remove the xsi:

Thanks,

Jahnavi

Accepted Solutions (0)

Answers (3)

Answers (3)

stefan_grube
Active Contributor
0 Kudos

The XMLAnonymizerBean does not consider namespace prefixes in attributes. So you should allow also those prefixes and namespaces which are used here.

Without the XMLAnonymizerBean the xsi namespace declaration should be available as well, if not it is a bug. Check if you have applied the latest patch and open an OSS ticket, if this is the case.

Regards

Stefan

Former Member
0 Kudos

Hi Stefan, I'm a co-worker of Jahnavi.

Are you saying that XI should be able to understand that xsi namespace, once the envelope has been stripped off without us doing anything?

We're on PI 7.0, service pack 12, if that helps at all.

Former Member
0 Kudos

Hi,

see if this link can help you

/people/sameer.shadab/blog/2005/12/05/how-to-remove-namespaces-in-mapping--xi

Sri

Former Member
0 Kudos

Hi,

I would suggest the following, maybe you can try.

Write a Simple mapping program, which regenerates the XML in case of response. Try using DOM-SAX parser based java mapping

Link : [https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/6153] [original link is broken] [original link is broken] [original link is broken];.

Replace the xsi namespace with anything you want.

Reward points if useful

Regards

Abhishek