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 / February 2005

Tip: Looking for answers? Try searching our database.

Return string from web service method without xml tags

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Scanner2001 - 31 Jan 2005 16:14 GMT
   I am looking for a way to return the output of a web service as a string
without the xml tags, just the raw data. I am calling the web service from
an html page using a form post method. Specifically, I want to remove the

<?xml version="1.0" encoding="utf-8"?>
<string xmlns="http://www.company.com/webservices/">string</string>

And just return the string. I do not want to write a web page wrapper as an
intermediate between the page and service to strip out the xml tags.

Any ideas would be greatly appreciated.

Thanks,
J
J Chambers - 01 Feb 2005 14:49 GMT
the return value wrapped in the string tag is how the web service conforms to
standards.

if you don't want to write a web page, write a DLL with a web reference to
the web service (which generates your client proxy).  have your DLL implement
the same methods as the webservice and just pass the results back out.  your
DLL can expect a string return type without the xml around it.

this is known as a service gateway pattern, from MS P&P
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpatterns/html
/DesServiceGateway.asp


as a tip: if you use an interface to define your members it makes it a
little easier to ensure you are exposing everything from the web service in
the DLL.

cheers.

>     I am looking for a way to return the output of a web service as a string
> without the xml tags, just the raw data. I am calling the web service from
[quoted text clipped - 10 lines]
> Thanks,
> J

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.