powershell2 new-webserviceproxy soap security header
hi,
i'm trying call web service require security header.
i try :
$appid = "username"
$apppassword = "password"
$apppassword = convertto-securestring $apppassword -asplaintext -force
$credentials = new-object -typename system.management.automation.pscredential -argumentlist $appid, $apppassword
$wsp = new-webserviceproxy -uri "file://c:\app\g.wsdl" -namespace "we" -credential $credentials
everything seems fine: "$wsp | gm" return web service methods.
when try send request, error occur:
" blahblah....'no ws-security header found' ...blahblah"
in g.wsdl, find this:
<wsp:policy xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
wsu:id="username_token">
<wsp:exactlyone>
<wsp:all>
<sp:supportingtokens xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
<wsp:policy>
<sp:usernametoken />
</wsp:policy>
</sp:supportingtokens>
</wsp:all>
</wsp:exactlyone>
</wsp:policy>
how can add security header (usernametoken) in soap request ?
thanks
jm
"jm-h" wrote in message news:54d89b12-8623-47d1-8873-b4ba7927a4a5...hi,
i'm trying call web service require security header.
Windows Server > Windows PowerShell
Comments
Post a Comment