E pessoal
eu tou gerando o webservices para Nfe e baixei os wsdl do ambiente de homologação da sefaz RS
Estou chamando status servico assim:
[code]
String nfeCabecMsg = “<?xml version=\"1.0\" encoding=\"UTF-8\"?>”
+ "<cabecMsg xmlns=“http://www.portalfiscal.inf.br/nfe” "
+ “versao=“1.02”>” + “1.07”
+ “”;
String nfeDadosMsg = “<?xml version=\"1.0\" encoding=\"UTF-8\"?>”
+ "<consStatServ " + " versao=“1.07"”
+ " xmlns="http://www.portalfiscal.inf.br/nfe">"
+ “2” + “42”
+ “STATUS” + “”;
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","C:\\SEC\\certificado.pfx");
System.setProperty("javax.net.ssl.keyStorePassword", "senha");
System.setProperty("javax.net.ssl.trustStoreType", "JKS");
System.setProperty("javax.net.ssl.trustStore", "C:\\SEC\\meukeystore.jks");
NfeStatusServico servico = new NfeStatusServicoLocator();
NfeStatusServicoSoap soap = servico.getNfeStatusServicoSoap();
soap.nfeStatusServicoNF(nfeCabecMsg, nfeDadosMsg); [/code]
Mas estou com pau no Axis, então queria uma ajuda para usar o Xfire para consumir este webservice…
alguem pode me ajudar por favor! valeu