<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">
<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>
                                <td>
                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="https://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px; -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
@WS with CLIENT-CERT throws Invalid HTTP server response [401] - Unauthorized on client side
</h3>
<span style="margin-bottom: 10px;">
created by <a href="https://community.jboss.org/people/Claudio4J">Claudio Miranda</a> in <i>JBoss Web Services</i> - <a href="https://community.jboss.org/message/723617#723617">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><p>Hi, my environment is:</p><p>- JBoss EAP 5.1.2</p><p>- Linux</p><p>- JDK 6 update 30</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>There is an EJB annotated as webservice with auth as CLIENT-CERT. But testing from wsrunclient.sh throws WSException: Invalid HTTP server response [401] - Unauthorized</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><strong>Caused by: org.jboss.ws.WSException: Invalid HTTP server response [401] - Unauthorized</strong></p><p>        at org.jboss.ws.core.soap.SOAPMessageUnMarshallerHTTP.read(SOAPMessageUnMarshallerHTTP.java:75)</p><p>        at org.jboss.remoting.transport.http.HTTPClientInvoker.readResponse(HTTPClientInvoker.java:608)</p><p>        at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:402)</p><p>        at org.jboss.remoting.transport.http.HTTPClientInvoker.makeInvocation(HTTPClientInvoker.java:253)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>I have configured my application as following, sorry for the long post, but I want to give yout the relevant details of my test.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>I have searched jbossws forums, found and example using CLIENT-CERT with POJO and Servlets. But was unable to fix it.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Thanks</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>The server application is an EAR file that packages the EJB module</p><pre><p>jaas-ms-ejb-ear.ear/</p><p>|-- jaas-ms-ejb-ws-1.0.0.jar</p><p>|   |-- br</p><p>|   |   `-- com</p><p>|   |       `-- myapp</p><p>|   |           `-- jaas</p><p>|   |               |-- IPesquisarUsuario.class</p><p>|   |               `-- PesquisarUsuarioEjbService.class</p><p>|   |-- META-INF</p><p>|   |   |-- myapp-jaxws-endpoint-config.xml</p><p>|   |   |-- jboss-wsse-server.xml</p><p>|   |   |-- MANIFEST.MF</p><p>|   |-- server_jbossws.jks</p><p>|   `-- server_jbossws_truststore.jks</p><p>|-- lib</p><p>|   |-- jaas-ms-1.1.4.jar</p><p>|   `-- myapp-lib-client-2.1.2.jar</p><p>`-- META-INF</p><p>    |-- application.xml</p><p>    |-- MANIFEST.MF</p></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>The files content is </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><strong>PesquisarUsuarioEjbService.java</strong></p><pre class="jive-pre"><code class="jive-code jive-java"><font color="navy"><b>package</b></font> br.com.myapp.jaas;
 
<font color="navy"><b>import</b></font> java.util.logging.Logger;
 
<font color="navy"><b>import</b></font> javax.annotation.security.PermitAll;
<font color="navy"><b>import</b></font> javax.ejb.Stateless;
<font color="navy"><b>import</b></font> javax.jws.HandlerChain;
<font color="navy"><b>import</b></font> javax.jws.WebMethod;
<font color="navy"><b>import</b></font> javax.jws.WebService;
<font color="navy"><b>import</b></font> javax.jws.soap.SOAPBinding;
<font color="navy"><b>import</b></font> javax.jws.soap.SOAPBinding.Style;
<font color="navy"><b>import</b></font> javax.security.auth.Subject;
<font color="navy"><b>import</b></font> javax.security.jacc.PolicyContext;
<font color="navy"><b>import</b></font> javax.security.jacc.PolicyContextException;
 
<font color="navy"><b>import</b></font> org.jboss.ejb3.annotation.SecurityDomain;
<font color="navy"><b>import</b></font> org.jboss.ws.annotation.EndpointConfig;
<font color="navy"><b>import</b></font> org.jboss.wsf.spi.annotation.WebContext;
 
<font color="navy"><b>import</b></font> myapp.*;
 
@SOAPBinding(style = Style.RPC)
@WebService(endpointInterface=<font color="red">"br.com.myapp.jaas.IPesquisarUsuario"</font>, targetNamespace=<font color="red">"http://jaas.myapp.com.br/"</font>)
<font color="darkgreen">//@EndpointConfig(configName = "Standard WSSecurity Endpoint")</font>
@EndpointConfig(configFile = <font color="red">"META-INF/myapp-jaxws-endpoint-config.xml"</font>, configName=<font color="red">"MyApp WSSecurity Endpoint"</font>)
@Stateless
@WebContext(contextRoot = <font color="red">"/jaas-cert"</font>, secureWSDLAccess=false, authMethod=<font color="red">"CLIENT-CERT"</font>, transportGuarantee=<font color="red">"NONE"</font>)
@SecurityDomain(<font color="red">"UserCertPolicy"</font>)
@PermitAll()
<font color="navy"><b>public</b></font> <font color="navy"><b>class</b></font> PesquisarUsuarioEjbService  <font color="navy"><b>implements</b></font> IPesquisarUsuario <font color="navy">{</font>
 
     <font color="navy"><b>private</b></font> <font color="navy"><b>static</b></font> Logger log = Logger.getLogger(PesquisarUsuarioEjbService.class.getName());
     <font color="darkgreen">/** The JACC PolicyContext key for the current Subject */</font>
     <font color="navy"><b>private</b></font> <font color="navy"><b>static</b></font> <font color="navy"><b>final</b></font> String SUBJECT_CONTEXT_KEY = <font color="red">"javax.security.auth.Subject.container"</font>;
 
     @WebMethod
     <font color="navy"><b>public</b></font> String pesquisar(String nome) <font color="navy">{</font>
 
          <font color="darkgreen">// SecurityContextAssociation.getSecurityContext().getUtil().getSubject()</font>
          <font color="navy"><b>try</b></font> <font color="navy">{</font>
               Subject subject = (Subject) PolicyContext.getContext(SUBJECT_CONTEXT_KEY);
            PerfilPrincipal perfil = subject.getPrincipals(PerfilPrincipal.class).iterator().next();
               log.info(perfil.getUsuario().getNome());
               <font color="navy"><b>for</b></font> (PerfilWrapper perfilWrapper : perfil.getPerfis()) <font color="navy">{</font>
                    log.info(perfilWrapper.getPerfil().getNome());
               <font color="navy">}</font>
               log.info(<font color="red">"received = "</font> + nome);
          <font color="navy">}</font> <font color="navy"><b>catch</b></font> (PolicyContextException e) <font color="navy">{</font>
               e.printStackTrace();
          <font color="navy">}</font>
          <font color="navy"><b>return</b></font> nome + <font color="red">" results: "</font>;
     <font color="navy">}</font>
 
<font color="navy">}</font>
 
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><strong>myapp-jaxws-endpoint-config.xml</strong></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><pre class="jive-pre"><code class="jive-code jive-xml"><span class="jive-xml-tag"><?xml version="1.0" encoding="UTF-8"?></span>
<span class="jive-xml-tag"><span><jaxws-config xmlns="urn:jboss:jaxws-config:2.0" xmlns:xsi="</span><a class="jive-link-external-small" href="http://www.w3.org/2001/XMLSchema-instance" target="_blank">http://www.w3.org/2001/XMLSchema-instance</a><span>" xmlns:javaee="</span><a class="jive-link-external-small" href="http://java.sun.com/xml/ns/javaee" target="_blank">http://java.sun.com/xml/ns/javaee</a><span>"
  xsi:schemaLocation="urn:jboss:jaxws-config:2.0 schema/jaxws-config_2_0.xsd"></span></span>
  <span class="jive-xml-tag"><endpoint-config></span>
    <span class="jive-xml-tag"><config-name></span>Datasus WSSecurity Endpoint<span class="jive-xml-tag"></config-name></span>
    <span class="jive-xml-tag"><post-handler-chains></span>
      <span class="jive-xml-tag"><javaee:handler-chain></span>
        <span class="jive-xml-tag"><javaee:protocol-bindings></span>##SOAP11_HTTP ##SOAP11_HTTP_MTOM<span class="jive-xml-tag"></javaee:protocol-bindings></span>
        <span class="jive-xml-tag"><javaee:handler></span>
          <span class="jive-xml-tag"><javaee:handler-name></span>Autorizacao Handler<span class="jive-xml-tag"></javaee:handler-name></span>
          <span class="jive-xml-tag"><javaee:handler-class></span>br.com.myapp.jaas.spi.AutorizacaoWSHandler<span class="jive-xml-tag"></javaee:handler-class></span>
        <span class="jive-xml-tag"></javaee:handler></span>
        <span class="jive-xml-tag"><javaee:handler></span>
          <span class="jive-xml-tag"><javaee:handler-name></span>WSSecurity Handler<span class="jive-xml-tag"></javaee:handler-name></span>
          <span class="jive-xml-tag"><javaee:handler-class></span>org.jboss.ws.extensions.security.jaxws.WSSecurityHandlerServer<span class="jive-xml-tag"></javaee:handler-class></span>
        <span class="jive-xml-tag"></javaee:handler></span>
        <span class="jive-xml-tag"><javaee:handler></span>
          <span class="jive-xml-tag"><javaee:handler-name></span>Recording Handler<span class="jive-xml-tag"></javaee:handler-name></span>
          <span class="jive-xml-tag"><javaee:handler-class></span>org.jboss.wsf.framework.invocation.RecordingServerHandler<span class="jive-xml-tag"></javaee:handler-class></span>
        <span class="jive-xml-tag"></javaee:handler></span>
      <span class="jive-xml-tag"></javaee:handler-chain></span>
    <span class="jive-xml-tag"></post-handler-chains></span>
  <span class="jive-xml-tag"></endpoint-config></span>
<span class="jive-xml-tag"></jaxws-config></span>
</code></pre><p><strong>jboss-wsse-server.xml</strong></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><pre class="jive-pre"><code class="jive-code jive-xml"><span class="jive-xml-tag"><span><jboss-ws-security xmlns="</span><a class="jive-link-external-small" href="http://www.jboss.com/ws-security/config" target="_blank">http://www.jboss.com/ws-security/config</a><span>"
    xmlns:xsi="</span><a class="jive-link-external-small" href="http://ww.w3.org/2001/XMLSchema-instance" target="_blank">http://ww.w3.org/2001/XMLSchema-instance</a><span>"
    xsi:schemaLocation="</span><a class="jive-link-external-small" href="http://www.jboss.com/ws-security/config" target="_blank">http://www.jboss.com/ws-security/config</a><span>
                      </span><a class="jive-link-external-small" href="http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd" target="_blank">http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd</a><span>"></span></span>
    <span class="jive-xml-tag"><key-store-file></span>server_jbossws.jks<span class="jive-xml-tag"></key-store-file></span>
    <span class="jive-xml-tag"><key-store-password></span>admin123<span class="jive-xml-tag"></key-store-password></span>
    <span class="jive-xml-tag"><trust-store-file></span>server_jbossws_truststore.jks<span class="jive-xml-tag"></trust-store-file></span>
    <span class="jive-xml-tag"><trust-store-password></span>admin123<span class="jive-xml-tag"></trust-store-password></span>
    <span class="jive-xml-tag"><key-passwords></span>
        <span class="jive-xml-tag"><key-password alias="server_jbossws" password="admin123"/></span>
    <span class="jive-xml-tag"></key-passwords></span>
    <span class="jive-xml-tag"><config></span>
        <span class="jive-xml-tag"><sign  type="x509v3" alias="server_jbossws" includeTimestamp="false"/></span>
        <span class="jive-xml-tag"><encrypt type="x509v3" alias="client_jbossws" /></span>
        <span class="jive-xml-tag"><requires></span>
            <span class="jive-xml-tag"><signature/></span>
            <span class="jive-xml-tag"><encryption/></span>
        <span class="jive-xml-tag"></requires></span>
        <span class="jive-xml-tag"><authenticate></span>
            <span class="jive-xml-tag"><signatureCertAuth certificatePrincipal="br.com.myapp.jaas.spi.SubjectMapper"/></span>
        <span class="jive-xml-tag"></authenticate></span>
    <span class="jive-xml-tag"></config></span>   
<span class="jive-xml-tag"></jboss-ws-security></span>
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><strong>server_jbossws.jks</strong></p><pre>
$ keytool -list -v -keystore jaas-ms-ejb-ear.ear/jaas-ms-ejb-ws-1.0.0.jar/server_jbossws.jks -storepass admin123
Keystore type: JKS
Keystore provider: SUN
Your keystore contains 2 entries
Alias name: server_jbossws
Creation date: Mar 7, 2012
Entry type: PrivateKeyEntry
Certificate chain length: 1
Certificate[1]:
Owner: CN=jbossws server, OU=myapp, O=min_myapp, L=Brasilia, ST=DF, C=BR
Issuer: CN=jbossws server, OU=myapp, O=min_myapp, L=Brasilia, ST=DF, C=BR
Serial number: 4f57ba78
Valid from: Wed Mar 07 16:43:52 BRT 2012 until: Tue Jun 05 16:43:52 BRT 2012
Certificate fingerprints:
         MD5:  77:15:35:EA:A5:01:70:BB:FD:3D:99:11:7B:36:E8:3F
         SHA1: C0:68:43:28:D9:D9:6F:B7:75:62:02:0F:75:F8:19:D4:E8:50:24:C5
         Signature algorithm name: SHA1withRSA
         Version: 3
*******************************************
*******************************************
Alias name: client_jbossws
Creation date: Mar 7, 2012
Entry type: trustedCertEntry
Owner: CN=jbossws client, OU=myapp, O=min_myapp, L=Brasilia, ST=DF, C=BR
Issuer: CN=jbossws client, OU=myapp, O=min_myapp, L=Brasilia, ST=DF, C=BR
Serial number: 4f57baa3
Valid from: Wed Mar 07 16:44:35 BRT 2012 until: Tue Jun 05 16:44:35 BRT 2012
Certificate fingerprints:
         MD5:  78:48:E3:54:2D:85:7F:62:C7:48:2D:22:D3:DB:56:49
         SHA1: 15:D9:AB:33:2E:A2:BD:52:08:A0:1B:1F:16:C6:60:A2:29:A4:53:7D
         Signature algorithm name: SHA1withRSA
         Version: 3
</pre><p><strong>server_jbossws_truststore.jks</strong></p><pre>$ keytool -list -v -keystore jaas-ms-ejb-ear.ear/jaas-ms-ejb-ws-1.0.0.jar/server_jbossws_truststore.jks -storepass admin123
Keystore type: JKS
Keystore provider: SUN
Your keystore contains 2 entries
Alias name: server_jbossws
Creation date: Mar 7, 2012
Entry type: trustedCertEntry
Owner: CN=jbossws server, OU=myapp, O=min_myapp, L=Brasilia, ST=DF, C=BR
Issuer: CN=jbossws server, OU=myapp, O=min_myapp, L=Brasilia, ST=DF, C=BR
Serial number: 4f57ba78
Valid from: Wed Mar 07 16:43:52 BRT 2012 until: Tue Jun 05 16:43:52 BRT 2012
Certificate fingerprints:
         MD5:  77:15:35:EA:A5:01:70:BB:FD:3D:99:11:7B:36:E8:3F
         SHA1: C0:68:43:28:D9:D9:6F:B7:75:62:02:0F:75:F8:19:D4:E8:50:24:C5
         Signature algorithm name: SHA1withRSA
         Version: 3
*******************************************
*******************************************
Alias name: client_jbossws
Creation date: Mar 8, 2012
Entry type: trustedCertEntry
Owner: CN=jbossws client, OU=myapp, O=min_myapp, L=Brasilia, ST=DF, C=BR
Issuer: CN=jbossws client, OU=myapp, O=min_myapp, L=Brasilia, ST=DF, C=BR
Serial number: 4f57baa3
Valid from: Wed Mar 07 16:44:35 BRT 2012 until: Tue Jun 05 16:44:35 BRT 2012
Certificate fingerprints:
         MD5:  78:48:E3:54:2D:85:7F:62:C7:48:2D:22:D3:DB:56:49
         SHA1: 15:D9:AB:33:2E:A2:BD:52:08:A0:1B:1F:16:C6:60:A2:29:A4:53:7D
         Signature algorithm name: SHA1withRSA
         Version: 3
</pre><p><strong>Server log at initialization</strong></p><pre>
ServerEndpointMetaData:
type=JAXWS
qname={http://jaas.myapp.com.br/}PesquisarUsuarioEjbServicePort
id=jboss.ws:context=jaas-cert,endpoint=PesquisarUsuarioEjbService
address=http://localhost:8080/jaas-cert/PesquisarUsuarioEjbService
binding=http://schemas.xmlsoap.org/wsdl/soap/http
linkName=PesquisarUsuarioEjbService
implName=br.com.myapp.jaas.PesquisarUsuarioEjbService
seiName=br.com.myapp.jaas.IPesquisarUsuario
serviceMode=null
portComponentName=null
contextRoot=/jaas-cert
urlPattern=/PesquisarUsuarioEjbService
configFile=META-INF/myapp-jaxws-endpoint-config.xml
configName=MyApp WSSecurity Endpoint
authMethod=CLIENT-CERT
transportGuarantee=null
secureWSDLAccess=false
properties={}
OperationMetaData:
qname={http://jaas.myapp.com.br/}pesquisar
javaName=pesquisar
style=document/literal/WRAPPED
oneWay=false
soapAction=
ParameterMetaData:
xmlName={http://jaas.myapp.com.br/}pesquisar
partName=pesquisar
xmlType={http://jaas.myapp.com.br/}pesquisar
javaType=br.com.myapp.jaas.jaxws.Pesquisar
mode=IN
inHeader=false
index=0
wrappedParameters=[[name = arg0, type = java.lang.String, typeArgs = null, variable = arg0, index = 0]]
ReturnMetaData:
xmlName={http://jaas.myapp.com.br/}pesquisarResponse
partName=pesquisarResponse
xmlType={http://jaas.myapp.com.br/}pesquisarResponse
javaType=br.com.myapp.jaas.jaxws.PesquisarResponse
mode=OUT
inHeader=false
index=-1
wrappedParameters=[[name = return, type = java.lang.String, typeArgs = null, variable = return, index = -1]]
HandlerMetaDataJAXWS:
type=POST
name=Autorizacao Handler
class=class br.com.myapp.jaas.spi.AutorizacaoWSHandler
params=[]
protocols=##SOAP11_HTTP ##SOAP11_HTTP_MTOM
services=null
ports=null
HandlerMetaDataJAXWS:
type=POST
name=WSSecurity Handler
class=class org.jboss.ws.extensions.security.jaxws.WSSecurityHandlerServer
params=[]
protocols=##SOAP11_HTTP ##SOAP11_HTTP_MTOM
services=null
ports=null
HandlerMetaDataJAXWS:
type=POST
name=Recording Handler
class=class org.jboss.wsf.framework.invocation.RecordingServerHandler
params=[]
protocols=##SOAP11_HTTP ##SOAP11_HTTP_MTOM
services=null
ports=null
</pre><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><strong>Client organization</strong></p><pre><p>jaas-ms-client/</p><p>|-- bin</p><p>|   |-- br</p><p>|   |   `-- com</p><p>|   |       `-- myapp</p><p>|   |           `-- jaas</p><p>|   |               |-- IPesquisarUsuario.class</p><p>|   |               `-- spi</p><p>|   |                   |-- AutorizacaoWSHandler.class</p><p>|   |                   |-- MsUsernameTokenLoginModule.class</p><p>|   |                   |-- SubjectMapper.class</p><p>|   |                   `-- UserCertLoginModule.class</p><p>|   |-- JaasAuthClient.class</p><p>|   |-- JaasAuthClientSetup.class</p><p>|   |-- log4j.properties</p><p>|   `-- META-INF</p><p>|       |-- client_jbossws.jks</p><p>|       |-- client_jbossws_truststore.jks</p><p>|       |-- myapp-jaxws-client-config.xml</p><p>|       |-- jboss-wsse-client.xml</p><p>|       `-- standard-jaxws-client-config.xml</p></pre><p><strong>Client java class</strong></p><pre class="jive-pre"><code class="jive-code jive-java"><font color="navy"><b>public</b></font> <font color="navy"><b>class</b></font> JaasAuthClient <font color="navy">{</font>
 
    <font color="navy"><b>public</b></font> <font color="navy"><b>static</b></font> <font color="navy"><b>void</b></font> main(String[] args) <font color="navy"><b>throws</b></font> Exception <font color="navy">{</font>
        JaasAuthClientSetup setup = <font color="navy"><b>new</b></font> JaasAuthClientSetup();
        IPesquisarUsuario wsPesq = setup.getPesquisarUsuarioEjbServicePort();
        StubExt stubExt = (StubExt) wsPesq;
       
        stubExt.setConfigName(<font color="red">"Standard WSSecurity Client"</font>);
       
        System.out.println(<font color="red">"========================================"</font> );
        System.out.println(<font color="red">"=====>  config name =  "</font> + stubExt.getConfigName());
        System.out.println(<font color="red">"=====>  config file =  "</font> + stubExt.getConfigFile());
        System.out.println(<font color="red">"=====>  security config =  "</font> + stubExt.getSecurityConfig());
        System.out.println(<font color="red">"========================================"</font> );
        String res = wsPesq.pesquisar(<font color="red">"claudio"</font>);
        System.out.println(<font color="red">"resultado ws: "</font> + res);
    <font color="navy">}</font>
   
<font color="navy">}</font>
 
