Can some please help, I have a same problem but once again:

server side (web service in c#):

public abstract class CatalogValue
{
    public int id;

    public CatalogValue next;

        public  CatalogValue()
        {
        }
}

public class CatalogValueImpl : CatalogValue //Linked list
{
    public string name;
    public CatalogValueImpl()
        {
        this.next = null;
        }
}

public class DataSource
{
    public CatalogValue value;
   
    public DataSource() { }
}

Now the main mistery: this two calls work fine
[WebMethod]
    public CatalogValue getCat()
    {
        CatalogValueImpl i = new CatalogValueImpl();
        i.name = "jhjhfdajd";
        return i;
    }

    [WebMethod]
    public CatalogValue updateCat(CatalogValue c)
    {
        c.id = -1;
        return c;
    }


BUT why this two call dont work:
[XmlInclude(typeof(CatalogValueImpl))]
    [WebMethod]
    public DataSource get()
    {
        DataSource ds = new DataSource();
        ds.init();
        return ds;
    }

    [XmlInclude(typeof(CatalogValue))]
    [XmlInclude(typeof(CatalogValueImpl))]
    [WebMethod]
    public DataSource update(DataSource value)
    {
        value = new DataSource();
        value.init();
        return value;
    }

Just to say that on client side (client is in java, and I'm using axis 1.3)
data that I getting from the server is correct, but when I try to call
"update(DataSource value)" I get following error:
xisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Client
 faultSubcode:
 faultString: System.Web.Services.Protocols.SoapException: Server was unable
to read request. ---> System.InvalidOperationException: There is an error in
XML document (1, 272). ---> System.InvalidOperationException: The specified
type is abstract: name='CatalogValue', namespace='http://tempuri.org/', at
<value xmlns='http://tempuri.org/'>.
   at
Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReader1.Read2_CatalogValue(Boolean
isNullable, Boolean checkType)
   at
Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReader1.Read4_DataSource(Boolean
isNullable, Boolean checkType)
   at
Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReader1.Read9_update()
   at
Microsoft.Xml.Serialization.GeneratedAssembly.ArrayOfObjectSerializer8.Deserialize(XmlSerializationReader
reader)
   at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader
xmlReader, String encodingStyle, XmlDeserializationEvents events)
   --- End of inner exception stack trace ---
   at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader
xmlReader, String encodingStyle, XmlDeserializationEvents events)
   at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader
xmlReader, String encodingStyle)
   at System.Web.Services.Protocols.SoapServerProtocol.ReadParameters()
   --- End of inner exception stack trace ---
   at System.Web.Services.Protocols.SoapServerProtocol.ReadParameters()
   at System.Web.Services.Protocols.WebServiceHandler.CoreProcessRequest()

Sorry for any typing mistake, one my arm is broken.
Please Help I need solution for this.
-- 
View this message in context: 
http://www.nabble.com/axis-java-client%2C-c--web-service-interoperability-problem-tf4372284.html#a12461937
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to