[Mono-dev] [jfernandez at igalia.com: [Mono-list] Problems serializing 'object' classes]

Javier Fernandez jfernandez at igalia.com
Fri Jun 9 02:27:37 EDT 2006


----- Forwarded message from Javier Fernandez <jfernandez at igalia.com> -----

X-Original-To: mono-list at lists.ximian.com
From: Javier Fernandez <jfernandez at igalia.com>
To: mono-list at lists.ximian.com
X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on 
	frontgate.ximian.com
X-Spam-Level: 
X-Spam-Status: No, score=0.2 required=5.0 tests=AWL,RM_bw_Generic,
	SPF_HELO_PASS,SPF_PASS version=3.0.3
Subject: [Mono-list] Problems serializing 'object' classes 
X-BeenThere: mono-list at lists.ximian.com
X-Mailman-Version: 2.1.5
List-Id: Mono Developer Discussion List <mono-list.lists.ximian.com>
List-Unsubscribe: <http://lists.ximian.com/mailman/listinfo/mono-list>,
	<mailto:mono-list-request at lists.ximian.com?subject=unsubscribe>
List-Archive: <http://lists.ximian.com/pipermail/mono-list>
List-Post: <mailto:mono-list at lists.ximian.com>
List-Help: <mailto:mono-list-request at lists.ximian.com?subject=help>
List-Subscribe: <http://lists.ximian.com/mailman/listinfo/mono-list>,
	<mailto:mono-list-request at lists.ximian.com?subject=subscribe>

Hi,
I've developed a SOAP server using gsoap (2.7) and i'm trying 
to build a C# client based on Mono .Net specification.

I've used Mico (2.3.11) to generate the WSDL from an IDL file.
The gsoap C client runs fine, but when i tried to build the C#
client i found some problems. 

The C# generated stub define the following structures : 

/// <remarks/>
[System.Xml.Serialization.SoapType("CORBA.Any", Namespace="http://www.omg.org/IDL-Mapped/")]
public class CORBAAny {

    /// <remarks/>
    public CORBATypeCode type;

    /// <remarks/>
    public int __type;

    /// <remarks/>
    public object value;
}

/// <remarks/>
[System.Xml.Serialization.SoapType("CORBA.TypeCode", Namespace="http://www.omg.org/IDL-Mapped/")]
public class CORBATypeCode {

    /// <remarks/>
    [System.Xml.Serialization.SoapElement(DataType="anyURI")]
    public string definition;

    /// <remarks/>
    public string type_name;
}

The '_type' field was manually aded to the WSDL specification. This is a limitation
of gsoap, that needs information about the type of the generic value. In C# was 
defined as 'object' class; in C it was defined as 'void *' . 

These clases are used to define abstract classes. For instance, 

ConcreteClass {

	int att1
	int att2
}
 
AbstractClass {
 
	int att1;
	CORBAAny concrete;
}


When i tried to serialize the AbstractClass class, the 'concrete'
field arrives to the gsoap server as undefined values. The normal 
attributes of the concrete class are serialized corectly. 

I don't undertand why this kind of objects are not serialized
correctly. 

Could anyone help me ?
Thanks, 


-- 
Javier Fernández García-Boente
Ingeniero en Informática                 
mailto:jfernandez at igalia.com                    
Igalia S.L. http://www.igalia.com
Telf. +34 981 91 39 91  
Fax.  +34 981 91 39 49
 
_______________________________________________
Mono-list maillist  -  Mono-list at lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


----- End forwarded message -----

-- 
Javier Fernández García-Boente
Ingeniero en Informática                 
mailto:jfernandez at igalia.com                    
Igalia S.L. http://www.igalia.com
Telf. +34 981 91 39 91  
Fax.  +34 981 91 39 49
 



More information about the Mono-devel-list mailing list