Javafree
 Forum   Topics   Author   Post 
JSP / Servlets Busca de registro no banco com JSF roodrigo.p Olá, tenho uma pagina e preciso fazer com que quando o usuário digitar o CPF do paciente, a pagina pegue os dados cadastrados neste cpf e preencha um campo, mas não está funcionando, segue meu código: [code]<p:inputMask mask="999.999.999-99" id="cpfPaciente" value="#{mbPaciente.paciente.cpf}" size="14" required="true" requiredMessage="O campo Cpf Paciente é obrigatório!"> <f:ajax event="blur" listener="#{mbPaciente.buscaPacienteCpf}" render="nomePaciente cpfPaciente"/> </p:inputMask> <p:inputText id="nomePaciente" value="#{mbPaciente.paciente.nome}" size="30"/>[/code] ManagedBean: [code]public Paciente buscaPacienteCpf(){ pacientes = pacienteDao().getEntities(); for(Paciente p : pacientes){ if(p.getCpf().equals(paciente.getCpf())){ return p; } } return null; }[/code] Alguém pode ajudar? :S
JSP / Servlets Carousel do Primefaces não mostra as imagens roodrigo.p Estou com um problema, meu slideShow não mostra as imagens, mostra apenas o header do carousel. [img]C:\Users\Rodrigo Pereira\Desktop\sw.png[/img] [b]OBS:[/b] Se eu aperto um Ctrl-U, no código está lá o link das imagens e elas abrem normalmente. segue o código do xhtml: [code] <p:carousel id="slideShow" autoPlayInterval="2000" numVisible="1" effect="easeInStrong" circular="true"> <p:graphicImage value="/resources/imagens/foto.jpg" /> <p:graphicImage value="/resources/imagens/foto.jpg" /> </p:carousel> [/code] A estrutura do webcontent esta assim: WebContent/resources/imagens/foto.jpg Alguem pode ajudar?
Java Avançado Problema com Web Service e URGENTE roodrigo.p Segue o erro: [code] 16/02/2012 14:28:00 org.apache.axis.utils.JavaUtils isAttachmentSupported WARNING: Unable to find required classes (javax.activation.DataHandler and javax.mail.internet.MimeMultipart). Attachment support is disabled. AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}stackTrace:javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(Unknown Source) at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source) at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source) at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(Unknown Source) at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(Unknown Source) at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Unknown Source) at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Unknown Source) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source) at org.apache.axis.components.net.JSSESocketFactory.create(JSSESocketFactory.java:186) at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:191) at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:404) at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138) at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32) at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118) at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165) at org.apache.axis.client.Call.invokeEngine(Call.java:2784) at org.apache.axis.client.Call.invoke(Call.java:2767) at org.apache.axis.client.Call.invoke(Call.java:2443) at org.apache.axis.client.Call.invoke(Call.java:2366) at org.apache.axis.client.Call.invoke(Call.java:1812) at org.datasus.service.ServicoSolicitacaoWSSoapBindingStub.executarSolicitacao(ServicoSolicitacaoWSSoapBindingStub.java:318) at ServicoWS.Solicitacao.main(Solicitacao.java:62) Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at sun.security.validator.PKIXValidator.doBuild(Unknown Source) at sun.security.validator.PKIXValidator.engineValidate(Unknown Source) at sun.security.validator.Validator.validate(Unknown Source) at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.validate(Unknown Source) at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source) at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source) ... 23 more Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(Unknown Source) at java.security.cert.CertPathBuilder.build(Unknown Source) ... 29 more {http://xml.apache.org/axis/}hostname:RodrigoP javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at org.apache.axis.AxisFault.makeFault(AxisFault.java:101) at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:154) at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32) at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118) at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165) at org.apache.axis.client.Call.invokeEngine(Call.java:2784) at org.apache.axis.client.Call.invoke(Call.java:2767) at org.apache.axis.client.Call.invoke(Call.java:2443) at org.apache.axis.client.Call.invoke(Call.java:2366) at org.apache.axis.client.Call.invoke(Call.java:1812) at org.datasus.service.ServicoSolicitacaoWSSoapBindingStub.executarSolicitacao(ServicoSolicitacaoWSSoapBindingStub.java:318) at ServicoWS.Solicitacao.main(Solicitacao.java:62) Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(Unknown Source) at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source) at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source) at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(Unknown Source) at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(Unknown Source) at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Unknown Source) at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Unknown Source) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source) at org.apache.axis.components.net.JSSESocketFactory.create(JSSESocketFactory.java:186) at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:191) at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:404) at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138) ... 11 more Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at sun.security.validator.PKIXValidator.doBuild(Unknown Source) at sun.security.validator.PKIXValidator.engineValidate(Unknown Source) at sun.security.validator.Validator.validate(Unknown Source) at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.validate(Unknown Source) at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source) at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source) ... 23 more Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(Unknown Source) at java.security.cert.CertPathBuilder.build(Unknown Source) ... 29 more [/code]
Java Avançado Problema com Web Service e URGENTE roodrigo.p Pronto alguem ajuda agora??? ¬¬
Java Avançado Erro Web Service roodrigo.p Segue o Erro: 16/02/2012 14:28:00 org.apache.axis.utils.JavaUtils isAttachmentSupported WARNING: Unable to find required classes (javax.activation.DataHandler and javax.mail.internet.MimeMultipart). Attachment support is disabled. AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}stackTrace:javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(Unknown Source) at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source) at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source) at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(Unknown Source) at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(Unknown Source) at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Unknown Source) at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Unknown Source) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source) at org.apache.axis.components.net.JSSESocketFactory.create(JSSESocketFactory.java:186) at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:191) at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:404) at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138) at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32) at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118) at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165) at org.apache.axis.client.Call.invokeEngine(Call.java:2784) at org.apache.axis.client.Call.invoke(Call.java:2767) at org.apache.axis.client.Call.invoke(Call.java:2443) at org.apache.axis.client.Call.invoke(Call.java:2366) at org.apache.axis.client.Call.invoke(Call.java:1812) at org.datasus.service.ServicoSolicitacaoWSSoapBindingStub.executarSolicitacao(ServicoSolicitacaoWSSoapBindingStub.java:318) at ServicoWS.Solicitacao.main(Solicitacao.java:62) Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at sun.security.validator.PKIXValidator.doBuild(Unknown Source) at sun.security.validator.PKIXValidator.engineValidate(Unknown Source) at sun.security.validator.Validator.validate(Unknown Source) at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.validate(Unknown Source) at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source) at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source) ... 23 more Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(Unknown Source) at java.security.cert.CertPathBuilder.build(Unknown Source) ... 29 more {http://xml.apache.org/axis/}hostname:RodrigoP javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at org.apache.axis.AxisFault.makeFault(AxisFault.java:101) at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:154) at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32) at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118) at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165) at org.apache.axis.client.Call.invokeEngine(Call.java:2784) at org.apache.axis.client.Call.invoke(Call.java:2767) at org.apache.axis.client.Call.invoke(Call.java:2443) at org.apache.axis.client.Call.invoke(Call.java:2366) at org.apache.axis.client.Call.invoke(Call.java:1812) at org.datasus.service.ServicoSolicitacaoWSSoapBindingStub.executarSolicitacao(ServicoSolicitacaoWSSoapBindingStub.java:318) at ServicoWS.Solicitacao.main(Solicitacao.java:62) Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(Unknown Source) at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source) at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source) at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(Unknown Source) at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(Unknown Source) at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Unknown Source) at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Unknown Source) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source) at org.apache.axis.components.net.JSSESocketFactory.create(JSSESocketFactory.java:186) at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:191) at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:404) at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138) ... 11 more Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at sun.security.validator.PKIXValidator.doBuild(Unknown Source) at sun.security.validator.PKIXValidator.engineValidate(Unknown Source) at sun.security.validator.Validator.validate(Unknown Source) at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.validate(Unknown Source) at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source) at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source) ... 23 more Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(Unknown Source) at java.security.cert.CertPathBuilder.build(Unknown Source) ... 29 more Me ajudem por favor!!!!!!!!!!!!!!!!!!!!!!
Java Avançado Erro Web Service roodrigo.p Ola, estou qrendo consumir um webservice mas esta dando erro Alguem pode me ajudar??? [code]public class Solicitacao { public static void main(String[] args) throws NamingException { System.setProperty("proxySet", "true"); System.setProperty("http.proxyURL","https://200.214.130.41:9443/farmaciahomologa/services/ServicoSolicitacaoWS?wsdl"); // System.setProperty("http.", value) Date dt = new Date(); SimpleDateFormat format = new SimpleDateFormat("dd/MM/yyyy"); String data = "16/02/2012"; Calendar c = format.getCalendar(); MedicamentoDTO[] m = new MedicamentoDTO[2]; MedicamentoDTO v = new MedicamentoDTO(); SolicitacaoDTO s = new SolicitacaoDTO(); UsuarioFarmaciaDTO u = new UsuarioFarmaciaDTO(); AutorizacaoDTO a = new AutorizacaoDTO(); v.setCoCodigoBarra("7896523206646"); v.setQtSolicitada(1); v.setVlPrecoVenda(9.59); v.setQtPrescrita(30); m[0] = v; s.setCoSolicitacaoFarmacia("1454"); s.setNuCnpj("08.854.259/1255-06"); s.setNuCpf("001.063.811-30"); s.setNuCrm("23218"); s.setSgUfCrm("sp"); s.setDtEmissaoReceita(c); s.setDnaEstacao("8"); s.setArrMedicamentoDTO(m); u.setUsuarioFarmacia("74825588"); u.setSenhaFarmacia("39031837"); u.setUsuarioVendedor("342.458.888-19"); u.setSenhaVendedor("12345678"); try { ServicoSolicitacaoWS service; try { service = new ServicoSolicitacaoWSServiceLocator().getServicoSolicitacaoWS(); service.executarSolicitacao(s, u); } catch (ServiceException e) { e.printStackTrace(); } } catch (RemoteException e) { e.printStackTrace(); } } }[/code]
Java Avançado Problema com Web Service e URGENTE roodrigo.p Olá, tento acessar um Web Service ja pronto, e está dando erro, alguem pode me ajudar? Segue o código de acesso: [code]public class Solicitacao { public static void main(String[] args) throws NamingException { System.setProperty("proxySet", "true"); System.setProperty("http.proxyURL","https://200.214.130.41:9443/farmaciahomologa/services/ServicoSolicitacaoWS?wsdl"); // System.setProperty("http.", value) Date dt = new Date(); SimpleDateFormat format = new SimpleDateFormat("dd/MM/yyyy"); String data = "16/02/2012"; Calendar c = format.getCalendar(); MedicamentoDTO[] m = new MedicamentoDTO[2]; MedicamentoDTO v = new MedicamentoDTO(); SolicitacaoDTO s = new SolicitacaoDTO(); UsuarioFarmaciaDTO u = new UsuarioFarmaciaDTO(); AutorizacaoDTO a = new AutorizacaoDTO(); v.setCoCodigoBarra("7896523206646"); v.setQtSolicitada(1); v.setVlPrecoVenda(9.59); v.setQtPrescrita(30); m[0] = v; s.setCoSolicitacaoFarmacia("1454"); s.setNuCnpj("08.258.109/0021-06"); s.setNuCpf("001.063.811-30"); s.setNuCrm("23218"); s.setSgUfCrm("sp"); s.setDtEmissaoReceita(c); s.setDnaEstacao(""); s.setArrMedicamentoDTO(m); u.setUsuarioFarmacia("74525588"); u.setSenhaFarmacia("555555"); u.setUsuarioVendedor("125.588.888-19"); u.setSenhaVendedor("12345678"); try { ServicoSolicitacaoWS service; try { service = new ServicoSolicitacaoWSServiceLocator().getServicoSolicitacaoWS(); service.executarSolicitacao(s, u); } catch (ServiceException e) { e.printStackTrace(); } } catch (RemoteException e) { e.printStackTrace(); } } [/code]
Goto page 1