Hello Pete,
It is what I thought after reading this article:
http://www-128.ibm.com/developerworks/xml/library/ws-tip-j2eenet1/
I did not succeed in exposing my web services with JAX-WS as encoded.
I got this error message when I try:
[apt] D:\perforce\dmarcotte\Genesis
v11WS\src\com\cardinal\ws\server\RecursiveWS.java:38: The
com.cardinal.ws.server.RecursiveWS class has a rpc/encoded
SOAPBinding. Rpc/encoded SOAPBindings are not supported in JAXWS 2.0.
The unique option seems to be: "break" the recursive link before
sending the objects and "relink" them after receiving them.
Any alternatives?
François J.
-----Original Message-----
From: Peter Hendry [mailto:peter.hendry_at_capeclear.com]
Sent: 6 mars 2006 19:08
To: users_at_jax-ws.dev.java.net
Subject: Re: Problem with recursive/circular data references via SOAP
You should be able to define such circular references in schema, but
"literal" does not support circular object references in instance
documents (you can have things like linked lists as long as it is not
circular). There is no way to reference the same value from multiple
places which would be required. You need "encoded" for this and I don't
believe JAX-WS supports that.
Pete
Doug Kohlert wrote:
> Can you include part of the stack?
>
> Francois Jean wrote:
>
>> Hello,
>>
>> I'm presently trying to implement a Web Service which exposes a class
>> with recursive/circular data references (see the code bellow).
>>
>> When I'm calling the method testRecursive I got a "Stack Overflow
>> Exception" on the server side.
>>
>> How can I represent circular/recursive references using JAX-WS?
>>
>> François JEAN
>>
>>
>>
>> package com.cardinal.ws.server;
>> import java.io.Serializable;
>> public class ClassA implements Serializable {
>> private static final long serialVersionUID = 1L;
>> private long id;
>> private ClassA a;
>>
>> public ClassA getA() {
>> return a;
>> }
>> public void setA(ClassA a) {
>> this.a = a;
>> }
>> public long getId() {
>> return id;
>> }
>> public void setId(long id) {
>> this.id = id;
>> }
>> }
>>
>> @WebMethod
>> public ClassA testRecursive() {
>> ClassA a1= new ClassA();
>> ClassA a2= new ClassA();
>> a1.setId(0);
>> a1.setA(a2);
>>
>> a2.setId(1);
>> a2.setA(a1);
>> return a1;
>> }
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_jax-ws.dev.java.net
>> For additional commands, e-mail: users-help_at_jax-ws.dev.java.net
>>
>>
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jax-ws.dev.java.net
For additional commands, e-mail: users-help_at_jax-ws.dev.java.net