none
Passing the result from a WCF Data Service between SOAP servers? RRS feed

  • Question

  • Hello!

    Let's assume you have a WCF Data Service and a client, which is actually a SOAP WCF Service, using it by the Means of the client features of VS 2012.

    Can this SOAP server return e.g. the DataServiceContext as a response value to one of it's operations and it's client can pass it to some other SOAP Server?

    We could generalize the question in this way: Can a DataServiceContext be serialized and passed between SOAP WCF servers?

    Best regards,

    Henrik Dahl

    • Moved by Haixia_Xie Tuesday, January 29, 2013 7:04 AM move to a more appropriate forum
    Monday, January 28, 2013 9:28 PM

All replies

  • Hi,

    This issue is more related to WCF Data Service, so I moved the thread there so that you can get better support on this issue. Thanks for your understanding.

    Best Regards.


    Haixia
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, January 29, 2013 7:08 AM
  • DataServiceContext should not be serialized like this. In itself it doesn't really store information which would be useful to another machine/process. It stores information about which entities are modified and so on. It also stores the URL of the OData service, which might not be valid for the other machine.

    If you would describe why do you want to do this, what is the scenario, maybe somebody here would be able to suggest a better solution.

    Thanks,


    Vitek Karas [MSFT]

    Tuesday, January 29, 2013 8:39 AM
    Moderator
  • The intention obviously isn't to do something which is invalid from business point of view.

    Let's assume we have more tiers on the server side. The top-most tier is using the services of the tier below via SOAP. We could say that the top-most tier is orchestrating usage of the services below. Can the orchestration pass sub-graphs of data around between the subordinate SOAP servers via some kind of usage of a WCF DataServiceContext or its contents?

    We can obviously assume that either the same url for the OData service can be used by all or they all know the url valid for them, or alternatively they might not even need to do anything else that using what is in the bag received.

    If a WCF DataServiceContext cannot be used for this, is there something else which can as it seems like what is necessary just corresponds to what you can achieve via the OData protocol.

    Best regards,

    Henrik Dahl

    Tuesday, January 29, 2013 9:02 AM
  • Hey Henrik,

    Putting aside the discussion of the technical merits of what you are talking about, as of right now, DataServiceContext is not serializable for all platforms except Windows Phone.

    Below is a post on how to serialize data on Windows Phone if your interested in looking into it (its needed for tombstoning for apps when they are shutdown)

          http://msdn.microsoft.com/en-us/library/hh286409(v=vs.92).aspx

    We don't have any plans right now to bring this to the Desktop, Silverlight, or other .net platforms right. If this is a requirement for you we have a site for new features here http://dataservices.mswish.net, feel free to add and upvote.

    As it relates to these layers, it seems things are backwards, I would be exposing a REST front end, that may front a legacy SOAP backend. If you wanted to select a graph of data you can use the normal OData query to get this data, this would be materialized on the client.

    Thanks,

    Chris Robinson - WCF Data Services


    This posting is provided "AS IS" with no warranties, and confers no rights.

    Tuesday, January 29, 2013 5:10 PM
    Moderator