on 02-02-2011 11:09 PM
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.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
Hi
I am facing the same issue. Did you find how to set up SOAP header?
Thanks
Nash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
77 | |
11 | |
10 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.