All--
It looks like an Entity cannot be passed as Object.
Is this the case?
I am trying to return an Entity as an Object from a web service and I get the error message below.
I am wondering-- is this an LLBLGen restriction, a Web Services restriction, or something else?
FYI, we are using LLBLGen, ASP.NET, VS.NET 2003, VB.NET, .NET 1.1, the Adapter templates, SQL Server 2000, web services, SD.LLBLGen.Pro.DQE.SqlServer.NET11.dll Version 1.0.20051.51207, SD.LLBLGen.Pro.ORMSupportClasses.NET11.dll Version 1.0.20051.51214, Windows XP Pro, IIS 5.1, and so on.
FYI, I have read the posts about web services and have seen in the help files that an LLBLGen object should be serialized to String or converted to a DataSet or one should adjust the proxy by hand or one should make a custom DTO.
But, I am specifically wondering about passing it as an Object and I am curious as to why that does not work.
(Unfortunately, our team lead does not want to pass the Entity as a String of XML, which does work perfectly.)
This is the error.
'
'System.Web.Services.Protocols.SoapException: Server was unable to process
'request. -->
'There was an error generating the XML document. -->
'
'The type Scratch.Llblgen.Windows.VB.Northwind.EntityClasses.ShippersEntity
'may not be used in this context.
'To use Scratch.Llblgen.Windows.VB.Northwind.EntityClasses.ShippersEntity
'as a parameter, return type, or member of a class or struct,
'the parameter, return type, or member must be declared as type
'Scratch.Llblgen.Windows.VB.Northwind.EntityClasses.ShippersEntity
'(it can't be object). Objects of type
'Scratch.Llblgen.Windows.VB.Northwind.EntityClasses.ShippersEntity may not be
'used in un-typed collections, such as ArrayLists.
'
' at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse
'(SoapClientMessage message, WebResponse response,
'Stream responseStream, Boolean asyncCall)
' at System.Web.Services.Protocols.SoapHttpClientProtocol.
'Invoke(String methodName, Object[] parameters)
' at ShippersService.Shippers.RetrieveEntityAsObject(Int32 entityId)
'in C:\projects\Scratch\Llblgen\Windows\VB\Scratch.Llblgen.Windows.VB.
'Northwind.Client\Web References\ShippersService\Reference.vb:line 70
' at Scratch.Llblgen.Windows.VB.Northwind.Client.Form1.
'RetrieveOneAsObjectViaServiceButton_Click(Object sender, EventArgs e) in
'C:\projects\Scratch\Llblgen\Windows\VB\Scratch.Llblgen.Windows.VB.Northwind.
'Client\Form1.vb:line1065
'
What do you think?
Please advise.
Thank you.
--Mark Kamoski