Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8686441
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T22:51:01+00:00 2026-06-12T22:51:01+00:00

I have the following scenario. My environment is Visual Studio 2010, Framework 4.0. There

  • 0

I have the following scenario.

My environment is Visual Studio 2010, Framework 4.0.

There is a dll I don’t control with certain (fairly complex) object in it. I need to call that object in my wcf service then pass it to the client application, so client application would continue working with it.

I create data contract in the wcf, something like this:

  [DataContract]
    public class Test
    {       
        [DataMember]
        public dllCustomObjectType MyTest;
    }

Then I create an interface for this data contract:

 interface ITest
    {    
        [OperationContract]
        dllCustomObjectType GetMyTest(int Id);
    }

Then I implement the interface and use the implemented method in the client application.

Client application has references to the same dll I don’t control.

When I try to run it (in fact, even when I update service reference) I am getting the error that request failed and metadata contains a reference that cannot be resolved.

I can replicate that object in my data contracts (and it is a lot of work) but I am wondering if there is a way to pass the value of that object type to the client application without recreating the object.

I would appreciate any assistance.

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T22:51:02+00:00Added an answer on June 12, 2026 at 10:51 pm

    For this to work, WCF needs to know how to convert “dllCustomObjectType” to/from XML. That is, the “dllCustomObjectType” type needs to be a type that’s designed with serialization in mind, recognized by the DataContractSerializer (see http://msdn.microsoft.com/en-us/library/ms731923.aspx ). If the creators of your 3rd-party DLL never designed that type to support serialization, you will basically need to write your own serialization/deserialization code for it. You can do it by converting the type into your own custom type (simplest) or by creating a Data Contract Surrogate ( http://msdn.microsoft.com/en-us/library/ms733064.aspx ). Another option is to have a custom type (e.g. “Test” in your example above) implement some dynamic serialization interface (e.g. IXmlSerializable or ISerializable) where you would manually serialize the contained “dllCustomObjectType”, and then use Test instead of dllCustomObjectType in your service contract.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following scenario. I have created an ASP.NET web application (framework 3.5)
I am trying to implement following scenario in the IPad environment. I have list
I am trying to understand isolation/locks in SQL Server. I have following scenario in
I have the following scenario: in activity A, when a user clicks a button,
I have the following scenario: if(xml.Descendants(ns + Children).FirstOrDefault() != null) { XElement children =
I have the following scenario, a Customer who can have bank accounts in several
I have the following scenario :- template <typename T> class Base { public: virtual
I have the following scenario: Entities are loaded from the database. One of them
I have the following scenario where I want to pass in string and a
I have the following scenario. The client code only has access to FooHandler, not

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.