-2
Now following my return only comes so
<EnviarLoteRpsResposta xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<NumeroLote xsi:nil="true" />
<DataRecebimento xsi:nil="true" />
<ListaMensagemRetorno>
<MensagemRetorno>
<Codigo>E504</Codigo>
<Mensagem>O certificado digital do prestador de serviços é obrigatório.</Mensagem>
<Correcao>Envie junto a requisição do serviço o certificado digital do prestador de serviços.</Correcao>
</MensagemRetorno>
</ListaMensagemRetorno>
</EnviarLoteRpsResposta>
Follow my authentication
public void chamadaWs(String xml) {
URL wsdlURL = WSX0020X0020NFSEX0020V1001.WSX0020X0020NFSEX0020V1001_WSDL_LOCATION;
QName WSX0020X0020NFSEX0020V1001_QNAME = new QName("http://www.e-governeapps2.com.br/", "WS_x0020_-_x0020_NFS-e_x0020_V1.0.0.1");
WSX0020X0020NFSEX0020V1001 ss = new WSX0020X0020NFSEX0020V1001(wsdlURL, WSX0020X0020NFSEX0020V1001_QNAME);
WSX0020X0020NFSEX0020V1001Soap port = ss.getWSX0020X0020NFSEX0020V1001Soap();
String retorno = port.recepcionarXml("RecepcionarLoteRps", xml);
System.out.println("recepcionarLoteRps.result=" + retorno);
}
private void autentica() {
String caminhoDoCertificadoDoCliente = "C:\\Nf-se\\certificado.pfx";
String senhaDoCertificadoDoCliente = "123456";
String caminhoDoKeyStore = "C:\\Nf-se\\cacerts";
String senhaDoKeyStore = "123456";
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.clearProperty("javax.net.ssl.keyStore");
System.clearProperty("javax.net.ssl.keyStorePassword");
System.clearProperty("javax.net.ssl.trustStore");
System.setProperty("javax.net.ssl.keyStore", caminhoDoCertificadoDoCliente);
System.setProperty("javax.net.ssl.keyStorePassword", senhaDoCertificadoDoCliente);
System.setProperty("javax.net.ssl.trustStoreType", "JKS");
System.setProperty("javax.net.ssl.trustStore", caminhoDoKeyStore);
}
how to start. https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=how%20to%20consume%20a%20wsdl%20in%20java
– Reginaldo Rigo
in vdd I just need to run a method of that Ws which would be Recepcionarxml, where I pass the method name and xml !!!!
– Felipe Souza
I have a solution for shipping, but it’s in C#. Help?
– b3r3ch1t
help if you can send
– Felipe Souza
Look, I’m noticing that your issues are completely changing the initial doubt, and it’s not right to do that. If the solution below resulted another doubt, one should open a new question, do not change the recent, otherwise you invalidate the answers already given.
– user28595
in vdd the doubt remains the same , however with different situations , but the problem has not changed yet , therefore the change
– Felipe Souza
It has a lot of screenshot and little clarity on the problem. The message is already says that you are not using digital certificate, but there is no way to know where you are "tangled". It would be the case to either explain the difficulty you are having with the certificate or with the code. But you will probably have to open a question about the exact problem. (It is no use to open another generic, it has to be a specific one about the problem and not about the error message, which has already been discussed here). Here are some tips: [Ask]
– Bacco