Shared Entities Between Web services

Shared Entities Between Web services

  
As more and more Web Service Methods being added to one Web Service, we categorize them into different Web Services based on functionality. However, we run into the issue of not being able to share Entities between Web Services. For ex. we have Web Service DataServices with Web Service Method GetData return an Entities Data. After some processing at the UI level, we want to pass Entities Data using Web Service ProcessServices with Web Server Method UpdateData but it won't compile.
Hi Vincent, and thanks for your first post in the OutSystems community forums.

Do you have an eSpace that you can show us, with the behavior you're referring to, so we can take a look at it and see what's going on? Are the entities external or internal? And are they from a different eSpace, or from a different system altogether?

I would assume that you would be able to do what you're describing, unless I'm missing something from your description.

Regards,

Paulo Tavares
We use Web Services created in OutSystems with our Silverlight Front End. Both  Web Services I described are from the same espace respectively. The issue is sharing entities from the Silverlight UI not from within the espace. For example: ProcessService.UpdateData(Data) cause an error because it's expecting ProcessService.Data instead of DataServices.Data Entity (this is the call from the UI). I hope that clarify my question. If not, I'll try to post a sample oml files along with the silverlight code i'm trying accomplish.

Thanks,

Vincent
Hi Vincent,

Well, if the case is with sharing the entities in Silverlight, I really don't know how to help you much. I would assume that the WSDL definition from the webservice would expose the Entity data type, and that you would be able to instance it in Silverlight? Isn't that the case?

Regards,

Paulo Tavares
Hi Paulo,

It would work if all Web Methods are from the same Web Service. I tried to use wsdl.exe from this directory: C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin to generate a file to share entities between two Web Services, but it didn't seem work either.

wsdl.exe /sharetypes http://local/TestPortal/DataServices.asmx?wsdl http://local/TestPortal/ProcessServices.asmx?wsdl

DataServices.Data Entity is not the same as ProcessServices.Data Entity at the Silverlight UI level, even though both Web Services are in the same espace that have definition for Entity Data.

Our current workaround is to have all Web Methods inside one big Web Service. I was wondering if anyone else have ran across this issue or maybe I'm doing something wrong.

Thanks for your help,

Vincent
A senior developer in my team pointed me to the solution of this issue. Here's the link to it just in case someone needs it: http://forums.silverlight.net/forums/p/104558/238466.aspx

The idea is to create one service reference that contains two web services as metadasource so that entities can be shared between those web services. Pretty neat.
Hi Vincent,

Great find, and thanks a lot for sharing - I'm pretty sure that will come in handy for others who bump into a similar issue.

Good luck with your projects, and I hope to keep hearing about your developments!

Paulo Tavares