This discussion is archived
0 Replies Latest reply: Mar 26, 2012 2:58 AM by Knorrar RSS

No Handler for OWSM Security Policy found

Knorrar Newbie
Currently Being Moderated
Hi everyone,

I am invoking a http web service using a jax-ws web service proxy. I had

earlier attached oracle/wss10_saml20_token_client_policy

The scenery is: Weblogic application web(WS JAX client) to Proxy(OSB+OWSM)

This is my Wrapper Client WS JAX:

public static XXXClientWrapper getWrapper(String securityPolicyFeature,String endpoint, String userEndPoint, String pwdEndPoint, String bindingProviderUser){



SecurityPolicyFeature securityFeature = new SecurityPolicyFeature(“oracle/wss10_saml20_token_client_policy”);//

WebServiceFeature[] features = new WebServiceFeature[] { securityFeature };

ComClientWrapper wrapper = new ComClientWrapper(features,endpoint,userEndPoint, pwdEndPoint);

Map<String, Object> requestContext = new HashMap<String, Object>();



requestContext.put(BindingProvider.USERNAME_PROPERTY, bindingProviderUser);
requestContext.put(ClientConstants.WSSEC_SIG_KEY_ALIAS, "soa11gr1");

requestContext.put(ClientConstants.WSSEC_RECIPIENT_KEY_ALIAS, "soa11gr1");

requestContext.put("keystore.recipient.alias", "soa11gr1");



requestContext.put(ClientConstants.WSSEC_KEYSTORE_LOCATION, "./oracle.com.jks");

requestContext.put(ClientConstants.WSSEC_KEYSTORE_PASSWORD, "welcome1");

requestContext.put(ClientConstants.WSSEC_KEYSTORE_TYPE, "JKS");



requestContext.put(ClientConstants.WSSEC_SIG_KEY_PASSWORD, "welcome1");

requestContext.put(ClientConstants.WSSEC_ENC_KEY_ALIAS, "XXXXX");

requestContext.put(ClientConstants.WSSEC_ENC_KEY_PASSWORD, "welcome1");



wrapper.updateRequestContext(requestContext);



return wrapper;



}

public XXXClientWrapper(WebServiceFeature[] features) {

this();

this.features = features;

}



public XXXClientWrapper() {

this.endpoint = theLocalEndpoint;



service = new ATEX();

}



public XXXClientWrapper(WebServiceFeature[] features,

String endpoint, String user, String password) {

this(endpoint, user, password);

this.features = features;

}



public XXXClientWrapper(String endpoint, String user, String password) {

super();

this.endpoint = endpoint;

this.user = user;

this.password = password;



try {

if (theLocalServiceQName != null)

service = new ATEX(new URL(this.endpoint + "?wsdl"), theLocalServiceQName);

else

service = new ATEX();

} catch (MalformedURLException e) {

e.printStackTrace();

}

}



private void initPort(Object port) {

setEndpointAddress(port, this.endpoint);

if (this.user != null && this.password != null)

setUserPassword((BindingProvider)port, this.user, this.password);



if (this.requestContext != null) {

Map<String,Object> reqContext = ((BindingProvider) port).getRequestContext();

reqContext.putAll(this.requestContext);

}

}



private Object setEndpointAddress(Object port, String newAddress) {



assert port instanceof

BindingProvider : "Doesn't appear to be a valid port";

assert newAddress != null : "Doesn't appear to be a valid address";



BindingProvider bp = (BindingProvider)port;

Map<String, Object> context = bp.getRequestContext();

Object oldAddress = context.get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY);

context.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, newAddress);



return oldAddress;

}



private void setUserPassword(BindingProvider bindingProvider, String user,

String password) {

if (bindingProvider == null || user == null || password == null) {

return;

}



bindingProvider.getRequestContext().put(BindingProvider.USERNAME_PROPERTY,

user);

bindingProvider.getRequestContext().put(BindingProvider.PASSWORD_PROPERTY,

password);

}



private XXX_WS getPort(WebServiceFeature[] features) {

return service.getPort(theLocalPortQName, XXX_WS.class, features);

}



This my Log:

javax.xml.ws.WebServiceException: No Handler for OWSM Security Policy found.

at weblogic.wsee.jaxws.owsm.TubelineDeploymentListener.loadHandler(TubelineDeploymentListener.java:117)

at weblogic.wsee.jaxws.owsm.ClientTubelineDeploymentListener.getHandler(ClientTubelineDeploymentListener.java:82)

at weblogic.wsee.jaxws.owsm.ClientTubelineDeploymentListener.createClient(ClientTubelineDeploymentListener.java:58)

at weblogic.wsee.jaxws.WLSTubelineAssemblerFactory$TubelineAssemblerImpl.createClient(WLSTubelineAssemblerFactory.java:57)

at com.sun.xml.ws.client.WSServiceDelegate.createPipeline(WSServiceDelegate.java:453)

at com.sun.xml.ws.client.WSServiceDelegate.getStubHandler(WSServiceDelegate.java:668)

at com.sun.xml.ws.client.WSServiceDelegate.createEndpointIFBaseProxy(WSServiceDelegate.java:647)

at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:348)

at weblogic.wsee.jaxws.spi.WLSProvider$ServiceDelegate.getPort(WLSProvider.java:409)

at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:330)

at javax.xml.ws.Service.getPort(Service.java:133)

at es.com.consultasCom.wrapper.ComClientWrapper.getPort(ComClientWrapper.java:384)

at es.com.consultasCom.wrapper.ComClientWrapper.consultar(ComClientWrapper.java:418)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:597)

Edited by: user10070593 on Mar 26, 2012 11:47 AM

Edited by: user10070593 on Mar 26, 2012 11:57 AM

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points