Sign in to follow this  

c# WebService XML as parameter

Recommended Posts

James Rose    38

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

Share this post


Link to post
Share on other sites
winlonghorn    68

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.

Share this post


Link to post
Share on other sites
James Rose    38

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.