New Message on dotNET User Group Hyd

VJs Tip Of The Day

Reply
  Reply to Sender   Recommend Message 74 in Discussion
From: VishalRJoshi

XmlDocument on WebService

This is just an observation which you can make... If there is a web method
in your webservice which takes or returns a parameter of type
System.Xml.XmlDocument then it gets converted into System.Xml.XmlNode on the
client side (if you are using .Net on both the ends and adding web reference
via wsdl.exe)...

ie if your service web method definition looks like below...
_
Public Function GetXmlDoc(ByVal Id As Integer, _
ByVal doc As XmlDocument) As XmlDocument
End Function

The proxy definition of the same method will look like below...
Public Function GetXmlDoc(ByVal Id As Integer, ByVal doc As
System.Xml.XmlNode) As System.Xml.XmlNode
Dim results() As Object = Me.Invoke("GetXmlNode", New Object() {Id, doc})
Return CType(results(0),System.Xml.XmlNode)
End Function


It is an understood behavior that for WSDL you are always receiving a
XmlNode if it is a document for you then you are suppose to implicitly
convert the same into a XmlDocument...

I do wish that there was a special indication in WSDL which could inform the
proxy generator whether a node is expected or a document is, but that is
more to do with the WSDL file format right!!...

Vishal Joshi
Microsoft MVP .Net
If You Think YOU CAN... You Can...
http://VishalJoshi.Blogspot.com
http://www.microsoft.com/india/mvp/indiamvp.aspx
http://groups.msn.com/ChennaiNetUserGroup
http://groups.msn.com/CNUG-DAM
http://groups.msn.com/NetBloomingtonUserGroup


PS: Have a wonderful weekend... :-) If you are reading this mail on Monday
then decide right away that you got to have a wonderful next weekend... If
you were 'requested' to work over this weekend even if you had to do
something for yourself at that time, then better start taking lessons on
'being affirmative'...
:-) If you have not seen the movie "Office Space" then make sure you grab it
from somewhere and watch it next weekend... To an extent it helped me laugh
at my own doomed situation... :-)

PPS: Kathleen has added some points to partial keyword discussion of
yesterday... Info is updated on the blog...


View other groups in this category.

baazee.com

Also on MSN:
Start Chatting | Listen to Music | House & Home | Try Online Dating | Daily Horoscopes

To stop getting this e-mail, or change how often it arrives, go to your E-mail Settings.

Need help? If you've forgotten your password, please go to Passport Member Services.
For other questions or feedback, go to our Contact Us page.

If you do not want to receive future e-mail from this MSN group, or if you received this message by mistake, please click the "Remove" link below. On the pre-addressed e-mail message that opens, simply click "Send". Your e-mail address will be deleted from this group's mailing list.
Remove my e-mail address from dotNET User Group Hyd.

Reply via email to