Question : How to send soadheader

I have webservice which use third-party's webservice component. This has method
getSimpl
I shoud send identifiation information (username,passwor,timestamp,checksum) inside soapheader but I've no idea how to accomplish it .

Format of soapheader shoul be :


 xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 
     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">
   
    XXXXXXXXXXXXername>
       Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">NNNNNNNNe:Password>
   

 
     xmlns:cmn="http://www.somebody.fi/XMLSchema/test_4.02.xsd">2010012714454800+0200000mn:timeStamp>
     xmlns:cmn="http://www.somebody.fi/XMLSchema/test_4.02.xsd">48D703C2E5250EBB6C19701F98435196:checkSum>
 

 
      xmlns="http://www.somebydy.fi/test/">
   http://www.someboyd.fi/XMLSchema/test_Request_4.02.xsd">
    testtest:endUser>
    010100-123D</ns1:personId>
    1e>
    Testi:searchName>
    FIlanguageCode>
    TAP1et>
    SIMP1l>
   

 
 


getSimp method has requesttype parameter which has enduser,personid .. fields and
the format of method is:
responseclass=getsimpl(requesttypeclass).
How to create this kind of soap header AND how to definat my  own webmethon (which runs getsiml) vso that soapheader with identificatio-information and method-parameters will be passed on server????

Matti Niskasaari

Answer : How to send soadheader

I believe you are  using .NET platform, based on the .net version you are using there are two different WSE version available which stand for Web Services Security Extension.

The SOAP header shown in the above SOAP msg is WS-UserNameToken which is a standard way to pass on the credentials across webservices.

See this for more details
http://www.nxtgenug.net/Article.aspx?ArticleID=57
Random Solutions  
 
programming4us programming4us