Wacky webservice problem

XMLDocument and XMLNode

Page 1 of 1

6 Replies - 1670 Views - Last Post: 25 January 2008 - 12:22 PM Rate Topic: -----

#1 weedweaver  Icon User is offline

  • New D.I.C Head

Reputation: -1
  • View blog
  • Posts: 42
  • Joined: 01-May 07

Wacky webservice problem

Posted 24 January 2008 - 03:48 AM

Has anyone come accross this before, I have a webservice which has a webethod which returns an XMLDocument
e.g.


[WebMethod]
public XmlDocument Test()
{
   //code
	return xmlDoc;
}




I have another project in which i reference the webservice, when this webservice is added the auto generated Reference.cs file is wrong, the method signature is wrong, it thinks the return value is an XMLNode not an XMldocument. i.e.


		public System.Xml.XmlNode Test() {
		   ///bla bla bla
			return ((System.Xml.XmlNode)(results[0]));
		}




I have to manually go into the Reference.cs file and manually change it to XMLDocument!!

Any ideas?? (im using vs2003 by the way)

Thanks

Is This A Good Question/Topic? 0
  • +

Replies To: Wacky webservice problem

#2 weedweaver  Icon User is offline

  • New D.I.C Head

Reputation: -1
  • View blog
  • Posts: 42
  • Joined: 01-May 07

Re: Wacky webservice problem

Posted 25 January 2008 - 07:49 AM

Anyone??? Can anyone try this to see if the same thing happens to them??
Was This Post Helpful? 0
  • +
  • -

#3 PsychoCoder  Icon User is offline

  • Google.Sucks.Init(true);
  • member icon

Reputation: 1641
  • View blog
  • Posts: 19,853
  • Joined: 26-July 07

Re: Wacky webservice problem

Posted 25 January 2008 - 08:18 AM

I personally have yet to see this happen, and I've written many a Web Service in .Net. I did write a tutorial on the Introduction to web services in C# that may help answer some of your questions, but as far as your particular issue Ive never seen/heard of that happening in a Web Service before.
Was This Post Helpful? 0
  • +
  • -

#4 weedweaver  Icon User is offline

  • New D.I.C Head

Reputation: -1
  • View blog
  • Posts: 42
  • Joined: 01-May 07

Re: Wacky webservice problem

Posted 25 January 2008 - 08:36 AM

Might be worth creating a simple webservice (if you have time obviously) to see if this happens for you. I have never seen it happen before either, it only seems to be with the XmlDocument datatype.

Thanks
Was This Post Helpful? 0
  • +
  • -

#5 weedweaver  Icon User is offline

  • New D.I.C Head

Reputation: -1
  • View blog
  • Posts: 42
  • Joined: 01-May 07

Re: Wacky webservice problem

Posted 25 January 2008 - 08:45 AM

Its happened again so it looks a bug in vs2003 to me. Created a simple webservice which returned an XmlDocument (and took one in as a parameter), added this as a reference in a new windows app and the Reference.cs file contained XmlNode not XmlDocument!!! Thats pooop!
Was This Post Helpful? 0
  • +
  • -

#6 Jayman  Icon User is offline

  • Student of Life
  • member icon

Reputation: 418
  • View blog
  • Posts: 9,532
  • Joined: 26-December 05

Re: Wacky webservice problem

Posted 25 January 2008 - 11:45 AM

What is the version number of your VS?

You can find this by going to Help -> About Microsoft Visual Studio.

I cannot test it for you because I have long since moved on to VS2005. I would suggest you do the same, if you can.
Was This Post Helpful? 0
  • +
  • -

#7 weedweaver  Icon User is offline

  • New D.I.C Head

Reputation: -1
  • View blog
  • Posts: 42
  • Joined: 01-May 07

Re: Wacky webservice problem

Posted 25 January 2008 - 12:22 PM

Its not a massive problem, just means i have to manually edit the reference.cs file which is just a bit guff. unfortunately the product is written in .net 2003 so i have to use that for the time being, we do use 2005 and 2008 in other apps however (which is about 50x better)!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1