• 0

c# WebService XML as parameter


Question

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?

post-45653-0-24072000-1401734152.png

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

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.

Link to comment
Share on other sites

  • 0

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

Link to comment
Share on other sites

This topic is now closed to further replies.