One of the things HttpClient does for you is to construct the Request Message automatically when you execute GetAsync. To add or change an HTTP header (such as “User-Agent”) however, you will need to construct the Request Message yourself. Luckily this is rather simple to carry out.
It turns out that the dataset is only included in the WSDL if it is actually being returned by a function. Simply including it in the project, even if it is used in the code(as mine was), does not mean it will be made visible to the outside world.
This does make some sense as you wouldn’t typically want to see a bunch of internal components of the web service unless those components could be used by the client application. Now that I understand this little rule, things are much clearer now.Â Of course, it would be nice to have had this documented someplace. But hey, where would the adventure be in that?
I’m still working though some issues in my head (data collisions and exception handling for example) so I’m not quite in Heaven yet, but I am comfortable in purgatory. 🙂
Thanks again Christian.
Let me warn you that this posting may be a little incoherent and I apologies for that. You see, my brain is currently lying on the floor next to me. It seems that in a fit of frustration it jumped for it.
< ?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
This week I decided to join the rest of the .< ?xml:namespace prefix = st2 ns = "urn:schemas-microsoft-com:office:smarttags" />
I installed the TaskVision sample and opened it up. Everything was extremely easy to understand. In fact, I was blown away by how seamless it all fit together. There seemed to be very few “hoop jumps” in their code.
After gaining some confidence from TaskVision, I started a new project.
I added an ASP.
Soon after this, my brain took the suicidal leap.
Now that I have this lovely Web Service, I made a Web Reference to it from my client application. But something strange happened. While the class that returns the dataset was there, the dataset itself was not. I took another look at TaskVision and found that they were available in their Web Service. So what was going on here? Why can’t I access the dataset?
I’ve now been Googleing for 3 days and have found nothing on this. So either I’m an idiot (very possible, even probable) or I’m trying to do something abnormal here (also very possible).
Anyone want to help me get my brain back into my head?