cancel
Showing results for 
Search instead for 
Did you mean: 

Calling web service -authentication using passwordtext

Former Member
0 Kudos

Hi,

My requirement is to call a web service . WS which I consume need password type as Passwordtext.

I did following step

1.From SE80 created Enterprise Services using WSDL file.

2.In SOAMANAGER select my consumer proxy.

3.Created Logical port ZXYZ by selecting WSDL based configuration and gave WSDL url.

When I execute this proxy Iu2019m getting login error.

I check the blog /people/wolfgang.bauer2/blog/2009/07/08/call-wcf-service-net-from-sap-with-usernametoken-and-ssl

If use web.config file then I'm getting error in Method: IF_SIDL_DESERIALIZER~DESERIALIZE of program CL_SIDL_DESERIALIZER==========CP. Reason is this method check for url http://schemas.xmlsoap.org/wsdl/ in the file.

When checked the soapui using the password type as passwordtext, Soap header is formed like below and it work fine without any issue.

<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 wsu:Id="UsernameToken-1" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">

<wsse:Username>USERNAME</wsse:Username>

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

<wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">5oHK2KjEop8a6OPsl3pw6Q==</wsse:Nonce>

<wsu:Created>2011-08-17T17:58:50.068Z</wsu:Created>

</wsse:UsernameToken>

</wsse:Security>

</soapenv:Header>

Can any one help me how to pass password type as passwordtext. And also can you help me on custom binding.

Thanks in advance

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Pradeep,

My Abap skills are really limited but I can offer a suggestion to start with, you will need to explicitly add these WS-Security nodes to the SOAP header before the consumer proxy initiates the runtime call.

You do this by using the IF_WSPROTOCOL_WS_HEADER interface. Follow this thread (as well as the referenced thread where Thomas Jung gives a code example) for more detail on how to implement this in the consumer proxy:

[;

Regards, Trevor