web service - client classes
Posted
by Noona
on Stack Overflow
See other posts from Stack Overflow
or by Noona
Published on 2010-06-06T07:54:19Z
Indexed on
2010/06/06
8:02 UTC
Read the original article
Hit count: 430
java
|web-services
The web service that I implemented is up and running, when I try to run the client I get the following error with regard to the classes that were generated using wsimport,
Caused by: java.security.PrivilegedActionException: com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException: 4 counts of IllegalAnnotationExceptions
Two classes have the same XML type name "{http://server.agency.hw2/}userJoined". Use @XmlType.name and @XmlType.namespace to assign different names to them.
this problem is related to the following location:
at hw2.chat.backend.main.generatedfromserver.UserJoined
at public javax.xml.bind.JAXBElement hw2.chat.backend.main.generatedfromserver.ObjectFactory.createUserJoined(hw2.chat.backend.main.generatedfromserver.UserJoined)
at hw2.chat.backend.main.generatedfromserver.ObjectFactory
this problem is related to the following location:
at ChatCompany.BackendChatServer.hw2.chat.backend.main.generatedfromserver.UserJoined
Two classes have the same XML type name "{http://server.agency.hw2/}userJoinedResponse". Use @XmlType.name and @XmlType.namespace to assign different names to them.
this problem is related to the following location:
at hw2.chat.backend.main.generatedfromserver.UserJoinedResponse
at public javax.xml.bind.JAXBElement hw2.chat.backend.main.generatedfromserver.ObjectFactory.createUserJoinedResponse(hw2.chat.backend.main.generatedfromserver.UserJoinedResponse)
But I can't figure out what exactly is meant by the error. I am assuming I need to change something in annotations in this class as pointed out by the compiler:
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "userJoinedResponse")
public class UserJoinedResponse {
}
could someone please point out why there's a name collision and what annotations I need to change?
thanks
© Stack Overflow or respective owner