Crudler
Crudler

Reputation: 2286

visual studio issue pulling in web service

I am using VS2010, and I want to consume a webservice that was given to me

https://www.###################/pinManagement.cfc?wsdl I have done this many times before but for some reason this one i cant get right

  1. right click, add solution
  2. add service reference
  3. past in url, give a namespace and voila

This pulls in fine, but for some reason a bunch of objects in the wsdl are being left off, namely all the request/response objects. the methods are there, but nothing else.

what am I doing wrong?

Thanks

Upvotes: 1

Views: 808

Answers (3)

Crudler
Crudler

Reputation: 2286

ok, i solved it. thanks to Ian for the steps to see my error.

i got the solution from this site http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/51babae5-26e5-4405-b03c-4301710854c0/

but ill repost the steps below incase the link dies

In Visual studio: 1. Click on "Show All Files" in the solution explorer

  1. Open the file named "Reference.svcmap" in your service reference

  2. Set the option UseSerializerForFaults to false in "Reference.svcmap" and save it (please don't update the service reference, apparently doing so will reset the option to true)

  3. Open the Reference.cs and you should see the operations generated

Upvotes: 1

Ian Gilroy
Ian Gilroy

Reputation: 2041

Try creating a proxy using the XmlSerializer. You can do that by running svcutil from the command line and then pulling the generated .cs and .config files into your project:

svcutil /serializer:XmlSerializer https://www.example.com/Collections/1x0x0/pinManagement.cfc?wsdl

Any errors that you get from svcutil will probably help you narrow down the problem.

Upvotes: 0

Zaki
Zaki

Reputation: 5600

Right click on your web service select:

Configure Service Reference=>Un-check reuse types in referenced assemblies

See if that helps

EDIT ::

enter image description here

Upvotes: 0

Related Questions