Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » java.util.List not supported by the JAX-RPC specification
java.util.List not supported by the JAX-RPC specification [message #182641] Tue, 14 November 2006 01:30 Go to next message
Eclipse UserFriend
Originally posted by: vancouverhg.hotmail.com

This error was generated following Creating Bottom Up Web Service tutorial
for my class DVD.java?

http://www.eclipse.org/webtools/jst/components/ws/1.5/tutori als/BottomUpWebService/BottomUpWebService.html

Is there a work around for this?
Thanks in advance

The service class "hansen.playground.DVD" does not comply to one or more
requirements of the JAX-RPC 1.1 specification, and may not deploy or
function correctly.
The method "getActors" on the service class "hansen.playground.DVD" uses
a data type, "java.util.List", that is not supported by the JAX-RPC
specification. Instances of the type may not serialize or deserialize
correctly. Loss of data or complete failure of the Web service may result.
The method "setActors" on the service class "hansen.playground.DVD" uses
a data type, "java.util.List", that is not supported by the JAX-RPC
specification. Instances of the type may not serialize or deserialize
correctly. Loss of data or complete failure of the Web service may result.

DVD.java
package hansen.playground;

import java.util.*;

public class DVD implements java.io.Serializable {
private String id;
private String title;
private String length;
private List actors;

public DVD() {}

public String getId() {
return id;
}

public String getTitle() {
return title;
}

public String getLength() {
return length;
}

public List getActors() {
return actors;
}

public void setId(String newid) {
id = newid;
}

public void setTitle(String newtitle) {
title = newtitle;
}

public void setLength(String newlength) {
length = newlength;
}

public void setActors(List newactors) {
actors = newactors;
}

}
Re: java.util.List not supported by the JAX-RPC specification [message #182712 is a reply to message #182641] Tue, 14 November 2006 16:09 Go to previous message
Seng Phung Lu is currently offline Seng Phung LuFriend
Messages: 62
Registered: July 2009
Member
Hi Dave,

The JAX-RPC spec does not specify a clear mapping between the
java.util.List object and XML. The good news is you have other options.
For your example below, you could declare the type of 'actors' in the
parameter itself. For example, use a String[] or Actors[] (where Actors
is a complex type).

Since any Object can reside in a List, it would be impossible for the
Web service run-time to predict the type of the Object to
serialize/deserialize XML at run time.

Hope that helps,
-Seng



dave wrote:
> This error was generated following Creating Bottom Up Web Service
> tutorial for my class DVD.java?
>
> http://www.eclipse.org/webtools/jst/components/ws/1.5/tutori als/BottomUpWebService/BottomUpWebService.html
>
>
> Is there a work around for this?
> Thanks in advance
>
> The service class "hansen.playground.DVD" does not comply to one or more
> requirements of the JAX-RPC 1.1 specification, and may not deploy or
> function correctly.
> The method "getActors" on the service class "hansen.playground.DVD"
> uses a data type, "java.util.List", that is not supported by the JAX-RPC
> specification. Instances of the type may not serialize or deserialize
> correctly. Loss of data or complete failure of the Web service may result.
> The method "setActors" on the service class "hansen.playground.DVD"
> uses a data type, "java.util.List", that is not supported by the JAX-RPC
> specification. Instances of the type may not serialize or deserialize
> correctly. Loss of data or complete failure of the Web service may result.
>
> DVD.java
> package hansen.playground;
>
> import java.util.*;
>
> public class DVD implements java.io.Serializable {
> private String id;
> private String title;
> private String length;
> private List actors;
>
> public DVD() {}
>
> public String getId() {
> return id;
> }
>
> public String getTitle() {
> return title;
> }
>
> public String getLength() {
> return length;
> }
>
> public List getActors() {
> return actors;
> }
>
> public void setId(String newid) {
> id = newid;
> }
>
> public void setTitle(String newtitle) {
> title = newtitle;
> }
>
> public void setLength(String newlength) {
> length = newlength;
> }
>
> public void setActors(List newactors) {
> actors = newactors;
> }
>
> }
>
Previous Topic:http post
Next Topic:jboss-web.xml and Xdoclet
Goto Forum:
  


Current Time: Fri Apr 26 20:50:58 GMT 2024

Powered by FUDForum. Page generated in 0.02991 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top