axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 13324] New: - Deserialization of circular references is broken
Date Fri, 04 Oct 2002 23:38:56 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13324>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13324

Deserialization of circular references is broken

           Summary: Deserialization of circular references is broken
           Product: Axis
           Version: 1.0-rc2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Serialization/Deserialization
        AssignedTo: axis-dev@xml.apache.org
        ReportedBy: mjturner@apple.com


Trying to deserialize an object graph containing a circular reference results in a null 
being returned. Looking at the request/response in TCPMonitor shows the XML is well 
formatted.

Here's a sample Service and Client that demonstrate the problem.

**********Service*******************
import java.lang.*;
import java.util.*;

public class CircleService {

    public CircleService() {
        super();
    }

    public Vector getCircle() {
        Vector vector1 = new Vector();
        vector1.addElement("AString");
        Vector vector2 = new Vector();
        vector2.addElement(vector1);
        vector1.addElement(vector2);
        return vector2;
    }

}
**********Service*******************
import java.lang.*;
import java.util.*;
import java.net.*;

import javax.xml.namespace.QName;

import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import org.apache.axis.client.ServiceFactory;

public class CircleClient {

	public static void main(String[] argv) {
		try {
		ServiceFactory sf = new ServiceFactory();
		URL url = null;
		try {
			url = new URL("http://localhost:5000/servlets/CircleService?wsdl");
		} catch (Exception ex) {
			System.exit(1);
		}
		QName qname = new QName("http://localhost:5000/servlets/CircleServicee", 
"CircleService");
		QName portname = new QName("http://localhost:5000/servlets/CircleService", 
"CircleService");
		String operationName = "getCircle";
		Service serv = (Service)sf.createService(url, qname);
		Call call = (Call)serv.createCall(portname, operationName);
                Object[] params = new Object[0];
                System.out.println("Got result " + call.invoke(params));	
		} catch (Exception ex) {
			System.out.println("Something somewhere threw " + ex);
			ex.printStackTrace();
		}
	}
}

Mime
View raw message