activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chmokbel <ch...@downloadwink.com>
Subject CXF WS-SecurityPolicy
Date Thu, 10 Mar 2016 19:27:24 GMT
Hi,

I'm looking to consume this web service:
https://ws.conf.ebs.health.gov.on.ca:1441/EDTService/EDTService?wsdl

I'm using CXF WS-SecurityPolicy. Its the first time i'm using it and i'm
getting a few different error messages.

I have cxf-rt-ws-policy-3.1.5.jar and cxf-rt-ws-security-3.1.5.jar on my
classpath.

my code:

Credentials cred = Credentials.testCredentials;
EDTService service = new EDTService();
EDTDelegate port = service.getEDTPort();
Map<String, Object> ctx = ((BindingProvider) port).getRequestContext();
ctx.put("ws-security.must-understand", true);
ctx.put("ws-security.timestamp.timeToLive", 10 * 60);
ctx.put("security.username", cred.getUserName());
ctx.put("security.password", cred.getPassword());
ctx.put("security.signature.username", "ohip");
ctx.put("security.encryption.username", "ohip");
ctx.put("security.callback-handler", OHIPPasswordHandler.class.getName());

ctx.put("security.signature.properties", "ohip_sign.properties");
ctx.put("security.encryption.properties", "ohip_sign.properties");

for (TypeListData d : port.getTypeList().getData()) {
            System.err.println(d.getResourceType() + " " +
d.getDescriptionEn());
 }
=====================================================

then i get a whole bunch of errors like this:
WARNING: WSP0075: Policy assertion
"{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}SignedSupportingTokens"
was evaluated as "UNKNOWN".
Mar 10, 2016 2:50:42 PM
[com.sun.xml.internal.ws.policy.EffectiveAlternativeSelector] 
selectAlternatives

I think this might be caused because of the securitypolicy version 200702???

========================================================


When i add a whole bunch of other cxf related jar files to the classpath, i
end up with different error messages:
Mar 10, 2016 2:54:06 PM
org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean
buildServiceFromWSDL
INFO: Creating Service {http://edt.health.ontario.ca/}EDTService from WSDL:
https://ws.conf.ebs.health.gov.on.ca:1441/EDTService/EDTService?wsdl
Mar 10, 2016 2:54:08 PM
org.apache.cxf.ws.policy.attachment.wsdl11.Wsdl11AttachmentPolicyProvider
getElementPolicy
WARNING: Failed to build the policy 'policy0':Invalid Policy
Mar 10, 2016 2:54:08 PM org.apache.cxf.phase.PhaseInterceptorChain
doDefaultLogging
WARNING: Interceptor for
{http://edt.health.ontario.ca/}EDTService#{http://edt.health.ontario.ca/}getTypeList
has thrown exception, unwinding now
java.lang.IllegalArgumentException: Invalid Policy
	at
org.apache.wss4j.policy.builders.RequiredPartsBuilder.getHeaders(RequiredPartsBuilder.java:64)
	at
org.apache.wss4j.policy.builders.RequiredPartsBuilder.getHeaders(RequiredPartsBuilder.java:64)
	at
org.apache.wss4j.policy.builders.RequiredPartsBuilder.build(RequiredPartsBuilder.java:42)







--
View this message in context: http://activemq.2283324.n4.nabble.com/CXF-WS-SecurityPolicy-tp4709177.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.

Mime
View raw message