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. Converting a WSDL created client to a pure code one

Converting a WSDL created client to a pure code one

Scheduled Pinned Locked Moved WCF and WF
csharpwcfcomsysadminalgorithms
2 Posts 2 Posters 7 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.
  • C Offline
    C Offline
    cjb110
    wrote on last edited by
    #1

    I'm writing a COM component that needs to consume a WCF web service. I was given a WSDL file from the supplier and so my C# project as a Service References component in it. I overlooked the fact that it'd created settings in the config file (I've already added a RegistrySettingsProvider component for the other settings I'd needed), so when I came to deploy the DLL onto the server I found I couldn't create the type library. Now I've done some searching and it looks like I can move the config to a code, and use ChannelFactory<> in some form, but I'm not sure what I actually need to do? Do I take the code generated by svcutil and start from there? If someone could give some pointers as to what I'm needing to create I should be able work out the other parts. Could I use the fact I've created a RegistrySettingsProvider and just move the config file stuff in there somehow? In my code I'm just using the webservice like any other object, once I change to the code based config is this still the case? I.e. will I have to change my existing code at all? Thanks

    A 1 Reply Last reply
    0
    • C cjb110

      I'm writing a COM component that needs to consume a WCF web service. I was given a WSDL file from the supplier and so my C# project as a Service References component in it. I overlooked the fact that it'd created settings in the config file (I've already added a RegistrySettingsProvider component for the other settings I'd needed), so when I came to deploy the DLL onto the server I found I couldn't create the type library. Now I've done some searching and it looks like I can move the config to a code, and use ChannelFactory<> in some form, but I'm not sure what I actually need to do? Do I take the code generated by svcutil and start from there? If someone could give some pointers as to what I'm needing to create I should be able work out the other parts. Could I use the fact I've created a RegistrySettingsProvider and just move the config file stuff in there somehow? In my code I'm just using the webservice like any other object, once I change to the code based config is this still the case? I.e. will I have to change my existing code at all? Thanks

      A Offline
      A Offline
      Abhinav S
      wrote on last edited by
      #2

      Starting with the code generate by svcUtil is generally ok. However, if you are consuming axis web services, more often than not, issues can arise that need some form of customization in the channel, message encoding etc. Consuming a WCF service should be more straightforward and easier,

      WP Apps - Color Search | Arctic | XKCD | Sound Meter | Speed Dial

      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