cancel
Showing results for 
Search instead for 
Did you mean: 

SOAP RECEIVER: Possible to change the soap header request

Former Member
0 Kudos

Hi

Is it possible to change what is included in the soap header like namespaces (.. xmlns:ns="http://what.com"

Specifically I need to have the "http://Strange.org/thisis.xsd" (see below) included in the header and the <ns:pi-create> included in SOAP-ENV

.....

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:ns="http://Strange.org/thisis.xsd">

<SOAP-ENV:Body>

<ns:pi-create>

<request>

<request-data>...

....

...

</request-data>

</request>

</ns:pi-create>

</SOAP-ENV:Body>

</SOAP-ENV:Envelope>

Hope somebody can help

Cheers

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

closing this one down

mf_haq
Active Participant
0 Kudos

Hi Bowie,

1.You can change the Namespace. condition is no obj's under the namesapce then only it's possible otherwise u can't.

2.create a new namesapce what ever u want and copy all the obj's under that namesapce.finally delete the previous one.

XMLAnonymizerBean

Use

You use this module to anonymize XML elements and attributes by removing namespaces or namespace prefixes from the XML document of the main payload.

You can define a particular namespace prefix for each namespace. You can also change the encoding attribute of the XML declaration.

Integration

You can use the module in adapters that can be extended in the module processor.

Activities

Entries in the Processing Sequence

● Insert the module before the adapter module.

If the adapter comprises multiple modules, for information about the position of the module, see: Extending the Module Chain in the Module Processor

● Enter the module name AF_Modules/XMLAnonymizerBean.

● Select the Module Type Local Enterprise Bean.

● The system proposes a module key.

Entries in the Module Configuration

● anonymizer.acceptNamespaces

Enter a list of namespaces and their prefixes that are to be kept in the XML document as follows: namespace1 n1 namespace2 n2 u2026

To enter a namespace without a prefix, enter '' (two single quotation marks).

Any namespaces you do not specify are removed from the XML document.

● anonymizer.quote

Specify the character to be used to enclose the attribute values.

The default value is '. The parameter is optional.

● anonymizer.encoding

To use a code page other than UTF-8, enter it. The parameter is optional.

For example, enter ISO-8859-1.

Example

The anonymizer.acceptNamespaces parameter has the following value:

urn:sap-com:document:sap:rfc:functions rfc urn:sap-com:document:sap:soap:functions:mc-style rfc

● Payload before using the XMLAnonymizerBean:

<Z_PAYMITEM_GET_LIST

xmlns="urn:sap-com:document:sap:rfc:functions"

xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<I_ACCOUNTIDENT xmlns="">

<ACCOUNT_NUMBER>0080000094</ACCOUNT_NUMBER>

<BANK_COUNTRY>DE</BANK_COUNTRY>

<BANK_COUNTRY_ISO>DE</BANK_COUNTRY_ISO>

</I_ACCOUNTIDENT>

</Z_PAYMITEM_GET_LIST>

● Payload after using the XMLAnonymizerBean:

<?xml version='1.0' encoding='utf-8'?>

<rfc:Z_PAYMITEM_GET_LIST

xmlns:rfc='urn:sap-com:document:sap:rfc:functions'>

<I_ACCOUNTIDENT>

<ACCOUNT_NUMBER>0080000094</ACCOUNT_NUMBER>

<BANK_COUNTRY>DE</BANK_COUNTRY>

<BANK_COUNTRY_ISO>DE</BANK_COUNTRY_ISO>

</I_ACCOUNTIDENT>

</rfc:Z_PAYMITEM_GET_LIST>

with rgds,

MFH

Former Member
0 Kudos

You can use the XMLAnonymizerBean module in your SOAP receiver for your namespace requirement.

Check out : http://help.sap.com/saphelp_nw04/helpdata/en/45/d169186a29570ae10000000a114a6b/content.htm

Thanks,

Pooj