@WebServiceClient(name=<font color="red">"PesquisarUsuarioEjbServiceService"</font>,  targetNamespace=<font color="red">"http://jaas.myapp.com.br/"</font>,
    wsdlLocation=<font color="red">"http://localhost:8080/jaas-cert/PesquisarUsuarioEjbService?wsdl"</font>)
<font color="navy"><b>public</b></font> <font color="navy"><b>class</b></font> JaasAuthClientSetup <font color="navy"><b>extends</b></font> Service <font color="navy">{</font>
 
    <font color="navy"><b>public</b></font> JaasAuthClientSetup() <font color="navy"><b>throws</b></font> MalformedURLException <font color="navy">{</font>
        <font color="navy"><b>super</b></font>(<font color="navy"><b>new</b></font> URL(<font color="red">"http://localhost:8080/jaas-cert/PesquisarUsuarioEjbService?wsdl"</font>),
                <font color="navy"><b>new</b></font> QName(<font color="red">"http://jaas.myapp.com.br/"</font>, <font color="red">"PesquisarUsuarioEjbServiceService"</font>));
    <font color="navy">}</font>
   
    <font color="navy"><b>public</b></font> JaasAuthClientSetup(URL wsdlDocumentLocation, QName serviceName) <font color="navy">{</font>
        <font color="navy"><b>super</b></font>(wsdlDocumentLocation, serviceName);
    <font color="navy">}</font>
 
    @WebEndpoint(name=<font color="red">"PesquisarUsuarioEjbServicePort"</font>)
    <font color="navy"><b>public</b></font> IPesquisarUsuario getPesquisarUsuarioEjbServicePort() <font color="navy">{</font>
        <font color="navy"><b>return</b></font> (IPesquisarUsuario) super.getPort(<font color="navy"><b>new</b></font> QName(<font color="red">"http://jaas.myapp.com.br/"</font>, <font color="red">"PesquisarUsuarioEjbServicePort"</font>),
                IPesquisarUsuario.class);
    <font color="navy">}</font>
 
 
<font color="navy">}</font>
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><strong>jboss-wsse-client.xml</strong></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><pre class="jive-pre"><code class="jive-code jive-xml"><span class="jive-xml-tag"><span><jboss-ws-security
    xmlns="</span><a class="jive-link-external-small" href="http://www.jboss.com/ws-security/config" target="_blank">http://www.jboss.com/ws-security/config</a><span>"
    xmlns:xsi="</span><a class="jive-link-external-small" href="http://ww.w3.org/2001/XMLSchema-instance" target="_blank">http://ww.w3.org/2001/XMLSchema-instance</a><span>"
    xsi:schemaLocation="</span><a class="jive-link-external-small" href="http://www.jboss.com/ws-security/config" target="_blank">http://www.jboss.com/ws-security/config</a><span>
                      </span><a class="jive-link-external-small" href="http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd" target="_blank">http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd</a><span>"></span></span>
    <span class="jive-xml-tag"><key-store-file></span>META-INF/client_jbossws.jks<span class="jive-xml-tag"></key-store-file></span>
    <span class="jive-xml-tag"><key-store-password></span>admin123<span class="jive-xml-tag"></key-store-password></span>
    <span class="jive-xml-tag"><key-store-type></span>jks<span class="jive-xml-tag"></key-store-type></span>
    <span class="jive-xml-tag"><trust-store-file></span>META-INF/client_jbossws_truststore.jks<span class="jive-xml-tag"></trust-store-file></span>
    <span class="jive-xml-tag"><trust-store-password></span>admin123<span class="jive-xml-tag"></trust-store-password></span>
    <span class="jive-xml-tag"><trust-store-type></span>jks<span class="jive-xml-tag"></trust-store-type></span>
    <span class="jive-xml-tag"><key-passwords></span>
        <span class="jive-xml-tag"><key-password alias="client_jbossws" password="admin123"/></span>
    <span class="jive-xml-tag"></key-passwords></span>
    <span class="jive-xml-tag"><config></span>
        <span class="jive-xml-tag"><sign  type="x509v3" alias="client_jbossws" /></span>
        <span class="jive-xml-tag"><encrypt type="x509v3" alias="server_jbossws"/></span>
        <span class="jive-xml-tag"><requires></span>
            <span class="jive-xml-tag"><signature /></span>
            <span class="jive-xml-tag"><encryption /></span>
        <span class="jive-xml-tag"></requires></span>
    <span class="jive-xml-tag"></config></span>
