cancel
Showing results for 
Search instead for 
Did you mean: 

set xsi:type attribute

jawwad_sadiq2
Discoverer
0 Kudos

Hi All,

I have a requirement where I need to set the xsi:type attribute to some value before I submit the SOAP request from SAP PI. I have not been able to figure out where how to set the value of this attribute. I have an XSD that I am using to generate the request, but I do not see anywhere in the mapping tools where I can assign this value. I tried using MAP Force to do XSLT mapping but couldn't really make that happen using that either...

This is how I would like the request message type to have...

<m:sObjects xsi:type="ns3:Account" xmlns:ns3="urn:sobject.enterprise.soap.sforce.com">

but this is how it comes...

<m:sObjects>

Any tips and ideas to make this happen would be highly appreciated...

Regards,

Jawwad

Accepted Solutions (1)

Accepted Solutions (1)

former_member206760
Active Contributor
0 Kudos

may be u can edit the wsdl given by the target system...add the attribute with its value and then upload it to XI

or you can also map it to the constant you require in the message mapping...

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

You should definetely able to do this by using XSLT. just make sure the target message matches the message format given by the interface definition (XSD).

Regards,

Kai

MichalKrawczyk
Active Contributor
0 Kudos

hi,

there are at least two places where you can do it:

a) inside a mapping using XSLT

b) write an adapter module that will add this to your call and put it in receiver soap adapter

Regards,

Michal Krawczyk

jawwad_sadiq2
Discoverer
0 Kudos

Thank you all. I was able to add the xsi:type modifying the XSLT mapping as following...

<ns1:sObjects xsi:type="ns4:Account" />

Former Member
0 Kudos

Hi,

Can you send me XSL you use to do this?

Thank you very much.