Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. WCF and WF
  4. Returning custom return types(fully qualified namespace) with wcf service svcutil

Returning custom return types(fully qualified namespace) with wcf service svcutil

Scheduled Pinned Locked Moved WCF and WF
wcfquestioncsharpdebugginghelp
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    VenkataRamana Gali
    wrote on last edited by
    #1

    Hi all, I have WCF service (Service1) with webservice methods, few of these webmethods are returning custom classes from a library (dll), this library contains all Serializable classes & few typed datasets. for example dll root namespace is ABC.XYZ.BusinessEntities and it has few sub namespaces like .Entities & .Contracts. 1) i have specified the following at IService.cs file

    [ServiceContract(Namespace = "urn:ABC.XYZ.WSTT")]
    [XmlSerializerFormat]
    [ServiceKnownType(typeof(CustomDataSet1))] //typed dataset
    [ServiceKnownType(typeof(Employee))] //custom class
    public interface IService

    1. class level i specified as

    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
    [ServiceBehavior(Namespace = "urn:urn:ABC.XYZ.WSTT")]
    public class Service : IService
    {
    //fun1 returns typeddataset1
    public CustomDataSet1 GetDataSet1() {}

      //fun2 retuns employee1
      public Employee GetEmployee(int empID)
      {
          return XYZDataManager.GetEmployee(empID);
       }
    

    }

    1. i confirgured as bindingConfiguration="basicHttpBindingWindows and now WCF service is working fine. i have generated proxy using svcutil.exe http://localhost/WSTT/Service.svc?wsdl /r:..\..\BusinessEntities\bin\Debug\ABC.XYZ.BusinessEntities /ser:Auto /out:ServiceClient.cs /noConfigand finally if i build my client project, GetEmployee return type should be "ABC.XYZ.BusinessEntities.Employee" instead i am getting just as Employee. How do i get the fully qualified custom return types in proxy? please help any thing wrong i did?

    Ramana

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups