/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.controller;
import java.io.Serializable;
import javax.annotation.PostConstruct;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
import javax.faces.bean.ViewScoped;
import javax.xml.ws.WebServiceRef;
/**
*
* @author root
*/
@ManagedBean
@SessionScoped
public class ConsultaWS implements Serializable {
@WebServiceRef(wsdlLocation = "WEB-INF/wsdl/test.transunioncentroamerica.com/sts/tu_Consulta.asmx.wsdl")
private org.tempuri.TUConsulta service;
public ConsultaWS() {
}
@PostConstruct
public void init() {
}
public void consulta() {
try {
/* System.setProperty("javax.net.ssl.keyStore", "/home/debian/Descargas/jdk1.7.0_75/jre/lib/security/cacerts");
System.setProperty("javax.net.ssl.keyStorePassword", "changeit");
System.setProperty("javax.net.ssl.trustStore", "/home/debian/Descargas/jdk1.7.0_75/jre/lib/security/");
System.setProperty("javax.net.ssl.trustStorePassword", "changeit");
*/
java.lang.String datos = "0703198904028";
org.tempuri.TUConsultaSoap port = service.getTUConsultaSoap();
java.lang.String result = port.validadorDeIdentidad(datos);
} catch (Exception e) {
e.printStackTrace();
}
}
private String validadorDeIdentidad(java.lang.String xmlConsulta) {
// Note that the injected javax.xml.ws.Service reference as well as port objects are not thread safe.
// If the calling of port operations may lead to race condition some synchronization is required.
org.tempuri.TUConsultaSoap port = service.getTUConsultaSoap12();
return port.validadorDeIdentidad(xmlConsulta);
}
}
This message shows me the glassfish log:
Severe: com.sun.xml.ws.client.ClientTransportException: Error HTTP transport: java.net.ConnectException: Connection refused
and SOAP UI: