cancel
Showing results for 
Search instead for 
Did you mean: 

how to change soap header in xml

Former Member
0 Kudos

some one know how can i change the SOAP:mustUnderstand="1" to SOAP:mustUnde

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi

you could change the SOAP header details with DynamicConfiguration which is available by an API

soapMsg.append("<SOAP-ENV:Header>");

soapMsg.append("<SAP:DynamicConfiguration xmlns:SAP=\"http://sap.com/xi/XI/Message/30\" xmlns:SOAP=\"http://schemas.xmlsoap.org/soap/envelope/\" SOAP:mustUnderstand=\"1\">");

soapMsg.append("<SAP:Record namespace=\"http://sap.com/xi/XI/System/SOAP\" name=\"SRmsUser\">test</SAP:Record>");

This code snip shows Java client code to add an element to the SOAP header which corresponds to the DynamicConfiguration. In XI it will be accessable using the respective API.

Former Member
0 Kudos

Hi,

you could use the below alternative solution also as some Web services do not accept the message , if Content type is application/XML in the HTTP Header, it will accept only Text/XML. So While calling the Web service, the content has to be changed, This is possible using Module of the adapter as shown in the screen shot.

HTTP Header field values before using the module

User-Agent: SAP-Messaging-com.sap.aii.messaging/1.0505

content-id: payload-45A352A90948582CE1000000CDEFD4B7@sap.com

content-type: application/xml

Content-Length: 1280

Module name - localejbs/AF_Modules/MessageTranspormationBean

Type - Local Enterprise Bean Module - This is defined by the user, but the same name should be given in the module configuration for passing the parameters. In this case “transform” In the module configuration ,

Module key - In this case “transform”

Parameter name - Transform.ContenType

Parameter Value - text/xml;charset=utf-8

Here you could use the required parameters and pass the values....:-))

Thanks

Swarup