cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Colm O hEigeartaigh <cohei...@apache.org>
Subject Re: Eclipse, CXF and WS-SecurityPolicy
Date Mon, 16 Dec 2013 10:58:19 GMT
You are using the older "action" based configuration for WS-Security.
Instead, you need to use the configuration values for WS-SecurityPolicy. I
suggest starting here:




On Fri, Dec 13, 2013 at 12:50 PM, marudu <mathavan.00@gmail.com> wrote:

> Hi all,
>
> i make a web service client using CXF. how do i configure security policy
> in
> WSS4j Interceptor?
> *
> The message in Eclipse is:*
>
>
> WARNING: Interceptor for
> {
> http://edt.health.ontario.ca/}EDTService#{http://edt.health.ontario.ca/}list
> has thrown exception, unwinding now
> org.apache.cxf.ws.policy.PolicyException: None of the policy alternatives
> can be satisfied.
>         at
>
> org.apache.cxf.ws.policy.EffectivePolicyImpl.chooseAlternative(EffectivePolicyImpl.java:192)
>         at
>
> org.apache.cxf.ws.policy.EffectivePolicyImpl.chooseAlternative(EffectivePolicyImpl.java:185)
>         at
>
> org.apache.cxf.ws.policy.EffectivePolicyImpl.initialise(EffectivePolicyImpl.java:92)
>         at
>
> org.apache.cxf.ws.policy.PolicyEngineImpl.getEffectiveClientRequestPolicy(PolicyEngineImpl.java:200)
>         at
>
> org.apache.cxf.ws.policy.PolicyOutInterceptor.handle(PolicyOutInterceptor.java:98)
>         at
>
> org.apache.cxf.ws.policy.AbstractPolicyInterceptor.handleMessage(AbstractPolicyInterceptor.java:44)
>         at
>
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)
>         at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:565)
>         at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:474)
>         at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:377)
>         at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:330)
>         at
> org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
>         at
> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
>         at com.sun.proxy.$Proxy67.list(Unknown Source)
>         at demo.wssec.client.Client.main(Client.java:178)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>         at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:606)
>         at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:291)
>         at java.lang.Thread.run(Thread.java:724)
>
>
> this is wsdl file :
>
> This XML file does not appear to have any style information associated with
> it. The document tree is shown below.
> <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> xmlns:soap11="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
> xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
> xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
> xmlns:wsp="http://www.w3.org/ns/ws-policy"
> xmlns:wsp200409="http://schemas.xmlsoap.org/ws/2004/09/policy"
> xmlns:wsp200607="http://www.w3.org/2006/07/ws-policy"
> xmlns:ns0="http://edt.health.ontario.ca/"
> targetNamespace="http://edt.health.ontario.ca/">
> <wsdl:types xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> <xsd:schema>
> <xsd:import schemaLocation="EDTService.xsd2.xsd"
> namespace="http://ebs.health.ontario.ca/"/>
> <xsd:import schemaLocation="EDTService.xsd3.xsd"
> namespace="http://ebs.health.ontario.ca/"/>
> <xsd:import schemaLocation="EDTService.xsd4.xsd"
> namespace="http://edt.health.ontario.ca/"/>
> <xsd:import schemaLocation="EDTService.xsd6.xsd"
> namespace="http://idp.ebs.health.ontario.ca/"/>
> <xsd:import schemaLocation="EDTService.xsd5.xsd"
> namespace="http://msa.ebs.health.ontario.ca/"/>
> </xsd:schema>
> </wsdl:types>
> <wsdl:message name="delete">
> <wsdl:part xmlns:xsns="http://edt.health.ontario.ca/" name="parameters"
> element="xsns:delete"/>
> </wsdl:message>
> <wsdl:message name="deleteResponse">
> <wsdl:part xmlns:xsns="http://edt.health.ontario.ca/" name="parameters"
> element="xsns:deleteResponse"/>
> </wsdl:message>
> <wsdl:message name="download">
> <wsdl:part xmlns:xsns="http://edt.health.ontario.ca/" name="parameters"
> element="xsns:download"/>
> </wsdl:message>
> <wsdl:message name="downloadResponse">
> <wsdl:part xmlns:xsns="http://edt.health.ontario.ca/" name="parameters"
> element="xsns:downloadResponse"/>
> </wsdl:message>
> <wsdl:message name="EBSHeader">
> <wsdl:part xmlns:xsns="http://ebs.health.ontario.ca/"
> name="ebsrequest_header" element="xsns:EBS"/>
> </wsdl:message>
> <wsdl:message name="faultexception">
> <wsdl:part xmlns:xsns="http://ebs.health.ontario.ca/" name="Fault"
> element="xsns:EBSFault"/>
> </wsdl:message>
> <wsdl:message name="getTypeList">
> <wsdl:part xmlns:xsns="http://edt.health.ontario.ca/" name="parameters"
> element="xsns:getTypeList"/>
> </wsdl:message>
> <wsdl:message name="getTypeListResponse">
> <wsdl:part xmlns:xsns="http://edt.health.ontario.ca/" name="parameters"
> element="xsns:getTypeListResponse"/>
> </wsdl:message>
> <wsdl:message name="IDPHeader">
> <wsdl:part xmlns:xsns="http://idp.ebs.health.ontario.ca/"
> name="idprequest_header" element="xsns:IDP"/>
> </wsdl:message>
> <wsdl:message name="info">
> <wsdl:part xmlns:xsns="http://edt.health.ontario.ca/" name="parameters"
> element="xsns:info"/>
> </wsdl:message>
> <wsdl:message name="infoResponse">
> <wsdl:part xmlns:xsns="http://edt.health.ontario.ca/" name="parameters"
> element="xsns:infoResponse"/>
> </wsdl:message>
> <wsdl:message name="list">
> <wsdl:part xmlns:xsns="http://edt.health.ontario.ca/" name="parameters"
> element="xsns:list"/>
> </wsdl:message>
> <wsdl:message name="listResponse">
> <wsdl:part xmlns:xsns="http://edt.health.ontario.ca/" name="parameters"
> element="xsns:listResponse"/>
> </wsdl:message>
> <wsdl:message name="MSAHeader">
> <wsdl:part xmlns:xsns="http://msa.ebs.health.ontario.ca/"
> name="msarequest_header" element="xsns:MSA"/>
> </wsdl:message>
> <wsdl:message name="submit">
> <wsdl:part xmlns:xsns="http://edt.health.ontario.ca/" name="parameters"
> element="xsns:submit"/>
> </wsdl:message>
> <wsdl:message name="submitResponse">
> <wsdl:part xmlns:xsns="http://edt.health.ontario.ca/" name="parameters"
> element="xsns:submitResponse"/>
> </wsdl:message>
> <wsdl:message name="update">
> <wsdl:part xmlns:xsns="http://edt.health.ontario.ca/" name="parameters"
> element="xsns:update"/>
> </wsdl:message>
> <wsdl:message name="updateResponse">
> <wsdl:part xmlns:xsns="http://edt.health.ontario.ca/" name="parameters"
> element="xsns:updateResponse"/>
> </wsdl:message>
> <wsdl:message name="upload">
> <wsdl:part xmlns:xsns="http://edt.health.ontario.ca/" name="parameters"
> element="xsns:upload"/>
> </wsdl:message>
> <wsdl:message name="uploadResponse">
> <wsdl:part xmlns:xsns="http://edt.health.ontario.ca/" name="parameters"
> element="xsns:uploadResponse"/>
> </wsdl:message>
> <wsdl:portType name="EDTDelegate">
> <wsdl:operation name="delete">
> <wsdl:input name="deleteRequest" message="ns0:delete"/>
> <wsdl:output name="deleteResponse" message="ns0:deleteResponse"/>
> <wsdl:fault name="FaultException" message="ns0:faultexception"/>
> </wsdl:operation>
> <wsdl:operation name="download">
> <wsdl:input name="downloadRequest" message="ns0:download"/>
> <wsdl:output name="downloadResponse" message="ns0:downloadResponse"/>
> <wsdl:fault name="FaultException" message="ns0:faultexception"/>
> </wsdl:operation>
> <wsdl:operation name="getTypeList">
> <wsdl:input name="getTypeListRequest" message="ns0:getTypeList"/>
> <wsdl:output name="getTypeListResponse" message="ns0:getTypeListResponse"/>
> <wsdl:fault name="FaultException" message="ns0:faultexception"/>
> </wsdl:operation>
> <wsdl:operation name="info">
> <wsdl:input name="infoRequest" message="ns0:info"/>
> <wsdl:output name="infoResponse" message="ns0:infoResponse"/>
> <wsdl:fault name="FaultException" message="ns0:faultexception"/>
> </wsdl:operation>
> <wsdl:operation name="list">
> <wsdl:input name="listRequest" message="ns0:list"/>
> <wsdl:output name="listResponse" message="ns0:listResponse"/>
> <wsdl:fault name="FaultException" message="ns0:faultexception"/>
> </wsdl:operation>
> <wsdl:operation name="submit">
> <wsdl:input name="submitRequest" message="ns0:submit"/>
> <wsdl:output name="submitResponse" message="ns0:submitResponse"/>
> <wsdl:fault name="FaultException" message="ns0:faultexception"/>
> </wsdl:operation>
> <wsdl:operation name="update">
> <wsdl:input name="updateRequest" message="ns0:update"/>
> <wsdl:output name="updateResponse" message="ns0:updateResponse"/>
> <wsdl:fault name="FaultException" message="ns0:faultexception"/>
> </wsdl:operation>
> <wsdl:operation name="upload">
> <wsdl:input name="uploadRequest" message="ns0:upload"/>
> <wsdl:output name="uploadResponse" message="ns0:uploadResponse"/>
> <wsdl:fault name="FaultException" message="ns0:faultexception"/>
> </wsdl:operation>
> </wsdl:portType>
> <wsdl:binding name="EDTPortBinding" type="ns0:EDTDelegate">
> <soap11:binding transport="http://schemas.xmlsoap.org/soap/http"
> style="document"/>
> <wsdl:operation name="delete">
> <soap11:operation soapAction="" style="document"/>
> <wsdl:input name="deleteRequest">
> <wsp:PolicyReference
> xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" URI="#policy0"/>
> <soap11:body parts="parameters" use="literal"/>
> <soap11:header message="ns0:EBSHeader" part="ebsrequest_header"
> use="literal"/>
> <soap11:header message="ns0:MSAHeader" part="msarequest_header"
> use="literal"/>
> <soap11:header message="ns0:IDPHeader" part="idprequest_header"
> use="literal"/>
> </wsdl:input>
> <wsdl:output name="deleteResponse">
> <soap11:body use="literal"/>
> </wsdl:output>
> <wsdl:fault name="FaultException">
> <soap11:fault name="FaultException" use="literal"/>
> </wsdl:fault>
> </wsdl:operation>
> <wsdl:operation name="download">
> <soap11:operation soapAction="" style="document"/>
> <wsdl:input name="downloadRequest">
> <wsp:PolicyReference
> xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" URI="#policy0"/>
> <soap11:body parts="parameters" use="literal"/>
> <soap11:header message="ns0:EBSHeader" part="ebsrequest_header"
> use="literal"/>
> <soap11:header message="ns0:MSAHeader" part="msarequest_header"
> use="literal"/>
> <soap11:header message="ns0:IDPHeader" part="idprequest_header"
> use="literal"/>
> </wsdl:input>
> <wsdl:output name="downloadResponse">
> <soap11:body use="literal"/>
> </wsdl:output>
> <wsdl:fault name="FaultException">
> <soap11:fault name="FaultException" use="literal"/>
> </wsdl:fault>
> </wsdl:operation>
> <wsdl:operation name="getTypeList">
> <soap11:operation soapAction="" style="document"/>
> <wsdl:input name="getTypeListRequest">
> <wsp:PolicyReference
> xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" URI="#policy0"/>
> <soap11:body parts="parameters" use="literal"/>
> <soap11:header message="ns0:EBSHeader" part="ebsrequest_header"
> use="literal"/>
> <soap11:header message="ns0:MSAHeader" part="msarequest_header"
> use="literal"/>
> <soap11:header message="ns0:IDPHeader" part="idprequest_header"
> use="literal"/>
> </wsdl:input>
> <wsdl:output name="getTypeListResponse">
> <soap11:body use="literal"/>
> </wsdl:output>
> <wsdl:fault name="FaultException">
> <soap11:fault name="FaultException" use="literal"/>
> </wsdl:fault>
> </wsdl:operation>
> <wsdl:operation name="info">
> <soap11:operation soapAction="" style="document"/>
> <wsdl:input name="infoRequest">
> <wsp:PolicyReference
> xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" URI="#policy0"/>
> <soap11:body parts="parameters" use="literal"/>
> <soap11:header message="ns0:EBSHeader" part="ebsrequest_header"
> use="literal"/>
> <soap11:header message="ns0:MSAHeader" part="msarequest_header"
> use="literal"/>
> <soap11:header message="ns0:IDPHeader" part="idprequest_header"
> use="literal"/>
> </wsdl:input>
> <wsdl:output name="infoResponse">
> <soap11:body use="literal"/>
> </wsdl:output>
> <wsdl:fault name="FaultException">
> <soap11:fault name="FaultException" use="literal"/>
> </wsdl:fault>
> </wsdl:operation>
> <wsdl:operation name="list">
> <soap11:operation soapAction="" style="document"/>
> <wsdl:input name="listRequest">
> <wsp:PolicyReference
> xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" URI="#policy0"/>
> <soap11:body parts="parameters" use="literal"/>
> <soap11:header message="ns0:EBSHeader" part="ebsrequest_header"
> use="literal"/>
> <soap11:header message="ns0:MSAHeader" part="msarequest_header"
> use="literal"/>
> <soap11:header message="ns0:IDPHeader" part="idprequest_header"
> use="literal"/>
> </wsdl:input>
> <wsdl:output name="listResponse">
> <soap11:body use="literal"/>
> </wsdl:output>
> <wsdl:fault name="FaultException">
> <soap11:fault name="FaultException" use="literal"/>
> </wsdl:fault>
> </wsdl:operation>
> <wsdl:operation name="submit">
> <soap11:operation soapAction="" style="document"/>
> <wsdl:input name="submitRequest">
> <wsp:PolicyReference
> xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" URI="#policy0"/>
> <soap11:body parts="parameters" use="literal"/>
> <soap11:header message="ns0:EBSHeader" part="ebsrequest_header"
> use="literal"/>
> <soap11:header message="ns0:MSAHeader" part="msarequest_header"
> use="literal"/>
> <soap11:header message="ns0:IDPHeader" part="idprequest_header"
> use="literal"/>
> </wsdl:input>
> <wsdl:output name="submitResponse">
> <soap11:body use="literal"/>
> </wsdl:output>
> <wsdl:fault name="FaultException">
> <soap11:fault name="FaultException" use="literal"/>
> </wsdl:fault>
> </wsdl:operation>
> <wsdl:operation name="update">
> <soap11:operation soapAction="" style="document"/>
> <wsdl:input name="updateRequest">
> <wsp:PolicyReference
> xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" URI="#policy0"/>
> <soap11:body parts="parameters" use="literal"/>
> <soap11:header message="ns0:EBSHeader" part="ebsrequest_header"
> use="literal"/>
> <soap11:header message="ns0:MSAHeader" part="msarequest_header"
> use="literal"/>
> <soap11:header message="ns0:IDPHeader" part="idprequest_header"
> use="literal"/>
> </wsdl:input>
> <wsdl:output name="updateResponse">
> <soap11:body use="literal"/>
> </wsdl:output>
> <wsdl:fault name="FaultException">
> <soap11:fault name="FaultException" use="literal"/>
> </wsdl:fault>
> </wsdl:operation>
> <wsdl:operation name="upload">
> <soap11:operation soapAction="" style="document"/>
> <wsdl:input name="uploadRequest">
> <wsp:PolicyReference
> xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" URI="#policy0"/>
> <soap11:body parts="parameters" use="literal"/>
> <soap11:header message="ns0:EBSHeader" part="ebsrequest_header"
> use="literal"/>
> <soap11:header message="ns0:MSAHeader" part="msarequest_header"
> use="literal"/>
> <soap11:header message="ns0:IDPHeader" part="idprequest_header"
> use="literal"/>
> </wsdl:input>
> <wsdl:output name="uploadResponse">
> <soap11:body use="literal"/>
> </wsdl:output>
> <wsdl:fault name="FaultException">
> <soap11:fault name="FaultException" use="literal"/>
> </wsdl:fault>
> </wsdl:operation>
> </wsdl:binding>
> <wsdl:service name="EDTService">
> <wsdl:port name="EDTPort" binding="ns0:EDTPortBinding">
> <soap11:address location="https://204.41.10.88:1441/EDTService/EDTService
> "/>
> </wsdl:port>
> <wsdl:port name="EDTPort.2" binding="ns0:EDTPortBinding">
> <soap11:address location="https://204.41.10.87:1441/EDTService/EDTService
> "/>
> </wsdl:port>
> </wsdl:service>
> <wsp:Policy
> xmlns:wsu="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd
> "
> xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" wsu:Id="policy0">
> <wsp:ExactlyOne>
> <wsp:All>
> <sp:SignedSupportingTokens xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:wsse="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
> "
> xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200512"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:msa="http://msa.ebs.health.ontario.ca/"
> xmlns:idp="http://idp.ebs.health.ontario.ca/"
> xmlns:edt="http://edt.health.ontario.ca/"
> xmlns:ebs="http://ebs.health.ontario.ca/"
> xmlns="http://schemas.xmlsoap.org/wsdl/">
> <sp:UsernameToken>
> <wsp:Policy>
> <wsp:All>
> <sp:NoPassword/>
> <sp:WssUsernameToken10/>
> </wsp:All>
> </wsp:Policy>
> </sp:UsernameToken>
> </sp:SignedSupportingTokens>
> <sp:RequiredParts xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:wsse="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
> "
> xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200512"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:msa="http://msa.ebs.health.ontario.ca/"
> xmlns:idp="http://idp.ebs.health.ontario.ca/"
> xmlns:edt="http://edt.health.ontario.ca/"
> xmlns:ebs="http://ebs.health.ontario.ca/"
> xmlns="http://schemas.xmlsoap.org/wsdl/">
> <sp:Header Name="EBS" Namespace="http://ebs.health.ontario.ca/"/>
> </sp:RequiredParts>
> <sp:RequiredParts xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:wsse="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
> "
> xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200512"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:msa="http://msa.ebs.health.ontario.ca/"
> xmlns:idp="http://idp.ebs.health.ontario.ca/"
> xmlns:edt="http://edt.health.ontario.ca/"
> xmlns:ebs="http://ebs.health.ontario.ca/"
> xmlns="http://schemas.xmlsoap.org/wsdl/">
> <sp:Header Name="MSA" Namespace="http://msa.ebs.health.ontario.ca/"/>
> </sp:RequiredParts>
> <sp:RequiredParts xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:wsse="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
> "
> xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200512"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:msa="http://msa.ebs.health.ontario.ca/"
> xmlns:idp="http://idp.ebs.health.ontario.ca/"
> xmlns:edt="http://edt.health.ontario.ca/"
> xmlns:ebs="http://ebs.health.ontario.ca/"
> xmlns="http://schemas.xmlsoap.org/wsdl/">
> <sp:Header Name="SoftwareConformanceKey" Namespace=""/>
> </sp:RequiredParts>
> <sp:RequiredParts xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:wsse="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
> "
> xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200512"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:msa="http://msa.ebs.health.ontario.ca/"
> xmlns:idp="http://idp.ebs.health.ontario.ca/"
> xmlns:edt="http://edt.health.ontario.ca/"
> xmlns:ebs="http://ebs.health.ontario.ca/"
> xmlns="http://schemas.xmlsoap.org/wsdl/">
> <sp:Header Name="AuditId" Namespace=""/>
> </sp:RequiredParts>
> <sp:RequiredParts xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:wsse="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
> "
> xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200512"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:msa="http://msa.ebs.health.ontario.ca/"
> xmlns:idp="http://idp.ebs.health.ontario.ca/"
> xmlns:edt="http://edt.health.ontario.ca/"
> xmlns:ebs="http://ebs.health.ontario.ca/"
> xmlns="http://schemas.xmlsoap.org/wsdl/">
> <sp:Header Name="ServiceUserMUID" Namespace=""/>
> </sp:RequiredParts>
> <sp:RequiredParts xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:wsse="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
> "
> xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200512"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:msa="http://msa.ebs.health.ontario.ca/"
> xmlns:idp="http://idp.ebs.health.ontario.ca/"
> xmlns:edt="http://edt.health.ontario.ca/"
> xmlns:ebs="http://ebs.health.ontario.ca/"
> xmlns="http://schemas.xmlsoap.org/wsdl/">
> <sp:Header Name="UserID" Namespace=""/>
> </sp:RequiredParts>
> <sp:RequiredParts xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:wsse="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
> "
> xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200512"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:msa="http://msa.ebs.health.ontario.ca/"
> xmlns:idp="http://idp.ebs.health.ontario.ca/"
> xmlns:edt="http://edt.health.ontario.ca/"
> xmlns:ebs="http://ebs.health.ontario.ca/"
> xmlns="http://schemas.xmlsoap.org/wsdl/">
> <sp:Header Name="Timestamp"
> Namespace="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd
> "/>
> </sp:RequiredParts>
> <sp:SignedParts xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:wsse="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
> "
> xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200512"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:msa="http://msa.ebs.health.ontario.ca/"
> xmlns:idp="http://idp.ebs.health.ontario.ca/"
> xmlns:edt="http://edt.health.ontario.ca/"
> xmlns:ebs="http://ebs.health.ontario.ca/"
> xmlns="http://schemas.xmlsoap.org/wsdl/">
> <sp:Header Name="EBS" Namespace="http://ebs.health.ontario.ca/"/>
> <sp:Header Name="MSA" Namespace="http://msa.ebs.health.ontario.ca/"/>
> <sp:Header Name="Timestamp"
> Namespace="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd
> "/>
> <sp:Header Name="UsernameToken"
> Namespace="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
> "/>
> <sp:Body/>
> </sp:SignedParts>
> </wsp:All>
> <wsp:All>
> <sp:SignedSupportingTokens xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:wsse="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
> "
> xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200512"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:msa="http://msa.ebs.health.ontario.ca/"
> xmlns:idp="http://idp.ebs.health.ontario.ca/"
> xmlns:edt="http://edt.health.ontario.ca/"
> xmlns:ebs="http://ebs.health.ontario.ca/"
> xmlns="http://schemas.xmlsoap.org/wsdl/">
> <sp:UsernameToken>
> <wsp:Policy>
> <wsp:All>
> <sp:WssUsernameToken10/>
> </wsp:All>
> </wsp:Policy>
> </sp:UsernameToken>
> </sp:SignedSupportingTokens>
> <sp:SignedParts xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:wsse="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
> "
> xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200512"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:msa="http://msa.ebs.health.ontario.ca/"
> xmlns:idp="http://idp.ebs.health.ontario.ca/"
> xmlns:edt="http://edt.health.ontario.ca/"
> xmlns:ebs="http://ebs.health.ontario.ca/"
> xmlns="http://schemas.xmlsoap.org/wsdl/">
> <sp:Header Name="EBS" Namespace="http://ebs.health.ontario.ca/"/>
> <sp:Header Name="IDP" Namespace="http://idp.ebs.health.ontario.ca/"/>
> <sp:Header Name="Timestamp"
> Namespace="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd
> "/>
> <sp:Header Name="UsernameToken"
> Namespace="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
> "/>
> <sp:Body/>
> </sp:SignedParts>
> <sp:RequiredParts xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:wsse="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
> "
> xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200512"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:msa="http://msa.ebs.health.ontario.ca/"
> xmlns:idp="http://idp.ebs.health.ontario.ca/"
> xmlns:edt="http://edt.health.ontario.ca/"
> xmlns:ebs="http://ebs.health.ontario.ca/"
> xmlns="http://schemas.xmlsoap.org/wsdl/">
> <sp:Header Name="EBS" Namespace="http://ebs.health.ontario.ca/"/>
> </sp:RequiredParts>
> <sp:RequiredParts xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:wsse="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
> "
> xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200512"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:msa="http://msa.ebs.health.ontario.ca/"
> xmlns:idp="http://idp.ebs.health.ontario.ca/"
> xmlns:edt="http://edt.health.ontario.ca/"
> xmlns:ebs="http://ebs.health.ontario.ca/"
> xmlns="http://schemas.xmlsoap.org/wsdl/">
> <sp:Header Name="IDP" Namespace="http://idp.ebs.health.ontario.ca/"/>
> </sp:RequiredParts>
> <sp:RequiredParts xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:wsse="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
> "
> xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200512"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:msa="http://msa.ebs.health.ontario.ca/"
> xmlns:idp="http://idp.ebs.health.ontario.ca/"
> xmlns:edt="http://edt.health.ontario.ca/"
> xmlns:ebs="http://ebs.health.ontario.ca/"
> xmlns="http://schemas.xmlsoap.org/wsdl/">
> <sp:Header Name="SoftwareConformanceKey" Namespace=""/>
> </sp:RequiredParts>
> <sp:RequiredParts xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:wsse="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
> "
> xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200512"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:msa="http://msa.ebs.health.ontario.ca/"
> xmlns:idp="http://idp.ebs.health.ontario.ca/"
> xmlns:edt="http://edt.health.ontario.ca/"
> xmlns:ebs="http://ebs.health.ontario.ca/"
> xmlns="http://schemas.xmlsoap.org/wsdl/">
> <sp:Header Name="AuditId" Namespace=""/>
> </sp:RequiredParts>
> <sp:RequiredParts xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:wsse="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
> "
> xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200512"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:msa="http://msa.ebs.health.ontario.ca/"
> xmlns:idp="http://idp.ebs.health.ontario.ca/"
> xmlns:edt="http://edt.health.ontario.ca/"
> xmlns:ebs="http://ebs.health.ontario.ca/"
> xmlns="http://schemas.xmlsoap.org/wsdl/">
> <sp:Header Name="ServiceUserMUID" Namespace=""/>
> </sp:RequiredParts>
> <sp:RequiredParts xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:wsse="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
> "
> xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200512"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:msa="http://msa.ebs.health.ontario.ca/"
> xmlns:idp="http://idp.ebs.health.ontario.ca/"
> xmlns:edt="http://edt.health.ontario.ca/"
> xmlns:ebs="http://ebs.health.ontario.ca/"
> xmlns="http://schemas.xmlsoap.org/wsdl/">
> <sp:Header Name="Timestamp"
> Namespace="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd
> "/>
> </sp:RequiredParts>
> </wsp:All>
> </wsp:ExactlyOne>
> </wsp:Policy>
> </wsdl:definitions>
>
> *
> Client Configuration*
>
>
>   //certificate
>             System.setProperty("javax.net.ssl.trustStore","C:/Program
> Files/Java/jre7/lib/security/cacerts");
>
> System.setProperty("javax.net.ssl.trustStorePassword","changeit");
>             //System.setProperty("javax.net.debug","ssl");
>
>             //Intercerptors OUT
>             Map<String, Object> outProps = new HashMap<String, Object>();
>             outProps.put("action", "UsernameToken Timestamp Signature
> Encrypt");
>             outProps.put("passwordType", "PasswordDigest");
>
>             outProps.put("UserName", "username");
>             outProps.put("signatureUser", "clientx509v1");
>
>             outProps.put("passwordCallbackClass",
> "demo.wssec.client.UTPasswordCallback");
>
>             outProps.put("encryptionUser", "serverx509v1");
>             outProps.put("encryptionPropFile",
> "etc/Client_Encrypt.properties");
>             outProps.put("encryptionKeyIdentifier", "IssuerSerial");
>             outProps.put("encryptionParts",
>                          "{Element}{" + WSSE_NS + "}UsernameToken;"
>                          +
> "{Content}{http://schemas.xmlsoap.org/soap/envelope/}Body");
>
>             outProps.put("signaturePropFile",
> "etc/Client_Sign.properties");
>             outProps.put("signatureKeyIdentifier", "DirectReference");
>             outProps.put("signatureParts",
>                          "{Element}{" + WSU_NS + "}Timestamp;"
>                          +
> "{Element}{http://schemas.xmlsoap.org/soap/envelope/}Body;"
>                          +
> "{}{http://www.w3.org/2005/08/addressing}ReplyTo;");
>
>             outProps.put("encryptionKeyTransportAlgorithm",
>                          "http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p
> ");
>             outProps.put("signatureAlgorithm",
> "http://www.w3.org/2000/09/xmldsig#rsa-sha1");
>
>           //Intercerptors IN
>             Map<String, Object> inProps = new HashMap<String, Object>();
>
>             inProps.put("action", "UsernameToken Timestamp Signature
> Encrypt");
>             inProps.put("passwordType", "PasswordText");
>             inProps.put("passwordCallbackClass",
> "demo.wssec.client.UTPasswordCallback");
>
>             inProps.put("decryptionPropFile",
> "etc/Client_Sign.properties");
>                 inProps.put("encryptionKeyIdentifier", "IssuerSerial");
>
>         //Encryption Parts
>
>             /*inProps.put("signaturePropFile",
> "etc/Client_Encrypt.properties");
>             inProps.put("signatureKeyIdentifier", "DirectReference");
>
>
>             inProps.put("encryptionKeyTransportAlgorithm",
>                          "http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p
> ");
>             inProps.put("signatureAlgorithm",
> "http://www.w3.org/2000/09/xmldsig#rsa-sha1");*/
>
>         //Adding into WSDL
>             org.apache.cxf.endpoint.Client client =
> ClientProxy.getClient(port);
>             client.getInInterceptors().add(new
> WSS4JInInterceptor(inProps));
>             client.getOutInterceptors().add(new
> WSS4JOutInterceptor(outProps));
>             client.getInInterceptors().add(coverageChecker);
>
> how do i solve the security policy error?
> thanks in advance.
>
>
>
>
>
>
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/Eclipse-CXF-and-WS-SecurityPolicy-tp5737811.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>



-- 
Colm O hEigeartaigh

Talend Community Coder
http://coders.talend.com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message