Skip to content
Advertisement

javax.xml.ws.WebServiceException: close method has already been invoked

I want to implement a client for a WebService. I used IntelliJ tools to create classes from wsdl and I prepared all classes as needed to call method from the WebService interface. The problem is that every time I try to call the WebService method I receive this error:

JavaScript

I have a mock running on SoapUI, I sent a request from SoapUI and it’s working.

Testing the WebService starts by pressing a button in a web page. This is how I initialize my beans in the context:

JavaScript

I realised that com.sun.xml.ws.client.Stub#close method is called at some point, which is why the error occurs later, but I don’t know why the close method is being called. If you need any additional info please let me know.

Advertisement

Answer

Apparently the problem was in initializing beans. I moved the nested bean and made it a top level and it’s working now.

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement