implementing Ws-security within WCF proxy

Posted by harrisonmeister on Stack Overflow See other posts from Stack Overflow or by harrisonmeister
Published on 2010-05-31T17:44:01Z Indexed on 2010/05/31 18:53 UTC
Read the original article Hit count: 385

Filed under:
|
|
|

Hi, I have imported an axis based wsdl into a VS 2008 project as a service reference.

I need to be able to pass security details such as username/password and nonce values to call the axis based service.

I have looked into doing it for wse, which i understand the world hates (no issues there)

I have very little experience of WCF, but have worked how to physically call the endpoint now, thanks to SO, but have no idea how to set up the SoapHeaders as the schema below shows:

<S:Envelope 
  xmlns:S="http://www.w3.org/2001/12/soap-envelope"
  xmlns:ws="http://schemas.xmlsoap.org/ws/2002/04/secext">
    <S:Header>
        <ws:Security>
            <ws:UsernameToken>
                <ws:Username>aarons</ws:Username>
                <ws:Password>snoraa</ws:Password>
            </ws:UsernameToken>
        </wsse:Security>
        •••
    </S:Header>
    •••
</S:Envelope>

Any help much appreciated

Thanks, Mark

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about visual-studio