cancel
Showing results for 
Search instead for 
Did you mean: 

How to remove XML namespace in SOAP request

steve_coombes
Participant
0 Kudos

Hello

I would like to change one of our existing interfaces to use a SOAP communication channel rather than File. The file currently contains FIDCCP02 Idocs.

I have created a new communication channel using SOAP 7.1 and generated a Java client. When I send a request to the endpoint from Java, PI returns a SOAP fault.

Error

The error in the monitor is 'No standard agreement found for ..'. I think this is because the file contains XML with a root element with no namespace, but the root element in the SOAP message does have a namespace.

Example requests

File message :

<FIDCCP02 xmlns:ns2="http://dorsetcc.gov.uk/FIN_I26/Invoice/PremierFin" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">

SOAP message :

<ns2:FIDCCP02 xmlns:ns2="http://dorsetcc.gov.uk/FIN_I26/Invoice/PremierFin" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">

...

When I send a test request from RWB with no namespace it is successful.

Attempt to remove namespace

I have tried adding AF_Modules/XMLAnonymizerBean with no parameters as the first module on the SOAP communication channel, but this does not appear to make any difference. I have refreshed the cache.

regards

Steve

Accepted Solutions (1)

Accepted Solutions (1)

iaki_vila
Active Contributor
0 Kudos

Hi Steve,

Have you checked this blog:

You can try with a XSL mappimg, check this thread

Regards,

steve_coombes
Participant
0 Kudos

Hello Iñaki

Thanks for your reply.

I had read the blog about the XMLAnonymizerBean. It looks very straightforward, and in theory should do just what I need.

I've added the anonymizer bean as the first module as the SOAP message is asynchronous, and I want to remove the namespaces from the request.

I want to exclude all namespaces so I haven't set any parameters.

The SOAP channel in Communication Channel monitor has a status of 'Channel Started but inactive'. I cannot see any messages in the Processing Details for this channel, even though I have sent test messages from Java code and from RWB (the message from RWB without the namespace does reach the receiver). This makes me wonder if I have not configured the interface to use the new SOAP channel correctly, although I can see it in the Receiver Determination configuration overview.

I can see the messages in SXMB_MONI but can't find which communication channel is being used by the sender.

I'm using PI 7.1.

regards

Steve

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Steve,

As far as I know modules do not work with Sender SOAP Adapter. You need to use XSLT or Java mapping to remove the namespace.

Regarsd,

Mark

iaki_vila
Active Contributor
0 Kudos

Hi,

I think Mark is right, i dont remeber in the documentation the possibility to extend the Sender SOAP adapter, only Sender SOAP Axis. If you want a generic XSL to remove all namespaces you ca use the pointed in this thread 

Regards.

steve_coombes
Participant
0 Kudos

Many thanks Mark and Iñaki. I think you are right - it isn't possible.

In the documentation it explains how to add modules to the AXIS adapter, but not how to add modules to the SOAP adapter.

regards

Steve


Answers (0)