connection refused when trying to consume an SOA Webservice using jax-ws

0
/*
 * 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:

    
asked by david saul Ramirez 19.06.2018 в 21:08
source

1 answer

0

I already manage to consume the webservices, I send the parameters,

shows me the following message, is it because I have not converted the xml to an object? (Parseo xml).

    
answered by 20.06.2018 в 23:52