SOAP WSDL call using Java service throws 500 500 Http error

0

I am calling a method of a WSDL SOAP service (with or without parameters) using Java with Spring. I call my Spring service with PostMan and this is responsible for calling SOAP WSDL.

_the_project _

I used the plugin "jaxws-maven-plugin" in version 2.5, I configured it in the POM.xml and with the command "mvn jaxws: wsimport" I managed to autogenerate the package and the classes of each SOAP WSDL method. It autogeneró enough classes, of the autogenerated I could analyze that:

For each method you generated these files:

  • NomMetodoExample.java
  • NomMetodoExampleCriteriaVO.java
  • NomMetodoExampleOutVO.java
  • NomMetodoExampleResponse.java

And others that are related to the service itself:

  • NomServiceExample.java
  • NomServiceExamplePortType.java (interface)

code and error

I built the code based on the examples in this link: how-to-do-a-call- through-a-javax-xml-ws-service

String wsdlURL = "http://10.20.30.40:6789/ws/juegosService?wsdl";
String namespace = "http://services.juegos.com/";
String serviceName = "JuegosService";
QName serviceQN = new QName(namespace, serviceName);

JuegosService js = new JuegosService(new URL(wsdlURL),serviceQN);

JuegosServicePortType port = js.getJuegosServicePort();
ConsultaDetalladaJuegoCriteriaVO criteriaIn = new ConsultaDetalladaJuegoCriteriaVO();
ConsultaDetalladaJuegoOutVO criteriaOut = new ConsultaDetalladaJuegoOutVO();
criteriaIn.setCodigoJuego("0011223344");
criteriaIn.setTipoJuego("5");
criteriaOut = port.consultaDetalladaJuego(criteriaIn); //ERROR AQUÍ

Error

{
    "result": false,
    "status": {
        "code": "500",
        "message": "INTERNAL SERVER ERROR"
    },
    "error": {
        "message": "El servidor ha enviado el código de estado HTTP 200: OK",
        "field": ""
    }
}

Note : I avoided instantiating Service.java as in the example link and I used JuegosService.java (auto generated by jaxws) to avoid an error by not correctly pointing to the port of the service.

Any suggestions of why I could be sending an error 500 with an HTTP 200 ??

My first question !!

and thank you.

    
asked by sebang 03.01.2019 в 15:53
source

1 answer

0

Cordial greeting:

A 500 response code from the server implies that there was an uncontrolled situation (as an exception or error) and therefore there is no satisfactory response ( link ).

In this case you should contact the service provider to study the error.

    
answered by 08.01.2019 / 20:47
source