Nfe - Funciona no Glassfish 3.0 mas não Glassfish 3.1

3 respostas
E

Pessoal,

Utilizo Netbeans com glassfish 3.1 numa máquina e tenho instalado também 3.0. Ao mudar de servidor para 3.1 tenho o erro 403 Forbidden. Alguém já passou por isso ?

public void autentica() {
        // Prepara conexao segura
        //-------------------------------------------
        System.setProperty("java.protocol.handler.pkgs", "com.sun.net.ssl.internal.www.protocol");

            Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());

            System.setProperty("javax.net.ssl.keyStoreType", "PKCS12");
            System.setProperty("javax.net.ssl.keyStore", cert.getLocal());
            System.setProperty("javax.net.ssl.keyStorePassword", cert.getSenha());

            System.setProperty("javax.net.ssl.trustStoreType", "JKS");
            System.setProperty("javax.net.ssl.trustStore", config.getLocalRSNFeHom());
            System.setProperty("javax.net.ssl.trustStorePassword", "changeit");

        System.setProperty("sun.security.ssl.allowUnsafeRenegotiation", "true");
        //-------------------------------------------
    }

3 Respostas

Hebert_Coelho

Esse é o erro completo?

E

org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[0].getName()); _operationClient.execute(true); // Nessa linha ocorre o erro

INFO: org.apache.axis2.AxisFault: Transport error: 403 Error: Forbidden at org.apache.axis2.transport.http.HTTPSender.handleResponse(HTTPSender.java:310) at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:200) at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:76) at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:400) at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:225) at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:435) at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:402) at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229) at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165) at nfe2.ws.nfestatusservico2.NfeStatusServico2Stub.nfeStatusServicoNF2(NfeStatusServico2Stub.java:192) at NFe.EnviaNFe.envia(EnviaNFe.java:85) at mb.NFeSaidaMB.enviaNFe(NFeSaidaMB.java:366)

G

Conseguiu alguma solução para funcionar no Glassfish 3.1?

Criado 16 de novembro de 2011
Ultima resposta 1 de mar. de 2013
Respostas 3
Participantes 3