Jump to content



Photo

c# WebService XML as parameter

Answered Go to the full post c# webservice xml

  • Please log in to reply
4 replies to this topic

#1 James Rose

James Rose

    Software Developer

  • Tech Issues Solved: 1
  • Joined: 20-January 04
  • Location: New York City

Posted 02 June 2014 - 18:36

Hello gang,

 

I'm having an interesting situation and I could use a second set of eyes.  I have created a webservice that accepts an XMLDocument as a parameter, but in my testbed app the value shows up as an XMLNode.  WTH?

[WebMethod(CacheDuration = 2)]
public XmlDocument SaveFeelz(XmlDocument xmlFeelz)
{
//code here....
}


See image for the intellisense I am seeing.   Any thoughts?

Attached Images

  • XMLNode.png




#2 winlonghorn

winlonghorn

    Neowinian

  • Joined: 17-March 05
  • Location: Erie, PA

Posted 02 June 2014 - 18:59

Hello gang,

 

I'm having an interesting situation and I could use a second set of eyes.  I have created a webservice that accepts an XMLDocument as a parameter, but in my testbed app the value shows up as an XMLNode.  WTH?

[WebMethod(CacheDuration = 2)]
public XmlDocument SaveFeelz(XmlDocument xmlFeelz)
{
//code here....
}


See image for the intellisense I am seeing.   Any thoughts?

 

Where is the xmlFeelz object you are passing in as the parameter? I would need to see more of your code to see what is happening.



#3 OP James Rose

James Rose

    Software Developer

  • Tech Issues Solved: 1
  • Joined: 20-January 04
  • Location: New York City

Posted 02 June 2014 - 19:08

Where is the xmlFeelz object you are passing in as the parameter? I would need to see more of your code to see what is happening.

 

Thanks for taking the time.  I have an existing XML file for testing and I get it via a OpenFileDialog

XmlDocument xmlFeelz = new XmlDocument();

xmlFeelz.Load(objFileDialog.FileName);

XmlDocument xmlResult = new XmlDocument();

FeelzMeServices.FeelzMeSrvc objFMS = new FeelzMeServices.FeelzMeSrvc();

XmlDocument xmlReturn = objFMS.SaveFeelz(xmlFeelz);

However, that said... the TestBed code doesn't really change the fact that the intellisense is asking for the wrong type



#4 +virtorio

virtorio

    4089 III

  • Tech Issues Solved: 11
  • Joined: 28-April 03
  • Location: New Zealand
  • OS: OSX 10.9, Windows 8.1
  • Phone: Samsung Galaxy SIII

Posted 02 June 2014 - 20:13   Best Answer

http://support.microsoft.com/kb/330600



#5 OP James Rose

James Rose

    Software Developer

  • Tech Issues Solved: 1
  • Joined: 20-January 04
  • Location: New York City

Posted 02 June 2014 - 20:21

 

 

Just took a quick look... interesting.  I'll review this further.  Thank you very much





Click here to login or here to register to remove this ad, it's free!