marcin.motyka [
https://community.jboss.org/people/marcin.motyka] created the discussion
"Re: Policy not supported problem"
To view the discussion, visit:
https://community.jboss.org/message/775959#775959
--------------------------------------------------------------
I give additional information.
Policy section in WSDL file:
<wsp:Policy orawsp:provides="{
http://docs.oasis-open.org/ns/opencsa/sca/200903
http://docs.oasis-open.org/ns/opencsa/sca/200903}authentication, {
http://docs.oasis-open.org/ns/opencsa/sca/200903
http://docs.oasis-open.org/ns/opencsa/sca/200903}clientAuthentication, {
http://docs.oasis-open.org/ns/opencsa/sca/200903
http://docs.oasis-open.org/ns/opencsa/sca/200903}clientAuthentication.mes..., {
http://schemas.oracle.com/ws/2006/01/policy
http://schemas.oracle.com/ws/2006/01/policy}token.usernamePassword"
wsu:Id="wss_username_token_service_policy" xmlns:wsp="
http://schemas.xmlsoap.org/ws/2004/09/policy
http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns="
http://schemas.xmlsoap.org/ws/2004/09/policy
http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:orawsp="
http://schemas.oracle.com/ws/2006/01/policy
http://schemas.oracle.com/ws/2006/01/policy" xmlns:wsu="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utilit...
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utilit...
xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance
http://www.w3.org/2001/XMLSchema-instance">
<sp:SupportingTokens xmlns:sp="
http://schemas.xmlsoap.org/ws/2005/07/securitypolicy
http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
<wsp:Policy>
<sp:UsernameToken sp:IncludeToken="
http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysT...
http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysT...
<wsp:Policy>
<sp:WssUsernameToken10/>
</wsp:Policy>
</sp:UsernameToken>
</wsp:Policy>
</sp:SupportingTokens>
</wsp:Policy>
I create SOAP header programatically with this code:
final SOAPElement security = header.addChildElement("Security",
"wsse",
"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd");
final SOAPElement userToken = security.addChildElement("UsernameToken",
"wsse");
userToken.addChildElement("Username", "wsse").addTextNode(userName);
userToken.addChildElement("Password",
"wsse").addAttribute(envelope.createName("Type"),
"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText")
.addTextNode(userPass);
--------------------------------------------------------------
Reply to this message by going to Community
[
https://community.jboss.org/message/775959#775959]
Start a new discussion in JBoss Web Services at Community
[
https://community.jboss.org/choose-container!input.jspa?contentType=1&...]