You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Martin Fernau <ma...@cps-fernau.de> on 2021/07/09 10:41:48 UTC

Why do I get an IllegalEmptyResponseException

Hi all,

for my current project I need to implement a SOAP Client calling a 
remote WS which sends an "empty" (not really empty. Only "empty" 
regarding to the business data) response as its return. So the response 
looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Header>
     <wsa:Action 
xmlns:wsa="http://www.w3.org/2005/08/addressing">http://www.starstandards.org/webservices/2005/10/transport/operations/ProcessMessageResponse</wsa:Action>
     <wsa:RelatesTo 
xmlns:wsa="http://www.w3.org/2005/08/addressing">[object 
Object]</wsa:RelatesTo>
   </soap:Header>
   <soap:Body>
     <m:ProcessMessageResponse 
xmlns:m="http://www.starstandards.org/webservices/2005/10/transport"/>
   </soap:Body>
</soap:Envelope>

Unfortunately Apache CXF throws an exception:

javax.xml.ws.soap.SOAPFaultException: Response message did not contain 
proper response data. Expected: 
{http://www.starstandards.org/webservices/2005/10/transport}ProcessMessageResponse
at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:161)
at com.sun.proxy.$Proxy76.processMessage(Unknown Source)
[...]
Caused by: 
org.apache.cxf.endpoint.ClientImpl$IllegalEmptyResponseException: 
Response message did not contain proper response data. Expected: 
{http://www.starstandards.org/webservices/2005/10/transport}ProcessMessageResponse
at org.apache.cxf.endpoint.ClientImpl.processResult(ClientImpl.java:663)
at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:532)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:432)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:347)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:305)
at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:139)
... 3 more

For me the XML looks correct and it seems that CXF is not able to 
correctly identify the ProcessMessageResponse. But maybe I'm just 
looking too long at this all and I do not see the obviously problem ...

Currently used CXF-Version: 3.1.18
I also tried it with 3.2.14 but with the same result.

Thanks
Martin