|
-
Jul 12th, 2004, 10:22 AM
#1
Thread Starter
Retired VBF Adm1nistrator
XML Web Service - how to reply with xml?
Righty. I can get the information via xml to my service - but how I reply with xml too?
VB Code:
<WebMethod()> _
Public Function AcceptSMS(ByVal oanumber As String, ByVal danumber As String, ByVal udstring As String) As String
Dim strRetVal As String = ""
strRetVal = "Passed data : <br>"
strRetVal &= oanumber & "<br>"
strRetVal &= danumber & "<br>"
strRetVal &= udstring & "<br>"
Return strRetVal
End Function
That will reply with just text, but I need to format it in proper xml. How do I reply properly...?
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
-
Jul 12th, 2004, 12:09 PM
#2
PowerPoster
Re: XML Web Service - how to reply with xml?
Originally posted by plenderj
Righty. I can get the information via xml to my service - but how I reply with xml too?
VB Code:
<WebMethod()> _
Public Function AcceptSMS(ByVal oanumber As String, ByVal danumber As String, ByVal udstring As String) As String
Dim strRetVal As String = ""
strRetVal = "Passed data : <br>"
strRetVal &= oanumber & "<br>"
strRetVal &= danumber & "<br>"
strRetVal &= udstring & "<br>"
Return strRetVal
End Function
That will reply with just text, but I need to format it in proper xml. How do I reply properly...?
The webservice will take the string, wrap xml around it, and send it back. That is it, unless you want the string itself to contain XML, then you just do the formatting yourself.
-
Jul 12th, 2004, 12:09 PM
#3
PowerPoster
Another thing you can do is create a serializable object, populate the properties of it, and return that. The webservice will serialize the object to xml for you, and return it.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|