Hello experts,
I am trying to consume an external web service in SAP PI (Proxy -> SOAP). The web service uses SOAP 1.1 and has the following SOAP header:
<soapenv:Header>
<urn:AuthenticationInfo>
<urn:userName> </urn:userName>
<urn:password> </urn:password>
<!--Optional:-->
<urn:authentication>?</urn:authentication>
<!--Optional:-->
<urn:locale>?</urn:locale>
<!--Optional:-->
<urn:timeZone>?</urn:timeZone>
</urn:AuthenticationInfo>
</soapenv:Header>
My question is if I can fill the SOAP Header from the proxy consuming ABAP program or do I have to wrote an XSLT mapping for this?
Or, alternatively, will the SOAP Receiver adapter automatically fill the credentials if I maintain the Authentication details in the ID Communication channel?
Looking forward to your responses.
Regards..
Request clarification before answering.
Hi,
Try this: http://scn.sap.com/community/pi-and-soa-middleware/blog/2013/11/22/addsoapheaderbean-module
Best Regards,
Praveen Gujjeti
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank You Praveen.
My question is do I really have to do this? I don't want to customize the header structure as such. I only want to pass the Username and password.
While importing the external definitions, I get the soap header in the interface message type. Can't I just map this to the proxy outbound structure and send the values from the calling ABAP program?
Appreciate your answers..
Hi Amith,
If i understand you right you only want to pass-thorough the header to the ABAP proxy. You only need to set in the SOAP adapters the flag Keep Headers. Later in the ABAP proxy you can get the Header with the class IF_WSPROTOCOL_WS_HEADER. You have some examples in these threads:
Hope this helps.
Regards.
Thanks Inaki, Appreciate your response.
Aren't the examples that you have provided for Non-PI scenario? I have used this in the past to consume a WS directly in ABAP, after creating logical port, etc.
Well,in this scenario i am using PI.
The Sender in my case is a proxy (called from a BADI) and receiver would be a SOAP adapter.
What I am trying to get at is the header would be a part of my request structure - like this:
Isn't it possible to just map the oubound and inbound structures and pass the data while calling the outbound proxy?
CALL METHOD lr_proxy->execute
EXPORTING
output = output (this is where the uname and password would go)
Sorry if I have misunderstood your response.
Regards,
Amith
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.