Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / June 2004

Tip: Looking for answers? Try searching our database.

Returning XML from a web service

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
akosz - 07 Jun 2004 17:26 GMT
We have a web service that basically does as follows

<WebMethod()>
Public Function Verify(ByRef strXML As String) As Intege

   Dim iRetCode As Integer = 0    

   iRetCode = DoStuff(strXML
   If (iRetCode < 0) The
      Return iRetCod
   End I

   Return iRetCod
End Functio

This works fine when we use a VB.NET or ColdFusion test app to send or receive XML.  However, some of our customers who aren't using VB or CF are having the XML returned to them using entity references ( such as: &lt; and &gt; ).  If we change the code to

<WebMethod()>
Public Function Verify(ByRef strXML As String) As Intege

   Dim iRetCode As Integer = 0    

   iRetCode = DoStuff(strXML
   If (iRetCode < 0) The
      strXML = "<![CDATA[" + strXML + "]]>
      Return iRetCod
   End I

   strXML = "<![CDATA[" + strXML + "]]>
   Return iRetCod
End Functio

It eliminates their problem, but now the CF and VB.NET test apps of ours are blowing up

Any suggestions on how to return XML that is universally readable
Dino Chiesa [Microsoft] - 07 Jun 2004 22:28 GMT
don't return it (or pass it) as a string!
pass it as an XmlElement.

check this article to see how:
http://msdn.microsoft.com/library/en-us/dnservice/html/service04162003.asp

-Dino

> We have a web service that basically does as follows:
>
[quoted text clipped - 12 lines]
>
> This works fine when we use a VB.NET or ColdFusion test app to send or receive XML.  However, some of our customers who aren't using VB or CF are
having the XML returned to them using entity references ( such as: &lt; and
&gt; ).  If we change the code to:

> <WebMethod()> _
> Public Function Verify(ByRef strXML As String) As Integer
[quoted text clipped - 16 lines]
>
> akosz

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.