<span class="jive-xml-tag"></jboss-ws-security></span>
</code></pre><p><strong>standard-jaxws-client-config.xml</strong></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><pre class="jive-pre"><code class="jive-code jive-xml"><span class="jive-xml-tag"><?xml version="1.0" encoding="UTF-8"?></span>
<span class="jive-xml-tag"><span><jaxws-config xmlns="urn:jboss:jaxws-config:2.0" xmlns:xsi="</span><a class="jive-link-external-small" href="http://www.w3.org/2001/XMLSchema-instance" target="_blank">http://www.w3.org/2001/XMLSchema-instance</a><span>" xmlns:javaee="</span><a class="jive-link-external-small" href="http://java.sun.com/xml/ns/javaee" target="_blank">http://java.sun.com/xml/ns/javaee</a><span>"
  xsi:schemaLocation="urn:jboss:jaxws-config:2.0 schema/jaxws-config_2_0.xsd"></span></span>
  <span class="jive-xml-tag"><client-config></span>
    <span class="jive-xml-tag"><config-name></span>Standard WSSecurity Client<span class="jive-xml-tag"></config-name></span>
    <span class="jive-xml-tag"><post-handler-chains></span>
      <span class="jive-xml-tag"><javaee:handler-chain></span>
        <span class="jive-xml-tag"><javaee:protocol-bindings></span>##SOAP11_HTTP ##SOAP11_HTTP_MTOM<span class="jive-xml-tag"></javaee:protocol-bindings></span>
        <span class="jive-xml-tag"><javaee:handler></span>
          <span class="jive-xml-tag"><javaee:handler-name></span>WSSecurityHandlerOutbound<span class="jive-xml-tag"></javaee:handler-name></span>
          <span class="jive-xml-tag"><javaee:handler-class></span>org.jboss.ws.extensions.security.jaxws.WSSecurityHandlerClient<span class="jive-xml-tag"></javaee:handler-class></span>
        <span class="jive-xml-tag"></javaee:handler></span>
      <span class="jive-xml-tag"></javaee:handler-chain></span>
    <span class="jive-xml-tag"></post-handler-chains></span>
  <span class="jive-xml-tag"></client-config></span>
