Need help for complex type - JAX-WS
Hi all,
i am trying to realize a web services with Jax-ws technology that returns a created complex Object from me and that the client can interpret through the wsdl. How I must set up annotations of Jax-ws? you have of the examples from being able to me to show or of the link that they can help me in this! In my case, I will have to return a list of object
thanks
[386 byte] By [
reichana] at [2007-11-27 10:32:23]

# 1
Hi,
In jax-ws 2.1 you can solve the problem using de @XmlSeeAlso tag.
In your endpoint, you can define the tag like so:
import mypackage.myobject1;
import mypackage.myobject2;
@WebService()
@XmlSeeAlso({myObject1.class, myObject2.class})
public class myEndpoint{
...
}
In your client you and access those objects using the package you choose for you ws client reference.
Better explained here --> https://jax-ws.dev.java.net/jax-ws-21-ea3/docs/UsersGuide.html#2.6.1_Type_Substitution
# 2
I have tried to use the tag, in the wsdl generated the type of the object is always specified like anyType.
Question:
Can i use complexType for an object java.util.List?
If it is'nt a java client , how the client will interpreter this object? this client can do a Wrapper of this object?
thanks in advance of the answers
P.S. i'm working only on server site, so i'm not sure if the client will be Java or some other.
Message was edited by:
reichan
# 3
TBH i'm not sure, but i think you can't.
Using a complexType object will prevent non java clients from understanding your objects.
# 4
i like to ask also question about complex types and web services
i have in my application few complex types that i like to be able to
send via web services apis from the client to my server
for example i have complex type that is
list that contains hash tables or simple hash tables
how can i represent them with JAXWS ?
is there something that simpler then using Adapters ?
thanks for the help
Meirya at 2007-7-28 18:16:24 >
