KDSoap icon indicating copy to clipboard operation
KDSoap copied to clipboard

server return a 0 bytes response, response with an empy element is expected

Open drakkan opened this issue 11 years ago • 6 comments

please take a look at this server method implementation:

TNS0__ListResponseElement resp;
QList<TNS0__MyList> l;
resp.setResult(l);
return resp;

if no element is setted in the list a zero byte response is returned (http 204), the expected return value is a response element with no values inside, something like this

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <soap:Body>
      <n1:listResponseElement xmlns:n1="http://test.example.com/types/" />
   </soap:Body>
</soap:Envelope>

drakkan avatar Apr 21 '13 15:04 drakkan

Hello, Sorry for the long delay...

Do you have the WSDL for this issue?

dfaure-kdab avatar Dec 23 '13 16:12 dfaure-kdab

wsdl here:

http://195.250.34.59/temp/test.wsdl

drakkan avatar Dec 23 '13 19:12 drakkan

I reproduced the bug, indeed we have a 204 http error, I'll dig it up.

Knarf64 avatar Dec 22 '15 11:12 Knarf64

@drakkan : could you please point me to the specification about empty response you making reference to? I would like to make sure I am respecting correctly each case of the standard.

Knarf64 avatar Dec 29 '15 11:12 Knarf64

I get the posted response if I generate the service in java using the posted wsdl and jax-ws. A quick search seems to show that cxf has the same behaviour

https://issues.apache.org/jira/browse/CXF-2627

drakkan avatar Dec 29 '15 15:12 drakkan

Here are some spec references

https://lists.w3.org/Archives/Public/xmlp-comments/2002Mar/0006.html http://www.w3.org/2000/xp/Group/xmlp-issues#x16

drakkan avatar Dec 29 '15 21:12 drakkan