DELPHI + ASP.NET WEBSERVICE WITH LLBLGEN 2.6

Posts   
 
    
Posts: 21
Joined: 07-Jul-2008
# Posted on: 07-Jul-2008 22:37:55   

**I have a application in C#, but this application will be integrated with a ERP in Delphi.

if i return a WebMethod Directly with a Entity Collection, results cannot be able to use, return a DataSet null...**

[WebMethod] publicEntityCollection<VitrineMarcasEntity> ListarMarcas() { VitrineMarcasManager vitrineMarcasManager = newVitrineMarcasManager(null); EntityCollection<VitrineMarcasEntity> marcas = vitrineMarcasManager.GetList(0); return marcas; }

One person here can take me a help?

Posts: 21
Joined: 07-Jul-2008
# Posted on: 07-Jul-2008 22:46:17   

Suggestions?

Convert Entity in a DataTable? Return Dictionaries?

Please help-me with this problem.?

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 10-Jul-2008 07:54:25   

Hi Igor, Why not serialize the entities and return that. You can _WriteXml _with _Compact25 _(it's compact, you just need the structured info right? simple_smile ) and then consume it at your consumer app.

Take a look at Serialization Support section on the manual

David Elizondo | LLBLGen Support Team
Posts: 21
Joined: 07-Jul-2008
# Posted on: 10-Jul-2008 16:36:56   

Ok, but, i will return a string with the xml? Because in the other side, i dont have the LLBLGen Installed.

This Xml Generated is in W3C Pattern? Because the Delphi Web Service Client and the ASP.NET Web Service use this Pattern, consuming will be very simple and easy.

I don't know Delphi, this part of implementation will be done by another company (Creator of the Application in Delphi).

Did you makes a code sample to me to the Service side using your solution?

Thanks for all and sorry by my english... i'm from brazil..

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 11-Jul-2008 09:03:01   

igor.quirino wrote:

Ok, but, i will return a string with the xml?

Yes.

igor.quirino wrote:

This Xml Generated is in W3C Pattern?

Yes

igor.quirino wrote:

Did you makes a code sample to me to the Service side using your solution?

at http://llblgen.com/pages/examples.aspx look for the WCF examples.

David Elizondo | LLBLGen Support Team
Posts: 21
Joined: 07-Jul-2008
# Posted on: 11-Jul-2008 16:51:46   

The best solution is Convert EntityCollection to a DataTable... But the Xml Generated not is valid to the DataTable...confused Suggestions? ** DataTable ret = new DataTable();

string xmlCompact25; marcas.WriteXml(XmlFormatAspect.Compact25 | XmlFormatAspect.DatesInXmlDataType | XmlFormatAspect.MLTextInCDataBlocks, out xmlCompact25);

marcas.WriteXml(out xmlCompact25; ret.ReadXml(xmlCompact25);

return ret**

Thanks for all!