<span class="jive-xml-tag"></jaxws-config></span>
</code></pre><p><strong>client_jbossws_truststore.jks</strong></p><pre>$ keytool -list -v -keystore src/META-INF/client_jbossws_truststore.jks  -storepass admin123
Keystore type: JKS
Keystore provider: SUN
Your keystore contains 2 entries
Alias name: client_jbossws
Creation date: Mar 7, 2012
Entry type: trustedCertEntry
Owner: CN=jbossws client, OU=myapp, O=min_myapp, L=Brasilia, ST=DF, C=BR
Issuer: CN=jbossws client, OU=myapp, O=min_myapp, L=Brasilia, ST=DF, C=BR
Serial number: 4f57baa3
Valid from: Wed Mar 07 16:44:35 BRT 2012 until: Tue Jun 05 16:44:35 BRT 2012
Certificate fingerprints:
         MD5:  78:48:E3:54:2D:85:7F:62:C7:48:2D:22:D3:DB:56:49
         SHA1: 15:D9:AB:33:2E:A2:BD:52:08:A0:1B:1F:16:C6:60:A2:29:A4:53:7D
         Signature algorithm name: SHA1withRSA
         Version: 3
*******************************************
*******************************************
Alias name: server_jbossws
Creation date: Mar 8, 2012
Entry type: trustedCertEntry
Owner: CN=jbossws server, OU=myapp, O=min_myapp, L=Brasilia, ST=DF, C=BR
Issuer: CN=jbossws server, OU=myapp, O=min_myapp, L=Brasilia, ST=DF, C=BR
Serial number: 4f57ba78
Valid from: Wed Mar 07 16:43:52 BRT 2012 until: Tue Jun 05 16:43:52 BRT 2012
Certificate fingerprints:
         MD5:  77:15:35:EA:A5:01:70:BB:FD:3D:99:11:7B:36:E8:3F
         SHA1: C0:68:43:28:D9:D9:6F:B7:75:62:02:0F:75:F8:19:D4:E8:50:24:C5
         Signature algorithm name: SHA1withRSA
         Version: 3
*******************************************
*******************************************
</pre><p><strong>client_jbossws.jks</strong></p><pre>$ keytool -list -v -keystore src/META-INF/client_jbossws.jks  -storepass admin123
Keystore type: JKS
Keystore provider: SUN
Your keystore contains 2 entries
Alias name: client_jbossws
Creation date: Mar 7, 2012
Entry type: PrivateKeyEntry
Certificate chain length: 1
Certificate[1]:
Owner: CN=jbossws client, OU=myapp, O=min_myapp, L=Brasilia, ST=DF, C=BR
Issuer: CN=jbossws client, OU=myapp, O=min_myapp, L=Brasilia, ST=DF, C=BR
Serial number: 4f57baa3
Valid from: Wed Mar 07 16:44:35 BRT 2012 until: Tue Jun 05 16:44:35 BRT 2012
Certificate fingerprints:
         MD5:  78:48:E3:54:2D:85:7F:62:C7:48:2D:22:D3:DB:56:49
         SHA1: 15:D9:AB:33:2E:A2:BD:52:08:A0:1B:1F:16:C6:60:A2:29:A4:53:7D
         Signature algorithm name: SHA1withRSA
         Version: 3
*******************************************
*******************************************
Alias name: server_jbossws
Creation date: Mar 7, 2012
Entry type: trustedCertEntry
Owner: CN=jbossws server, OU=myapp, O=min_myapp, L=Brasilia, ST=DF, C=BR
Issuer: CN=jbossws server, OU=myapp, O=min_myapp, L=Brasilia, ST=DF, C=BR
Serial number: 4f57ba78
Valid from: Wed Mar 07 16:43:52 BRT 2012 until: Tue Jun 05 16:43:52 BRT 2012
Certificate fingerprints:
         MD5:  77:15:35:EA:A5:01:70:BB:FD:3D:99:11:7B:36:E8:3F
         SHA1: C0:68:43:28:D9:D9:6F:B7:75:62:02:0F:75:F8:19:D4:E8:50:24:C5
         Signature algorithm name: SHA1withRSA
         Version: 3
