Tuesday, May 11, 2010

Sign up for radiology tech classes today

Go to school for a radiology tech degree
To stop further mailing, click here or write:
PinpointMediaServices, 4255 E. Charleston Blvd. Suite D-345, Las Vegas, NV 89104
Hi, thank your for your answer. I have tried your workarounf but it does not work. Here is my Interface: @WebMethod(action = "leseObligoKunde", operationName = "leseObligoKunde") @ResponseWrapper(className="ObligoKontoListResponse") public List leseObligoKunde(KordobaCredentials creds, String kundennummer) throws KordobaException and this is my ResponseWrapper: @XmlType(name = "ObligoKontoListResponse") public class ObligoKontoListResponse { @XmlElementWrapper(nillable = true, name = "return") @XmlElement(name = "obligoKontoList") public List obligoKontoList; } If I trace the response with tcpmon I can see that there is now an explicit return value: HTTP/1.1 200 OK Server: Apache-Coyote/1.1 Content-Type: text/xml;charset=UTF-8 Content-Length: 309 Date: Thu, 14 Jan 2010 16:14:42 GMT But on the client I get again a NullPointerException: List erg = obligoService.leseObligoKunde(creds, "0000186040"); System.out.println(erg.size()); Then I made another test and removed the @ResponseWrapper Annotation of the Web Service on client side. Now my result contains one element, but with empty properties. What I am doing wrong? Thanks, Marc Von: Daniel Kulp < dku ... @apache.orgg > An: use ... @cxf.apache.orgg Kopie: marc ... @degussa-bank.dee Datum: 13.01.2010 16:53 Betreff: Re: Returntype List: Empty List get null on client? On Wed January 13 2010 4:51:17 am marc ... @degussa-bank.dee wrote: Hello, I have a problem with the return type of a web service function: public List findCustomer(String name); If my service returns a empty list, the list get null on the client. Is this a bug? Is there any workaround? Do I have to use Arrays instead of Lists? Not really a bug. It's more due to how the spec maps the List into schema and thus the representation on the wire. It would map that list to something like: Thus, if the list is empty or if the list is null, no "return" element is put on the wire at all. On the receiving side, the runtime really has no indication of whether it should be an empty list or a null list. I think the only way around it would be to create a new bean like: @XmlType(name = "findCustomerResponse") public class FindCustomerResponse { @XmlElementWrapper(nillable = true, name="return") @XmlElement(name = "customers") List customers; ......getter/setters..... } and then add an annotation to the method: @ResponseWrapper(class = "......FindCustomerResponse") public List findCustomer(String name); That changes the schema a bit to create a single "return" element that is nillable that then wrappers the "customer" elements. -- Daniel Kulp dku ... @apache.orgg On Jun 13, 2009, at 1:31 AM, Yugui (Yuki Sonoda) wrote: The original data is written is YAML. * I've attached a tiny patch that adds a picture for me, if you want it. == What is this? The Ruby community is sometimes a bit too high-contextual. Who is "mput"? Who is "zenspider"? What does "why is why why" mean? What does it mean when ko1 says "the patch monster does ..."? The list shows you who's who. Many contributions made Ruby what now Ruby is. The honor of contribution for Ruby is not only the committers's. But it is sure that the committers are worth people to follow their activities. Follow them on twitter. Subscribe their blogs. This is a really neat resource. Thank you for providing it! James Edward Gray II