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 7534959
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T06:10:00+00:00 2026-05-30T06:10:00+00:00

I have a wcf method that accepts an object Order as its input and

  • 0

I have a wcf method that accepts an object “Order” as its input and returns an object “ResultSet”. I created a test project, added a reference to my objectModel project and can consume my service no problem.

I added DataContract and DataMember attributes to my Order objects properties (my Order class is in a separate project than the wcf services not sure if this comes into play or not?). What I am foggy on is, is what if the client consuming this service is doing it in java app or something? How is he gonna pass to my service an object of type Order? Furthermore how is he going to receive and object of type ResultSet?

Would this scenario even work as is? Is this information about the object automatically populated in the service reference? Even if it is how is it possible for say a java app to even pass my an object of type Order?

  • 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-05-30T06:10:02+00:00Added an answer on May 30, 2026 at 6:10 am

    The Java app doesn’t have to pass an object of the same type, it has to pass a message that satisfied the contract laid out by your service interface.

    Consider a .NET only service. Let’s say you have this service / data contract:

    namespace MyServer
    {
       [ServiceContract(Namespace="http://example.com/foo")]
       public interface IMyService 
       {
            void Foo(Bar bar);
       }
    
       [DataContract(Namespace="http://example.com/foo")]
       public class Bar
       {
           [DataMember]
           public string Result { get; set; }
       }
     }
    

    Now, let’s say you want to hand code a client, you could make your own data contract implementation (note that it’s in a difference namespace and likely in a different assembly than the above code):

    namespace MyClient
    {
       [DataContract(Namespace="http://example.com/foo")]
       public class Bar
       {
           [DataMember]
           public string Result { get; set; }
       }
     }
    

    It’s a different type, but it will still serialize / deserialize correctly through WCF because the message is constructed correctly. The same principle works with a Java client. As long as your java code is capable of constructing the correct message, it will work fine.

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

Sidebar

Related Questions

I have a WCF service method that expects an object and then retrieves its
I have developed a sample WCF REST service that accepts that creates an Order
I have a WCF service that accepts an object as a parameter that has
I have a WCF service method that returns a big byte[] array around 2
I have a WCF service method that accepts a List of objects. For this
I have a JSON server (WCF REST) with a JSON POST method that accepts
I have a WCF method that accepts arbitrary binary data which the service will
I have created a WCF method that runs an infinite loop, polling every 5
I have a WCF rest service. It has a method that returns a list
I have a WCF service method that's running in a worker thread I spin

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.