M
Maxim
Hello, everybody!
I need to connect to a WebService, that requires authentication. From
service description page I have found that SOAP request header should be as
follows:
<SOAP-ENV:Header>
<wsse:Security
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecuri
ty-secext-1.0.xsd">
<wsse:UsernameToken>
<wsse:Username>username</wsse:Username>
<wsseassword>password</wsseassword>
</wsse:UsernameToken>
</wsse:Security>
</SOAP-ENV:Header>
I have tried to use the following code snippet:
service.Credentials = new NetworkCredential(tbUsername.Text,
tbPassword.Text);
service.PreAuthenticate = true;
But it doesn't work.
WebService has sample code but it uses NET Framework 1.1 and
Web Service Enhancements 2.0. While I'm using CF2.
So how should I authenticate my request?
Or is there any possibility to get and modify the SOAP request just before
it is posted to a WebService?
Thanks in advance.
I need to connect to a WebService, that requires authentication. From
service description page I have found that SOAP request header should be as
follows:
<SOAP-ENV:Header>
<wsse:Security
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecuri
ty-secext-1.0.xsd">
<wsse:UsernameToken>
<wsse:Username>username</wsse:Username>
<wsseassword>password</wsseassword>
</wsse:UsernameToken>
</wsse:Security>
</SOAP-ENV:Header>
I have tried to use the following code snippet:
service.Credentials = new NetworkCredential(tbUsername.Text,
tbPassword.Text);
service.PreAuthenticate = true;
But it doesn't work.
WebService has sample code but it uses NET Framework 1.1 and
Web Service Enhancements 2.0. While I'm using CF2.
So how should I authenticate my request?
Or is there any possibility to get and modify the SOAP request just before
it is posted to a WebService?
Thanks in advance.