cloudsoft / winrm4j

Apache License 2.0
94 stars 53 forks source link

SoapFaultException executing any command #88

Closed gsfraley closed 6 years ago

gsfraley commented 6 years ago

Hi all,

We're encountering an issue where we can't execute any commands due to the following exception:

javax.xml.ws.soap.SOAPFaultException: Response message did not contain proper response data. Expected: {http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd}DeleteResponse
    at org.apache.cxf.jaxws.JaxWsClientProxy.mapException(JaxWsClientProxy.java:195)
    at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:145)
    at com.sun.proxy.$Proxy84.delete(Unknown Source)
    at io.cloudsoft.winrm4j.client.WinRmClient$5.call(WinRmClient.java:843)
    at io.cloudsoft.winrm4j.client.WinRmClient$5.call(WinRmClient.java:838)
    at io.cloudsoft.winrm4j.client.WinRmClient.winrmCallRetryConnFailure(WinRmClient.java:871)
    at io.cloudsoft.winrm4j.client.WinRmClient.disconnect(WinRmClient.java:838)
    at io.cloudsoft.winrm4j.winrm.WinRmTool.executeCommand(WinRmTool.java:248)
    at io.cloudsoft.winrm4j.winrm.WinRmTool.executePs(WinRmTool.java:269)
    ...
Caused by: org.apache.cxf.endpoint.ClientImpl$IllegalEmptyResponseException: Response message did not contain proper response data. Expected: {http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd}DeleteResponse
    at org.apache.cxf.endpoint.ClientImpl.processResult(ClientImpl.java:671)
    at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:546)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:446)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:361)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:319)
    at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
    at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:140)
    ... 34 common frames omitted

It looks like it depends on an external definition at http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd . Is it possible it could have changed, breaking the client?

gsfraley commented 6 years ago

After digging a little deeper, it appears that we're using a later, incompatible version of CXF on the classpath, making this issue a duplicate of #84.