How to resolve org.jboss.ws.WSException: Policy not supported in JBoss AS 4.2.? <p>I created a client web service from the following wsdl definition: </p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;wsdl:definitions name="DadosBiometricos" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:tns="http://tempuri.org/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata"&gt; &lt;wsp:Policy wsu:Id="WSHttpBinding_IDadosBiometricos_policy"&gt; &lt;wsp:ExactlyOne&gt; &lt;wsp:All&gt; &lt;sp:TransportBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"&gt; &lt;wsp:Policy&gt; &lt;sp:TransportToken&gt; &lt;wsp:Policy&gt; &lt;sp:HttpsToken RequireClientCertificate="false" /&gt; &lt;/wsp:Policy&gt; &lt;/sp:TransportToken&gt; &lt;sp:AlgorithmSuite&gt; &lt;wsp:Policy&gt; &lt;sp:Basic256 /&gt; &lt;/wsp:Policy&gt; &lt;/sp:AlgorithmSuite&gt; &lt;sp:Layout&gt; &lt;wsp:Policy&gt; &lt;sp:Strict /&gt; &lt;/wsp:Policy&gt; &lt;/sp:Layout&gt; &lt;/wsp:Policy&gt; &lt;/sp:TransportBinding&gt; &lt;wsaw:UsingAddressing /&gt; &lt;/wsp:All&gt; &lt;/wsp:ExactlyOne&gt; &lt;/wsp:Policy&gt; &lt;wsdl:types&gt; &lt;xsd:schema targetNamespace="http://tempuri.org/Imports"&gt; &lt;xsd:import schemaLocation="https://dadosbiometricos.valid.com.br/DadosBiometricos.svc?xsd=xsd0" namespace="http://tempuri.org/" /&gt; &lt;xsd:import schemaLocation="https://dadosbiometricos.valid.com.br/DadosBiometricos.svc?xsd=xsd1" namespace="http://schemas.microsoft.com/2003/10/Serialization/" /&gt; &lt;xsd:import schemaLocation="https://dadosbiometricos.valid.com.br/DadosBiometricos.svc?xsd=xsd2" namespace="http://schemas.datacontract.org/2004/07/B2G_DetranGO_Biometrico" /&gt; &lt;/xsd:schema&gt; &lt;/wsdl:types&gt; &lt;wsdl:message name="IDadosBiometricos_ConsultarBiometria_InputMessage"&gt; &lt;wsdl:part name="parameters" element="tns:ConsultarBiometria" /&gt; &lt;/wsdl:message&gt; &lt;wsdl:message name="IDadosBiometricos_ConsultarBiometria_OutputMessage"&gt; &lt;wsdl:part name="parameters" element="tns:ConsultarBiometriaResponse" /&gt; &lt;/wsdl:message&gt; &lt;wsdl:portType msc:usingSession="false" name="IDadosBiometricos"&gt; &lt;wsdl:operation name="ConsultarBiometria"&gt; &lt;wsdl:input wsaw:Action="http://tempuri.org/IDadosBiometricos/ConsultarBiometria" message="tns:IDadosBiometricos_ConsultarBiometria_InputMessage" /&gt; &lt;wsdl:output wsaw:Action="http://tempuri.org/IDadosBiometricos/ConsultarBiometriaResponse" message="tns:IDadosBiometricos_ConsultarBiometria_OutputMessage" /&gt; &lt;/wsdl:operation&gt; &lt;/wsdl:portType&gt; &lt;wsdl:binding name="WSHttpBinding_IDadosBiometricos" type="tns:IDadosBiometricos"&gt; wsp:PolicyReference URI="#WSHttpBinding_IDadosBiometricos_policy" /&gt; &lt;soap12:binding transport="http://schemas.xmlsoap.org/soap/http" /&gt; &lt;wsdl:operation name="ConsultarBiometria"&gt; &lt;soap12:operation soapAction="http://tempuri.org/IDadosBiometricos/ConsultarBiometria" style="document" /&gt; &lt;wsdl:input&gt; &lt;soap12:body use="literal" /&gt; &lt;/wsdl:input&gt; &lt;wsdl:output&gt; &lt;soap12:body use="literal" /&gt; &lt;/wsdl:output&gt; &lt;/wsdl:operation&gt; &lt;/wsdl:binding&gt; &lt;wsdl:service name="DadosBiometricos"&gt; &lt;wsdl:port name="WSHttpBinding_IDadosBiometricos" binding="tns:WSHttpBinding_IDadosBiometricos"&gt; &lt;soap12:address location="https://dadosbiometricos.valid.com.br/DadosBiometricos.svc" /&gt; &lt;wsa10:EndpointReference&gt; &lt;wsa10:Address&gt;https://dadosbiometricos.valid.com.br/DadosBiometricos.svc &lt;/wsa10:Address&gt; &lt;/wsa10:EndpointReference&gt; &lt;/wsdl:port&gt; &lt;/wsdl:service&gt; &lt;/wsdl:definitions&gt;** </code></pre> <p>When i try instantiate a new DadosBiometricosValid() throws an exception at constructor:</p> <pre><code>16:25:02,296 ERROR [PolicyDeployer] Unsupported assertion! 16:25:02,297 INFO [STDOUT] 16:25:02,297 ERROR [root] Policy not supported! #WSHttpBinding_IDadosBiometricos_policy org.jboss.ws.WSException: Policy not supported! #WSHttpBinding_IDadosBiometricos_policy at org.jboss.ws.WSException.rethrow(WSException.java:60) at org.jboss.ws.extensions.policy.metadata.PolicyMetaDataBuilder.deployPolicyClientSide(PolicyMetaDataBuilder.java:319) at org.jboss.ws.extensions.policy.metadata.PolicyMetaDataBuilder.deployPolicy(PolicyMetaDataBuilder.java:277) at org.jboss.ws.extensions.policy.metadata.PolicyMetaDataBuilder.processPolicies(PolicyMetaDataBuilder.java:236) at org.jboss.ws.extensions.policy.metadata.PolicyMetaDataBuilder.processPolicyExtensions(PolicyMetaDataBuilder.java:193) at org.jboss.ws.metadata.builder.jaxws.JAXWSClientMetaDataBuilder.buildMetaData(JAXWSClientMetaDataBuilder.java:94) at org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.&lt;init&gt;(ServiceDelegateImpl.java:140) at org.jboss.ws.core.jaxws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:64) at javax.xml.ws.Service.&lt;init&gt;(Service.java:81) at gov.goias.valid.servico.DadosBiometricosValid.&lt;init&gt;(DadosBiometricosValid.java:47) at gov.goias.biometria.detran.ServicoValid.consultarBiometria(ServicoValid.java:43) at gov.goias.biometria.detran.ServicoValid.consultaBiometria(ServicoValid.java:37) at gov.goias.controle.detran.SalvarBiometria.salvarBiometria(SalvarBiometria.java:22) at gov.goias.controle.detran.SalvarBiometria.exec(SalvarBiometria.java:35) at gov.goias.controle.detran.ControllerDetran.doGet(ControllerDetran.java:44) at javax.servlet.http.HttpServlet.service(HttpServlet.java:690) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446) at java.lang.Thread.run(Thread.java:662) Caused by: org.jboss.ws.extensions.policy.deployer.exceptions.UnsupportedPolicy at org.jboss.ws.extensions.policy.deployer.PolicyDeployer.deployClientSide(PolicyDeployer.java:173) at org.jboss.ws.extensions.policy.metadata.PolicyMetaDataBuilder.deployPolicyClientSide(PolicyMetaDataBuilder.java:310) ... 33 more </code></pre> <p>My class is :</p> <pre><code>/** * This class was generated by the JAX-WS RI. * JAX-WS RI 2.1.3-b02- * Generated source version: 2.1 * */ @WebServiceClient(name = "DadosBiometricos", targetNamespace = "http://tempuri.org/", wsdlLocation = "https://dadosbiometricos.valid.com.br/DadosBiometricos.svc?wsdl") public class DadosBiometricosValid extends Service { private final static URL DADOSBIOMETRICOS_WSDL_LOCATION; private final static Logger logger = Logger.getLogger(DadosBiometricosValid.class.getName()); static { URL url = null; try { URL baseUrl; baseUrl =DadosBiometricosValid.class.getResource("."); url = new URL(baseUrl, "https://dadosbiometricos.valid.com.br/DadosBiometricos.svc?wsdl"); } catch (MalformedURLException e) { logger.warning("Failed to create URL for the wsdl Location: 'https://dadosbiometricos.valid.com.br/DadosBiometricos.svc?wsdl', retrying as a local file"); logger.warning(e.getMessage()); } DADOSBIOMETRICOS_WSDL_LOCATION = url; } public DadosBiometricosValid(URL wsdlLocation, QName serviceName) { super(wsdlLocation, serviceName);//line that throws exception } public DadosBiometricosValid() { super(DADOSBIOMETRICOS_WSDL_LOCATION, new QName("http://tempuri.org/", "DadosBiometricos")); } /** * * @return * returns IDadosBiometricos */ @WebEndpoint(name = "WSHttpBinding_IDadosBiometricos") public IDadosBiometricosValid getWSHttpBindingIDadosBiometricos() { return super.getPort(new QName("http://tempuri.org/", "WSHttpBinding_IDadosBiometricos"), IDadosBiometricosValid.class); } /** * * @param features * A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy. Supported features not in the &lt;code&gt;features&lt;/code&gt; parameter will have their default values. * @return * returns IDadosBiometricos */ @WebEndpoint(name = "WSHttpBinding_IDadosBiometricos") public IDadosBiometricosValid getWSHttpBindingIDadosBiometricos(WebServiceFeature... features) { return super.getPort(new QName("http://tempuri.org/", "WSHttpBinding_IDadosBiometricos"), IDadosBiometricosValid.class, features); } } </code></pre>