cancel
Showing results for 
Search instead for 
Did you mean: 

Setting up the Soap Header when consuming a web service.

Former Member
0 Kudos

Hi SDN,

I am trying to consume a web service,where I need to pass the soap header for sending the request to the sever.

I am using if_ws_protocol_ws_header->SET_REQUEST_HEADER to set the Username and Password to the soap header. After a lot of trouble shooting I came to conclusion that the Username and Password are not being updated in soap header.

I want to know how to set the soap header? I have tested the web service in the SOAP UI testing tool and it works fine taking the credentials. The webservice is using HTTPS protocol.Do we have any separate config for https. Do I need to pass the nonce and date created in the soap header for sure ? And is there any thing to be configured by basis team?

Here is what I am trying to pass:

' <soapenv:Header>'

'<wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">'

'<wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">'

'<wsse:Username>XXXXXXX</wsse:Username>'

'<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">XXXXX</wsse:Password>'

'</wsse:UsernameToken>'

' </wsse:Security>'

'/soapenv:Header>'

Thank you.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

I want to know how to set the soap header?

Several threads on SDN already addressing question raised by you. Please see example here: sample code and refrences are also given.

Do we have any separate config for https

Yes, in SOAMANAGER you can select HTTPS protocol instead of HTTP (in "transport setting" tab)

Do I need to pass the nonce and date created in the soap header for sure ?

No, not required, timestamp will be added by runtime.

Regards,

Gourav

PS: please search SCN first before posting.

Former Member
0 Kudos

CONCATENATE

'<soapenv:Header>'

'<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"'

'xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"'

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

'<wsse:UsernameToken>'

'<wsse:Username>XXXXXX</wsse:Username>'

'<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">XXXXXX</wsse:Password>'

'<wsse:Nonce>' XXXXX'</wsse:Nonce>'

'<wsu:Created>' XXXXX '</wsu:Created>'

'</wsse:UsernameToken>'

'</wsse:Security>'

'</soapenv:Header>'

INTO l_string.

I solved my self and its working , Here is what I was passed.

Thank you guys.

Former Member
0 Kudos

i got same issue..please replay how to resolve the issue

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi

I am facing the same issue. Did you find how to set up SOAP header?

Thanks

Nash