Details
-
Bug
-
Status: Closed
-
Critical
-
Resolution: Not A Problem
-
2.1.8, 2.2.7, 2.2.9, 2.2.10
-
None
-
JSE 1.5 on Win XP
Description
If you have a function that returns an empty list the result will be null on client. Even If add a Responsewrapper to the interface it doesn't work. If have attached a little test project / program:
Interface:
@WebService(targetNamespace = "http://cxf.apache.org/demo/CustomerService/1/", name = "CustomerService")
@SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL)
public interface CustomerService
The Implementation:
@WebService(name = "CustomerService", serviceName = "CustomerService", targetNamespace = "http://cxf.apache.org/demo/CustomerService/1/", endpointInterface = "demo.service.CustomerService")
public class CustomerServiceImpl implements CustomerService {
public List<Customer> findCustomer()
{ // very stupid method return new ArrayList<Customer>(); }public List<Customer> findCustomer2()
{ // another very stupid method return new ArrayList<Customer>(); }}
And this is the main programm:
public static void main(String args[]) throws Exception
This will print the following output:
Server ready...
call findCustomer()
20.01.2010 07:49:45 org.apache.cxf.interceptor.LoggingOutInterceptor$LoggingCallback onClose
INFO: Outbound Message
---------------------------
ID: 1
Address: http://localhost:9000/CustomerService
Encoding: UTF-8
Content-Type: text/xml
Headers:
Payload: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:findCustomer xmlns:ns2="http://cxf.apache.org/demo/CustomerService/1/"/></soap:Body></soap:Envelope>
--------------------------------------
20.01.2010 07:49:45 org.apache.cxf.interceptor.LoggingInInterceptor logging
INFO: Inbound Message
----------------------------
ID: 1
Encoding: UTF-8
Content-Type: text/xml; charset=utf-8
Headers:
Payload: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:findCustomerResponse xmlns:ns2="http://cxf.apache.org/demo/CustomerService/1/"/></soap:Body></soap:Envelope>
--------------------------------------
List is null: null
call findCustomer2()
20.01.2010 07:49:45 org.apache.cxf.interceptor.LoggingOutInterceptor$LoggingCallback onClose
INFO: Outbound Message
---------------------------
ID: 2
Address: http://localhost:9000/CustomerService
Encoding: UTF-8
Content-Type: text/xml
Headers:
Payload: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:findCustomer2 xmlns:ns2="http://cxf.apache.org/demo/CustomerService/1/"/></soap:Body></soap:Envelope>
--------------------------------------
20.01.2010 07:49:45 org.apache.cxf.interceptor.LoggingInInterceptor logging
INFO: Inbound Message
----------------------------
ID: 2
Encoding: UTF-8
Content-Type: text/xml; charset=utf-8
Headers:
Payload: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:findCustomer2Response xmlns:ns2="http://cxf.apache.org/demo/CustomerService/1/"><return xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/></ns2:findCustomer2Response></soap:Body></soap:Envelope>
--------------------------------------
List is null: null
Server exiting
Attachments
Attachments
Issue Links
- is a clone of
-
CXF-2627 Return Type List gets null on client if an empty list is returned
- Closed