*******************************************
*******************************************
</pre><p>The relevant client log</p><pre>
$ /opt/jboss-eap-5.1.2/jboss-as/bin/wsrunclient.sh -classpath bin/ JaasAuthClient
DEBUG [main] - START: rebuildMetaData
DEBUG [main] - setParameterStyle: null
DEBUG [main] - Create new config [name=Standard Client,file=META-INF/standard-jaxws-client-config.xml]
DEBUG [main] - getConfig: [name=Standard Client,url=META-INF/standard-jaxws-client-config.xml]
DEBUG [main] - parse: file:/home/claudio/alphaworks/projects/myapp/jaas/jaas-ms-client/bin/META-INF/standard-jaxws-client-config.xml
DEBUG [main] - Created parser: org.apache.xerces.jaxp.SAXParserImpl@1efb4be, isNamespaceAware: true, isValidating: true, isXIncludeAware: true
DEBUG [main] - http://xml.org/sax/features/validation set to: true
DEBUG [main] - http://xml.org/sax/features/namespaces set to: true
DEBUG [main] - http://apache.org/xml/features/validation/dynamic set to: true
DEBUG [main] - http://xml.org/sax/features/validation set to: true
DEBUG [main] - http://apache.org/xml/features/validation/schema set to: true
DEBUG [main] - Created parser: org.apache.xerces.jaxp.SAXParserImpl@1efb4be, isNamespaceAware: true, isValidating: true, isXIncludeAware: true
DEBUG [main] - resolveEntity: [pub=null,sysid=file:///home/claudio/alphaworks/projects/myapp/jaas/jaas-ms-client/schema/jaxws-config_2_0.xsd]
DEBUG [main] - resolveEntity: [pub=null,sysid=file:///home/claudio/alphaworks/projects/myapp/jaas/jaas-ms-client/schema/javaee_web_services_1_2.xsd]
DEBUG [main] - resolveEntity: [pub=null,sysid=file:///home/claudio/alphaworks/projects/myapp/jaas/jaas-ms-client/schema/javaee_5.xsd]
DEBUG [main] - resolveEntity: [pub=null,sysid=http://www.w3.org/2001/xml.xsd]
DEBUG [main] - resolveEntity: [pub=null,sysid=file:///home/claudio/alphaworks/projects/myapp/jaas/jaas-ms-client/schema/javaee_web_services_client_1_2.xsd]
DEBUG [main] - Configure EndpointMetaData
DEBUG [main] - Added 0 PRE handlers
DEBUG [main] - Added 0 ENDPOINT handlers
DEBUG [main] - Added 1 POST handlers
DEBUG [main] - Using default parameter style: WRAPPED
DEBUG [main] - Generating wrapper: br.com.myapp.jaas.jaxws.Pesquisar
DEBUG [main] - Generating wrapper: br.com.myapp.jaas.jaxws.PesquisarResponse
DEBUG [main] - JAXBContext [types=[class br.com.myapp.jaas.jaxws.Pesquisar, class br.com.myapp.jaas.jaxws.PesquisarResponse],tns=http://jaas.myapp.com.br/]
DEBUG [main] - Found best matching java method: public abstract java.lang.String br.com.myapp.jaas.IPesquisarUsuario.pesquisar(java.lang.String)
DEBUG [main] - END: rebuildMetaData
ServiceMetaData:
qname={http://jaas.myapp.com.br/}PesquisarUsuarioEjbServiceService
refName=null
wsdName=null
wsdlFile=null
wsdlLocation=http://localhost:8080/jaas-cert/PesquisarUsuarioEjbService?wsdl
jaxrpcMapping=null
publishLocation=null
securityConfig=null
properties=null
TypesMetaData:
  [complexType={http://jaas.myapp.com.br/}pesquisar,javaType=br.com.myapp.jaas.jaxws.Pesquisar]
  [complexType={http://jaas.myapp.com.br/}pesquisarResponse,javaType=br.com.myapp.jaas.jaxws.PesquisarResponse]
                   
ClientEndpointMetaData:
type=JAXWS
qname={http://jaas.myapp.com.br/}PesquisarUsuarioEjbServicePort
address=http://localhost:8080/jaas-cert/PesquisarUsuarioEjbService
binding=http://schemas.xmlsoap.org/wsdl/soap/http
seiName=br.com.myapp.jaas.IPesquisarUsuario
configFile=META-INF/standard-jaxws-client-config.xml
configName=Standard Client
authMethod=null
properties={}
OperationMetaData:
qname={http://jaas.myapp.com.br/}pesquisar
javaName=pesquisar
style=document/literal/WRAPPED
oneWay=false
soapAction=
ParameterMetaData:
xmlName={http://jaas.myapp.com.br/}pesquisar
partName=pesquisar
xmlType={http://jaas.myapp.com.br/}pesquisar
javaType=br.com.myapp.jaas.jaxws.Pesquisar
mode=IN
inHeader=false
index=0
wrappedParameters=[[name = arg0, type = java.lang.String, typeArgs = null, variable = arg0, index = 0]]
ReturnMetaData:
xmlName={http://jaas.myapp.com.br/}pesquisarResponse
partName=pesquisarResponse
xmlType={http://jaas.myapp.com.br/}pesquisarResponse
javaType=br.com.myapp.jaas.jaxws.PesquisarResponse
mode=OUT
inHeader=false
index=-1
wrappedParameters=[[name = return, type = java.lang.String, typeArgs = null, variable = return, index = -1]]
HandlerMetaDataJAXWS:
type=POST
name=WSSecurityHandlerOutbound
class=class org.jboss.ws.extensions.security.jaxws.WSSecurityHandlerClient
params=[]
protocols=##SOAP11_HTTP ##SOAP11_HTTP_MTOM
services=null
ports=null
DEBUG [main] - Configure SOAPBinding
DEBUG [main] - initHandlerChain: PRE
DEBUG [main] - initHandlerChain: ENDPOINT
DEBUG [main] - initHandlerChain: POST
DEBUG [main] - addHandler:
HandlerMetaDataJAXWS:
type=POST
name=WSSecurityHandlerOutbound
class=class org.jboss.ws.extensions.security.jaxws.WSSecurityHandlerClient
params=[]
protocols=##SOAP11_HTTP ##SOAP11_HTTP_MTOM
services=null
ports=null
DEBUG [main] - getHandlerChain: [type=PRE,info=[service={http://jaas.myapp.com.br/}PesquisarUsuarioEjbServiceService,port={http://jaas.myapp.com.br/}PesquisarUsuarioEjbServicePort,binding=http://schemas.xmlsoap.org/wsdl/soap/http]]
DEBUG [main] - getHandlerChain: [type=POST,info=[service={http://jaas.myapp.com.br/}PesquisarUsuarioEjbServiceService,port={http://jaas.myapp.com.br/}PesquisarUsuarioEjbServicePort,binding=http://schemas.xmlsoap.org/wsdl/soap/http]]
DEBUG [main] - getHandlerChain: [type=ENDPOINT,info=[service={http://jaas.myapp.com.br/}PesquisarUsuarioEjbServiceService,port={http://jaas.myapp.com.br/}PesquisarUsuarioEjbServicePort,binding=http://schemas.xmlsoap.org/wsdl/soap/http]]
DEBUG [main] - setHandlerChain: []
DEBUG [main] - No port configuration for: {http://jaas.myapp.com.br/}PesquisarUsuarioEjbServicePort
DEBUG [main] - Create new config [name=Standard WSSecurity Client,file=META-INF/standard-jaxws-client-config.xml]
DEBUG [main] - getConfig: [name=Standard WSSecurity Client,url=META-INF/standard-jaxws-client-config.xml]
DEBUG [main] - parse: file:/home/claudio/alphaworks/projects/myapp/jaas/jaas-ms-client/bin/META-INF/standard-jaxws-client-config.xml
DEBUG [main] - Created parser: org.apache.xerces.jaxp.SAXParserImpl@146b6db, isNamespaceAware: true, isValidating: true, isXIncludeAware: true
DEBUG [main] - http://xml.org/sax/features/validation set to: true
DEBUG [main] - http://xml.org/sax/features/namespaces set to: true
DEBUG [main] - http://apache.org/xml/features/validation/dynamic set to: true
DEBUG [main] - http://xml.org/sax/features/validation set to: true
DEBUG [main] - http://apache.org/xml/features/validation/schema set to: true
DEBUG [main] - Created parser: org.apache.xerces.jaxp.SAXParserImpl@146b6db, isNamespaceAware: true, isValidating: true, isXIncludeAware: true
DEBUG [main] - resolveEntity: [pub=null,sysid=file:///home/claudio/alphaworks/projects/myapp/jaas/jaas-ms-client/schema/jaxws-config_2_0.xsd]
DEBUG [main] - resolveEntity: [pub=null,sysid=file:///home/claudio/alphaworks/projects/myapp/jaas/jaas-ms-client/schema/javaee_web_services_1_2.xsd]
DEBUG [main] - resolveEntity: [pub=null,sysid=file:///home/claudio/alphaworks/projects/myapp/jaas/jaas-ms-client/schema/javaee_5.xsd]
DEBUG [main] - resolveEntity: [pub=null,sysid=http://www.w3.org/2001/xml.xsd]
DEBUG [main] - resolveEntity: [pub=null,sysid=file:///home/claudio/alphaworks/projects/myapp/jaas/jaas-ms-client/schema/javaee_web_services_client_1_2.xsd]
DEBUG [main] - Configure EndpointMetaData
DEBUG [main] - Added 0 PRE handlers
DEBUG [main] - Added 0 ENDPOINT handlers
DEBUG [main] - Added 1 POST handlers
DEBUG [main] - initHandlerChain: PRE
DEBUG [main] - initHandlerChain: ENDPOINT
DEBUG [main] - initHandlerChain: POST
DEBUG [main] - addHandler:
HandlerMetaDataJAXWS:
type=POST
name=WSSecurityHandlerOutbound
class=class org.jboss.ws.extensions.security.jaxws.WSSecurityHandlerClient
params=[]
protocols=##SOAP11_HTTP ##SOAP11_HTTP_MTOM
services=null
ports=null
DEBUG [main] - getHandlerChain: [type=PRE,info=[service={http://jaas.myapp.com.br/}PesquisarUsuarioEjbServiceService,port={http://jaas.myapp.com.br/}PesquisarUsuarioEjbServicePort,binding=http://schemas.xmlsoap.org/wsdl/soap/http]]
DEBUG [main] - getHandlerChain: [type=POST,info=[service={http://jaas.myapp.com.br/}PesquisarUsuarioEjbServiceService,port={http://jaas.myapp.com.br/}PesquisarUsuarioEjbServicePort,binding=http://schemas.xmlsoap.org/wsdl/soap/http]]
DEBUG [main] - getHandlerChain: [type=ENDPOINT,info=[service={http://jaas.myapp.com.br/}PesquisarUsuarioEjbServiceService,port={http://jaas.myapp.com.br/}PesquisarUsuarioEjbServicePort,binding=http://schemas.xmlsoap.org/wsdl/soap/http]]
DEBUG [main] - setHandlerChain: []
========================================
=====>  config name =  Standard WSSecurity Client
=====>  config file =  META-INF/standard-jaxws-client-config.xml
=====>  security config =  null
========================================
DEBUG [main] - pushMessageContext: org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS@504ec1 (Thread main)
DEBUG [main] - wrapRequestParameters: br.com.myapp.jaas.jaxws.Pesquisar
DEBUG [main] - setRequestParamValue: [name={http://jaas.myapp.com.br/}pesquisar,value=br.com.myapp.jaas.jaxws.Pesquisar]
DEBUG [main] - bindRequestMessage: {http://jaas.myapp.com.br/}pesquisar
DEBUG [main] - getRequestParamValue: {http://jaas.myapp.com.br/}pesquisar
DEBUG [main] - transformPayloadValue: br.com.myapp.jaas.jaxws.Pesquisar -> br.com.myapp.jaas.jaxws.Pesquisar
DEBUG [main] - Create a handler executor: []
DEBUG [main] - Create a handler executor: []
DEBUG [main] - Create a handler executor: [WSSecurityHandlerOutbound]
DEBUG [main] - Enter: handleOutBoundMessage
DEBUG [main] - createConfiguration from: file:/home/claudio/alphaworks/projects/myapp/jaas/jaas-ms-client/bin/META-INF/jboss-wsse-client.xml
DEBUG [main] - Created parser: org.apache.xerces.jaxp.SAXParserImpl@4b82d2, isNamespaceAware: true, isValidating: true, isXIncludeAware: true
DEBUG [main] - http://xml.org/sax/features/validation set to: true
DEBUG [main] - http://xml.org/sax/features/namespaces set to: true
DEBUG [main] - http://apache.org/xml/features/validation/dynamic set to: true
DEBUG [main] - Created parser: org.apache.xerces.jaxp.SAXParserImpl@4b82d2, isNamespaceAware: true, isValidating: true, isXIncludeAware: true
DEBUG [main] - Add keystore: file:/home/claudio/alphaworks/projects/myapp/jaas/jaas-ms-client/bin/META-INF/client_jbossws.jks
DEBUG [main] - Add truststore: file:/home/claudio/alphaworks/projects/myapp/jaas/jaas-ms-client/bin/META-INF/client_jbossws_truststore.jks
DEBUG [main] - WS-Security config: org.jboss.ws.metadata.wsse.Config@166f9b9
DEBUG [main] - -----------------------------------
DEBUG [main] - Transitioning from OBJECT_VALID to DOM_VALID
DEBUG [main] - getXMLFragment from Object [xmlType={http://jaas.myapp.com.br/}pesquisar,javaType=class br.com.myapp.jaas.jaxws.Pesquisar]
DEBUG [main] - serialize: [xmlName={http://jaas.myapp.com.br/}pesquisar,xmlType={http://jaas.myapp.com.br/}pesquisar]
DEBUG [main] - serialized: claudioDEBUG [main] - xmlFragment: [source=claudio]
DEBUG [main] - -----------------------------------
DEBUG [main] - Encoding Message:
       claudio   DEBUG [main] - loadStore: file:/home/claudio/alphaworks/projects/myapp/jaas/jaas-ms-client/bin/META-INF/client_jbossws.jks
DEBUG [main] - loadStore: file:/home/claudio/alphaworks/projects/myapp/jaas/jaas-ms-client/bin/META-INF/client_jbossws_truststore.jks
DEBUG [main] - Canonicalizer.register(http://www.w3.org/TR/2001/REC-xml-c14n-20010315, org.apache.xml.security.c14n.implementations.Canonicalizer20010315OmitComments)
DEBUG [main] - Canonicalizer.register(http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments, org.apache.xml.security.c14n.implementations.Canonicalizer20010315WithComments)
DEBUG [main] - Canonicalizer.register(http://www.w3.org/2001/10/xml-exc-c14n#, org.apache.xml.security.c14n.implementations.Canonicalizer20010315ExclOmitComments)
DEBUG [main] - Canonicalizer.register(http://www.w3.org/2001/10/xml-exc-c14n#WithComments, org.apache.xml.security.c14n.implementations.Canonicalizer20010315ExclWithComments)
DEBUG [main] - Canonicalizer.register(http://www.w3.org/2006/12/xml-c14n11, org.apache.xml.security.c14n.implementations.Canonicalizer11_OmitComments)
DEBUG [main] - Canonicalizer.register(http://www.w3.org/2006/12/xml-c14n11#WithComments, org.apache.xml.security.c14n.implementations.Canonicalizer11_WithComments)
DEBUG [main] - Transform.register(http://www.w3.org/2000/09/xmldsig#base64, org.apache.xml.security.transforms.implementations.TransformBase64Decode)
DEBUG [main] - Transform.register(http://www.w3.org/TR/2001/REC-xml-c14n-20010315, org.apache.xml.security.transforms.implementations.TransformC14N)
DEBUG [main] - Transform.register(http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments, org.apache.xml.security.transforms.implementations.TransformC14NWithComments)
DEBUG [main] - Transform.register(http://www.w3.org/2006/12/xml-c14n11, org.apache.xml.security.transforms.implementations.TransformC14N11)
DEBUG [main] - Transform.register(http://www.w3.org/2006/12/xml-c14n11#WithComments, org.apache.xml.security.transforms.implementations.TransformC14N11_WithComments)
DEBUG [main] - Transform.register(http://www.w3.org/2001/10/xml-exc-c14n#, org.apache.xml.security.transforms.implementations.TransformC14NExclusive)
DEBUG [main] - Transform.register(http://www.w3.org/2001/10/xml-exc-c14n#WithComments, org.apache.xml.security.transforms.implementations.TransformC14NExclusiveWithComments)
DEBUG [main] - Transform.register(http://www.w3.org/TR/1999/REC-xpath-19991116, org.apache.xml.security.transforms.implementations.TransformXPath)
DEBUG [main] - Transform.register(http://www.w3.org/2000/09/xmldsig#enveloped-signature, org.apache.xml.security.transforms.implementations.TransformEnvelopedSignature)
DEBUG [main] - Transform.register(http://www.w3.org/TR/1999/REC-xslt-19991116, org.apache.xml.security.transforms.implementations.TransformXSLT)
DEBUG [main] - Transform.register(http://www.w3.org/2002/04/xmldsig-filter2, org.apache.xml.security.transforms.implementations.TransformXPath2Filter)
DEBUG [main] - Transform.register(http://www.w3.org/2002/06/xmldsig-filter2, org.apache.xml.security.transforms.implementations.TransformXPath2Filter)
DEBUG [main] - Init() called
DEBUG [main] - SignatureAlgorithm.register(http://www.w3.org/2000/09/xmldsig#dsa-sha1, org.apache.xml.security.algorithms.implementations.SignatureDSA)
DEBUG [main] - Try to register http://www.w3.org/2000/09/xmldsig#dsa-sha1 org.apache.xml.security.algorithms.implementations.SignatureDSA
DEBUG [main] - SignatureAlgorithm.register(http://www.w3.org/2000/09/xmldsig#rsa-sha1, org.apache.xml.security.algorithms.implementations.SignatureBaseRSA$SignatureRSASHA1)
DEBUG [main] - Try to register http://www.w3.org/2000/09/xmldsig#rsa-sha1 org.apache.xml.security.algorithms.implementations.SignatureBaseRSA$SignatureRSASHA1
DEBUG [main] - SignatureAlgorithm.register(http://www.w3.org/2000/09/xmldsig#hmac-sha1, org.apache.xml.security.algorithms.implementations.IntegrityHmac$IntegrityHmacSHA1)
DEBUG [main] - Try to register http://www.w3.org/2000/09/xmldsig#hmac-sha1 org.apache.xml.security.algorithms.implementations.IntegrityHmac$IntegrityHmacSHA1
DEBUG [main] - SignatureAlgorithm.register(http://www.w3.org/2001/04/xmldsig-more#rsa-md5, org.apache.xml.security.algorithms.implementations.SignatureBaseRSA$SignatureRSAMD5)
DEBUG [main] - Try to register http://www.w3.org/2001/04/xmldsig-more#rsa-md5 org.apache.xml.security.algorithms.implementations.SignatureBaseRSA$SignatureRSAMD5
DEBUG [main] - SignatureAlgorithm.register(http://www.w3.org/2001/04/xmldsig-more#rsa-ripemd160, org.apache.xml.security.algorithms.implementations.SignatureBaseRSA$SignatureRSARIPEMD160)
DEBUG [main] - Try to register http://www.w3.org/2001/04/xmldsig-more#rsa-ripemd160 org.apache.xml.security.algorithms.implementations.SignatureBaseRSA$SignatureRSARIPEMD160
DEBUG [main] - SignatureAlgorithm.register(http://www.w3.org/2001/04/xmldsig-more#rsa-sha256, org.apache.xml.security.algorithms.implementations.SignatureBaseRSA$SignatureRSASHA256)
DEBUG [main] - Try to register http://www.w3.org/2001/04/xmldsig-more#rsa-sha256 org.apache.xml.security.algorithms.implementations.SignatureBaseRSA$SignatureRSASHA256
DEBUG [main] - SignatureAlgorithm.register(http://www.w3.org/2001/04/xmldsig-more#rsa-sha384, org.apache.xml.security.algorithms.implementations.SignatureBaseRSA$SignatureRSASHA384)
DEBUG [main] - Try to register http://www.w3.org/2001/04/xmldsig-more#rsa-sha384 org.apache.xml.security.algorithms.implementations.SignatureBaseRSA$SignatureRSASHA384
DEBUG [main] - SignatureAlgorithm.register(http://www.w3.org/2001/04/xmldsig-more#rsa-sha512, org.apache.xml.security.algorithms.implementations.SignatureBaseRSA$SignatureRSASHA512)
DEBUG [main] - Try to register http://www.w3.org/2001/04/xmldsig-more#rsa-sha512 org.apache.xml.security.algorithms.implementations.SignatureBaseRSA$SignatureRSASHA512
DEBUG [main] - SignatureAlgorithm.register(http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1, org.apache.xml.security.algorithms.implementations.SignatureECDSA$SignatureECDSASHA1)
DEBUG [main] - Try to register http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1 org.apache.xml.security.algorithms.implementations.SignatureECDSA$SignatureECDSASHA1
DEBUG [main] - SignatureAlgorithm.register(http://www.w3.org/2001/04/xmldsig-more#hmac-md5, org.apache.xml.security.algorithms.implementations.IntegrityHmac$IntegrityHmacMD5)
DEBUG [main] - Try to register http://www.w3.org/2001/04/xmldsig-more#hmac-md5 org.apache.xml.security.algorithms.implementations.IntegrityHmac$IntegrityHmacMD5
DEBUG [main] - SignatureAlgorithm.register(http://www.w3.org/2001/04/xmldsig-more#hmac-ripemd160, org.apache.xml.security.algorithms.implementations.IntegrityHmac$IntegrityHmacRIPEMD160)
DEBUG [main] - Try to register http://www.w3.org/2001/04/xmldsig-more#hmac-ripemd160 org.apache.xml.security.algorithms.implementations.IntegrityHmac$IntegrityHmacRIPEMD160
DEBUG [main] - SignatureAlgorithm.register(http://www.w3.org/2001/04/xmldsig-more#hmac-sha256, org.apache.xml.security.algorithms.implementations.IntegrityHmac$IntegrityHmacSHA256)
DEBUG [main] - Try to register http://www.w3.org/2001/04/xmldsig-more#hmac-sha256 org.apache.xml.security.algorithms.implementations.IntegrityHmac$IntegrityHmacSHA256
DEBUG [main] - SignatureAlgorithm.register(http://www.w3.org/2001/04/xmldsig-more#hmac-sha384, org.apache.xml.security.algorithms.implementations.IntegrityHmac$IntegrityHmacSHA384)
DEBUG [main] - Try to register http://www.w3.org/2001/04/xmldsig-more#hmac-sha384 org.apache.xml.security.algorithms.implementations.IntegrityHmac$IntegrityHmacSHA384
DEBUG [main] - SignatureAlgorithm.register(http://www.w3.org/2001/04/xmldsig-more#hmac-sha512, org.apache.xml.security.algorithms.implementations.IntegrityHmac$IntegrityHmacSHA512)
DEBUG [main] - Try to register http://www.w3.org/2001/04/xmldsig-more#hmac-sha512 org.apache.xml.security.algorithms.implementations.IntegrityHmac$IntegrityHmacSHA512
DEBUG [main] - Register Resolver: org.apache.xml.security.utils.resolver.implementations.ResolverDirectHTTP: A simple resolver for requests to HTTP space
DEBUG [main] - Register Resolver: org.apache.xml.security.utils.resolver.implementations.ResolverLocalFilesystem: A simple resolver for requests to the local file system
DEBUG [main] - Register Resolver: org.apache.xml.security.utils.resolver.implementations.ResolverFragment: A simple resolver for requests of same-document URIs
DEBUG [main] - Register Resolver: org.apache.xml.security.utils.resolver.implementations.ResolverXPointer: A simple resolver for requests of XPointer fragents
DEBUG [main] - Register Resolver: org.apache.xml.security.keys.keyresolver.implementations.RSAKeyValueResolver: Can extract RSA public keys
DEBUG [main] - Register Resolver: org.apache.xml.security.keys.keyresolver.implementations.DSAKeyValueResolver: Can extract DSA public keys
DEBUG [main] - Register Resolver: org.apache.xml.security.keys.keyresolver.implementations.X509CertificateResolver: Can extract public keys from X509 certificates
DEBUG [main] - Register Resolver: org.apache.xml.security.keys.keyresolver.implementations.X509SKIResolver: Uses an X509v3 SubjectKeyIdentifier extension to retrieve a certificate from the storages
DEBUG [main] - Register Resolver: org.apache.xml.security.keys.keyresolver.implementations.RetrievalMethodResolver: Resolves keys and certificates using ResourceResolvers
DEBUG [main] - Register Resolver: org.apache.xml.security.keys.keyresolver.implementations.X509SubjectNameResolver: Uses an X509 SubjectName to retrieve a certificate from the storages
DEBUG [main] - Register Resolver: org.apache.xml.security.keys.keyresolver.implementations.X509IssuerSerialResolver: Uses an X509 IssuerName and IssuerSerial to retrieve a certificate from the storages
DEBUG [main] - Now I try to bind prefixes:
DEBUG [main] - Now I try to bind ds to http://www.w3.org/2000/09/xmldsig#
DEBUG [main] - Now I try to bind xenc to http://www.w3.org/2001/04/xmlenc#
DEBUG [main] - Now I try to bind experimental to http://www.xmlsecurity.org/experimental#
DEBUG [main] - Now I try to bind dsig-xpath-old to http://www.w3.org/2002/04/xmldsig-filter2
DEBUG [main] - Now I try to bind dsig-xpath to http://www.w3.org/2002/06/xmldsig-filter2
DEBUG [main] - Now I try to bind ec to http://www.w3.org/2001/10/xml-exc-c14n#
DEBUG [main] - Now I try to bind xx to http://www.nue.et-inf.uni-siegen.de/~geuer-pollmann/#xpathFilter
DEBUG [main] - XX_init                             146 ms
DEBUG [main] -   XX_prng                           0 ms
DEBUG [main] -   XX_parsing                        36 ms
DEBUG [main] -   XX_configure_i18n                 16 ms
DEBUG [main] -   XX_configure_reg_c14n             18 ms
DEBUG [main] -   XX_configure_reg_jcemapper        5 ms
DEBUG [main] -   XX_configure_reg_keyInfo          6 ms
DEBUG [main] -   XX_configure_reg_keyResolver      10 ms
DEBUG [main] -   XX_configure_reg_prefixes         1 ms
DEBUG [main] -   XX_configure_reg_resourceresolver 18 ms
DEBUG [main] -   XX_configure_reg_sigalgos         19 ms
DEBUG [main] -   XX_configure_reg_transforms       16 ms
DEBUG [main] - Transforms.addTransform(http://www.w3.org/2001/10/xml-exc-c14n#)
DEBUG [main] - Create URI "http://www.w3.org/2001/10/xml-exc-c14n#" class "class org.apache.xml.security.transforms.implementations.TransformC14NExclusive"
DEBUG [main] - The NodeList is null
DEBUG [main] - Transforms.addTransform(http://www.w3.org/2001/10/xml-exc-c14n#)
DEBUG [main] - Request for URI http://www.w3.org/2000/09/xmldsig#sha1
DEBUG [main] - Transforms.addTransform(http://www.w3.org/2001/10/xml-exc-c14n#)
DEBUG [main] - Create URI "http://www.w3.org/2001/10/xml-exc-c14n#" class "class org.apache.xml.security.transforms.implementations.TransformC14NExclusive"
DEBUG [main] - The NodeList is null
DEBUG [main] - Transforms.addTransform(http://www.w3.org/2001/10/xml-exc-c14n#)
DEBUG [main] - Create URI "http://www.w3.org/2000/09/xmldsig#rsa-sha1" class "class org.apache.xml.security.algorithms.implementations.SignatureBaseRSA$SignatureRSASHA1"
DEBUG [main] - Request for URI http://www.w3.org/2000/09/xmldsig#rsa-sha1
DEBUG [main] - Created SignatureRSA using SHA1withRSA
DEBUG [main] - I was asked to create a ResourceResolver and got 1
DEBUG [main] -  extra resolvers to my existing 4 system-wide resolvers
DEBUG [main] - check resolvability by class org.jboss.ws.extensions.security.WsuIdResolver
DEBUG [main] - setElement("ds:Transform", "null")
DEBUG [main] - Pre-digested input:
DEBUG [main] - claudioDEBUG [main] - I was asked to create a ResourceResolver and got 1
DEBUG [main] -  extra resolvers to my existing 4 system-wide resolvers
DEBUG [main] - check resolvability by class org.jboss.ws.extensions.security.WsuIdResolver
DEBUG [main] - setElement("ds:Transform", "null")
DEBUG [main] - Pre-digested input:
DEBUG [main] - 2012-03-13T20:48:22.843ZDEBUG [main] - Canonicalized SignedInfo:
DEBUG [main] - 9tKRdsLGTAHmI9yKcnih3TQ70B4=GYbJeXFXc2DObR0bHo9BLdAB3Ug=DEBUG [main] - Getting XMLCipher...
DEBUG [main] - Constructing XMLCipher...
DEBUG [main] - Request for URI http://www.w3.org/2001/04/xmlenc#aes128-cbc
DEBUG [main] - cihper.algoritm = AES/CBC/ISO10126Padding
DEBUG [main] - Initializing XMLCipher...
DEBUG [main] - opmode = ENCRYPT_MODE
DEBUG [main] - Initializing XMLCipher...
DEBUG [main] - opmode = ENCRYPT_MODE
DEBUG [main] - Returning EncryptedData
DEBUG [main] - Processing source element...
DEBUG [main] - Encrypting element content...
DEBUG [main] - Encrypting element...
DEBUG [main] - Serialized octets:
claudioDEBUG [main] - Expected cipher.outputSize = 240
DEBUG [main] - Actual cipher.outputSize = 240
DEBUG [main] - Encrypted octets:
O7DrN9b0ttATynzRSC/1+IZ+ZcV+Ifzlw8dL/OQYFOzDiWb54AZF1l1+zA31jkARytk1J4tYPY+a
ScAcBN0RXZjFEtqq20+DuBspGNRmTMB6EHWpCElCJmOs9jAPoNx6CTfFjPfpLFV+/fc8tLwjEyT5
2VJmL+gUkB501NwBUiE87IF4HBOSpLS6LKEM/x1sxqNj9KZndwKHuRdHpjzLPx/dP223SV1myhuJ
XIRZt5srrX8ZMxZJU/rby/NTjxfQ0G78RiaxIuqrVfRG1ZLbSZiGxnZP+M6Jfkd3RdJoA+fFTaJ2
n6+5wvNCqtiyi6OoOcDX9cV04yDEGcDhzP6veg==
DEBUG [main] - Encrypted octets length = 348
DEBUG [main] - Getting XMLCipher...
DEBUG [main] - Constructing XMLCipher...
DEBUG [main] - Request for URI http://www.w3.org/2001/04/xmlenc#rsa-1_5
DEBUG [main] - cihper.algoritm = RSA/ECB/PKCS1Padding
DEBUG [main] - Initializing XMLCipher...
DEBUG [main] - opmode = WRAP_MODE
DEBUG [main] - Encrypting key ...
DEBUG [main] - Encrypted key octets:
YeNE51YUZL82XMZyfetnRDBMF+SRbw0PO+26U3tL4LYZbNJXLb+PJjp6gvf1OH3/LlX4VhDRMBA0
JVRSuVuDdQrC008vG5Vr6TqIgiv4W2qbpFAZkrbIPdwlzuxNklplzB0tGZE8pW0nQ51Jywy9W4RA
GKvy1zbO2sqHLdXOW1s=
DEBUG [main] - Encrypted key octets length = 174
DEBUG [main] - Exit: handleOutBoundMessage with status: true
DEBUG [main] - Get locator for: [addr=http://localhost:8080/jaas-cert/PesquisarUsuarioEjbService,props={javax.xml.ws.service.endpoint.address=http://localhost:8080/jaas-cert/PesquisarUsuarioEjbService}]
DEBUG [main] - Remoting version: 2.5.4.SP3 (Flounder)
DEBUG [main] - Client[25793043:a15l2r-h22djk-gzrey6ey-1-gzrey6f0-2] setting invokerDestructionDelay to 5000
DEBUG [main] - Client[25793043:a15l2r-h22djk-gzrey6ey-1-gzrey6f0-2].connect(null)
DEBUG [main] - org.jboss.remoting.transport.http.HTTPClientInvoker@1f68272 setting unmarshalNullStream to true
DEBUG [main] - org.jboss.remoting.transport.http.HTTPClientInvoker@1f68272 setting disconnectAfterUse to true
DEBUG [main] - org.jboss.remoting.transport.http.HTTPClientInvoker@1f68272 connecting
DEBUG [main] - org.jboss.remoting.transport.http.HTTPClientInvoker@1f68272 connected
DEBUG [main] - Client[25793043:a15l2r-h22djk-gzrey6ey-1-gzrey6f0-2] connected to InvokerLocator [http://localhost:8080/jaas-cert/PesquisarUsuarioEjbService]
DEBUG [main] - Client[25793043:a15l2r-h22djk-gzrey6ey-1-gzrey6f0-2] clientCounter: 1
DEBUG [main] - Client[25793043:a15l2r-h22djk-gzrey6ey-1-gzrey6f0-2] is connected
DEBUG [main] - Remoting metadata: {NoThrowOnError=true, HEADER={SOAPAction="", Content-Type=text/xml; charset=UTF-8}}
DEBUG [main] - Setting request header with SOAPAction : ""
DEBUG [main] - Setting request header with Content-Type : text/xml; charset=UTF-8
DEBUG [main] - Cannot connect on attempt 1
ERROR [main] - Exception caught while (preparing for) performing the invocation:
java.io.IOException: Could not transmit message
        at org.jboss.ws.core.client.HTTPRemotingConnection.invoke(HTTPRemotingConnection.java:267)
        at org.jboss.ws.core.client.SOAPProtocolConnectionHTTP.invoke(SOAPProtocolConnectionHTTP.java:71)
        at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:360)
        at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:232)
        at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:171)
        at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:157)
        at $Proxy12.pesquisar(Unknown Source)
        at JaasAuthClient.main(JaasAuthClient.java:33)
Caused by: org.jboss.remoting.CannotConnectException: Can not connect http client invoker after 1 attempt(s)
        at org.jboss.remoting.transport.http.HTTPClientInvoker.makeInvocation(HTTPClientInvoker.java:271)
        at org.jboss.remoting.transport.http.HTTPClientInvoker.transport(HTTPClientInvoker.java:176)
        at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:169)
        at org.jboss.remoting.Client.invoke(Client.java:2070)
        at org.jboss.remoting.Client.invoke(Client.java:879)
        at org.jboss.ws.core.client.HTTPRemotingConnection.invoke(HTTPRemotingConnection.java:246)
        ... 7 more
Caused by: org.jboss.ws.WSException: Invalid HTTP server response [401] - Unauthorized
        at org.jboss.ws.core.soap.SOAPMessageUnMarshallerHTTP.read(SOAPMessageUnMarshallerHTTP.java:75)
        at org.jboss.remoting.transport.http.HTTPClientInvoker.readResponse(HTTPClientInvoker.java:608)
        at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:402)
        at org.jboss.remoting.transport.http.HTTPClientInvoker.makeInvocation(HTTPClientInvoker.java:253)
        ... 12 more
DEBUG [main] - Begin response processing
DEBUG [main] - popMessageContext: org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS@504ec1 (Thread main)
DEBUG [main] - pushMessageContext: org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS@11df164 (Thread main)
DEBUG [main] - Enter: handleIn BoundFault
ERROR [main] - SOAP request exception
java.io.IOException: Could not transmit message
        at org.jboss.ws.core.client.HTTPRemotingConnection.invoke(HTTPRemotingConnection.java:267)
        at org.jboss.ws.core.client.SOAPProtocolConnectionHTTP.invoke(SOAPProtocolConnectionHTTP.java:71)
        at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:360)
        at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:232)
        at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:171)
        at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:157)
        at $Proxy12.pesquisar(Unknown Source)
        at JaasAuthClient.main(JaasAuthClient.java:33)
Caused by: org.jboss.remoting.CannotConnectException: Can not connect http client invoker after 1 attempt(s)
        at org.jboss.remoting.transport.http.HTTPClientInvoker.makeInvocation(HTTPClientInvoker.java:271)
        at org.jboss.remoting.transport.http.HTTPClientInvoker.transport(HTTPClientInvoker.java:176)
        at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:169)
        at org.jboss.remoting.Client.invoke(Client.java:2070)
        at org.jboss.remoting.Client.invoke(Client.java:879)
        at org.jboss.ws.core.client.HTTPRemotingConnection.invoke(HTTPRemotingConnection.java:246)
        ... 7 more
Caused by: org.jboss.ws.WSException: Invalid HTTP server response [401] - Unauthorized
        at org.jboss.ws.core.soap.SOAPMessageUnMarshallerHTTP.read(SOAPMessageUnMarshallerHTTP.java:75)
        at org.jboss.remoting.transport.http.HTTPClientInvoker.readResponse(HTTPClientInvoker.java:608)
        at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:402)
        at org.jboss.remoting.transport.http.HTTPClientInvoker.makeInvocation(HTTPClientInvoker.java:253)
        ... 12 more
DEBUG [main] - Cannot obtain fault meta data for: class java.io.IOException
DEBUG [main] - Exit: handleIn BoundFault with status: true
DEBUG [main] - close
DEBUG [main] - close
DEBUG [main] - close
DEBUG [main] - popMessageContext: org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS@11df164 (Thread main)
Exception in thread "main" javax.xml.ws.WebServiceException: java.io.IOException: Could not transmit message
        at org.jboss.ws.core.jaxws.client.ClientImpl.handleRemoteException(ClientImpl.java:311)
        at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:244)
        at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:171)
        at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:157)
        at $Proxy12.pesquisar(Unknown Source)
        at JaasAuthClient.main(JaasAuthClient.java:33)
Caused by: java.io.IOException: Could not transmit message
        at org.jboss.ws.core.client.HTTPRemotingConnection.invoke(HTTPRemotingConnection.java:267)
        at org.jboss.ws.core.client.SOAPProtocolConnectionHTTP.invoke(SOAPProtocolConnectionHTTP.java:71)
        at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:360)
        at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:232)
        ... 4 more
Caused by: org.jboss.remoting.CannotConnectException: Can not connect http client invoker after 1 attempt(s)
        at org.jboss.remoting.transport.http.HTTPClientInvoker.makeInvocation(HTTPClientInvoker.java:271)
        at org.jboss.remoting.transport.http.HTTPClientInvoker.transport(HTTPClientInvoker.java:176)
        at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:169)
        at org.jboss.remoting.Client.invoke(Client.java:2070)
        at org.jboss.remoting.Client.invoke(Client.java:879)
        at org.jboss.ws.core.client.HTTPRemotingConnection.invoke(HTTPRemotingConnection.java:246)
        ... 7 more
Caused by: org.jboss.ws.WSException: <strong>Invalid HTTP server response [401] - Unauthorized</strong>
        at org.jboss.ws.core.soap.SOAPMessageUnMarshallerHTTP.read(SOAPMessageUnMarshallerHTTP.java:75)
        at org.jboss.remoting.transport.http.HTTPClientInvoker.readResponse(HTTPClientInvoker.java:608)
        at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:402)
        at org.jboss.remoting.transport.http.HTTPClientInvoker.makeInvocation(HTTPClientInvoker.java:253)
</pre><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>sa</p></div>
<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
<p style="margin: 0;">Reply to this message by <a href="https://community.jboss.org/message/723617#723617">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JBoss Web Services at <a href="https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044">Community</a></p>
</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>