I have done webservice using .NET 2008/framework 3,5  (WSE3 is also installed) .My webservice (let's call it MYwebserver) uses also third-party's webservice component.

This has method getSimpl(requestparam)  and  I shoud send identifiation information (username,passwor,timestamp,checksum) inside soapheader but I've no idea how to accomplish it .

SoapHeader shold looks like:

<SOAP-ENV: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">
   <wsse:UsernameToken>
    <wsse:Username>XXXXXXXXXXXX</wsse:Username>
    <wsse:Password
   Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">NNNNNNNN</wsse:Password>
   </wsse:UsernameToken>
  </wsse:Security>
  <cmn:timeStamp
   xmlns:cmn="http://www.......fi/XMLSchema/Common_4.02.xsd">2010012714454800+0200000</cmn:timeStamp>
  <cmn:checkSum
   xmlns:cmn="http://www.......
fi/XMLSchema/Common_4.02.xsd">48D703C2E5250EBB6C19701F98435196</cmn:checkSum>
 </SOAP-ENV:Header>

 

On my mind my webservice is client and thirdparty-component is server

 

I've tried to look for examples from internet but they have not works on my program.

for example :

WebService ws = new WebService(); //--> I think that this means in my case ThirdParty-components that I want to call
UsernameToken userToken;
userToken = new UsernameToken("jan", "jan", PasswordOption.SendHashed);
ws.RequestSoapContext.Security.Tokens.Add(userToke n);

 

looks quit right but when I try to write it can I notice that RequestSoapContext.. can't find

 

There are lot of same kind of examples where come's same problem

 

Thanks for advice's

 

Matti Niskasaari

matti.niskasaari@pp.inet.fi