How to get a .net web service to return JSON not XML

I have a web service written in .net 1.1 using vb.net that I need to return JSON. How to I get it to return only the values contained in the xml below - without the XML?  Thanks in advance.

<?xml version="1.0" encoding="utf-8" ?> <string xmlns="http://tempuri.org/WebService/ws">{"result":[{"track":{"vid":"6303","kid":"30","dt":"2/13/2006 6:32:46 AM"}}]}</string>

 

 

0
donaldn
2/13/2006 11:38:05 AM
asp.net.xml-web-services 7071 articles. 0 followers. Follow

1 Replies
1634 Views

Similar Articles

[PageSpeed] 2

check this page and you must be very happy!

http://www.kawa.net/works/js/jkl/parsexml-e.html

Let me ask you a question: how to append/combine two JSON objects (assuming their structures are identical)?

var jsonobj1 = {
  items: {
    item: {
      zip_cd: "1000001"
      us_state: "NY",
      us_city: "New York",
      us_dist: "Broadway",
    }
  }
};

var jsonobj2 = {
  items: {
    item: {
      zip_cd: "1000001"
      us_state: "NY",
      us_city: "New York",
      us_dist: "Broadway",
    }
  }
};

how can I efficently combine the two objects together?
 
0
qiuyl
4/19/2006 3:11:49 AM
Reply:

Similar Artilces:

How to call a .net web service from another .net web service?
Hi all,I have developed two asp .net web services using visual studio .net 2003.I wish to call one web service from another web service.I tried adding a web reference of the web service in another web service and was able to do so.but i m not able to access the web methods provided by the web servicecould you please suggest a way to go about itExpecting quick replyThanxCharmy try to make sure that you reference it in the web reference and call it properly this is sample  [WebMethod()] public double CalcDistance(int x1, int y1, int x2, int y2) { Calculator.Service1 calc = new...

xml web service --uploading the file to the xml web service
how can we upload the file in the xml web service 1.i mean what will be the return value in the proxy class 2.and how am i going to send the file to the xml web service----regards Bipul Kumar Here are some links to articles that helped us get this done: http://msdn.microsoft.com/webservices http://www.microsoft.com/downloads/details.aspx?familyid=06255a94-2635-4d29-a90c-28b282993a41&displaylang=en https://www.sys-con.com/dotnet/article.cfm?id=458 Hope this helps....

Can you return .net web controls in a .net page from a web service?
I've got a problem with a project. I've got to compile an entire .net page and return it as part of a Web Service for display. The problem I have is that I need to add WebControls and functionality to the page so that not only the html content and images are displayed (which I've managed) but that textboxes, labels, buttons and datasets can be displayed also. Essentially I need to make a call from one site for a page, populate the page and return it in a state as though it resided on the same server/webspace as the calling page. Code is currently built as follows into a string: strOpenHT...

creatig and returning xml in .net web service
I am new to the .net web service world. Recently I started writing a web service. This web service is going to interact with Java client. Hence I will be returning XML from web service. I am writing web service using vb.net in VS2008. My web service is goign to call a stored procedure. Stored procedure is supposed to retun me some records. Based on these records I have to create XML and return it as web service response. Till now I was able to write web service and stored proc. I am not sure how to build a response xml. Does anybody have any link or any idea on how to do this. I trie...

Web service in .NET from Java Web Service
Hi there,I'm pretty new to .net (although i have years of experience with the old vb 6, access 2k, as well as java)... and need some with perhaps either some syntax or something.Here is the wsdl.<wsdl:definitions targetNamespace="http://www.dynix.com/schema/book">−<wsdl:types>−<schema targetNamespace="GetBookInfoByISBN">−<complexType name="BookInfoType">−<sequence><element maxOccurs="1" minOccurs="0" name="Title" nillable="true" type="xsd:string"/><element maxOccurs=&quo...

.NET web services Vs Java Web Services
Hello, does anyone know of a book or good source of information that compares .NET and Java Web Services? (I would like soemthing neutral if possible). I am thinking of approaching this subject for my dissertation? Many Thanks Rob Hi Rob, Last year I had to give a powepoint presentation on Web Services. I noticed some good books at barnes and noble that discussed the subject. These books were specific to Java and discussed Web Services in a very clear fashion. They gave some elementary examples that were easy to understand. I have not yet had the pleasure of creatin .NET Web Servi...

SQLDataAdapter writes different XML than the XML Web Service returns
I have an XML Web Service written in VB.Net 2.0  I use a SQL data adapter to return read only data from a database. If I use the writexml method of the data adapter it writes an xml file to disk which seems to be formatted perfectly. When I return the XML data from the service with (dataadapter.writexml(dataset)) it appends the anytype element, which is giving me trouble transforming with XSL. Is there a way to return the XML looking the same as what gets written to a file? Or am I not understanding what the anytype node is for or how to deal with it? Thank you for any help Writt...

Asasp.net web service and xml problem
Hi all ,Im using ,net framework 2.0This is the web service I wrote by request of AS developer (Action script) but when he consume the service  he got the result like this .. <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">   <soap:Body>     <GetTransportDetailsResponse xmlns="http://tempuri.org/">       <GetTransportDetailsResult>&lt;TransportMethods&a...

Restful web services in .net that return JSON
I have noticed that there are many sites out there that provide restful apis (Yahoo, Google, etc.). I would like to create my own restful api that can be called from javascript like the big guys do. I have worked with .net and MSSQL before but I can't quite seem to find a really good example that shows me how to do this. I can build the database. I can write the business logic in C#. What I don't know how to do is to expose that functionality as a web service that returns JSON. Can anyone point me to a good example?? My other option is to use rails, but I'm more familiar with the...

any open source of xml .net web services?
any open source available for xml .net web services by using either vb.net or c#? please advise, thanks. I am not sure how to adapt framework. Basically I want to setup xml web services for people who is using colf fusion to connect my app. Also, what about sqlxml? you can host iis as soap calls too? which one is better sqlxml web service? or xml .net web services? please advise too. thanks for the help...

.NET vs Java XML Web Services
Does anyone know out of .NET and Java, which one performs better via XML web services? I think that it would really just depend on where you are wanting to deploy your web service. Since both have the overhead of a framwork behind them I would imagine that any performace gains would be small. If you are deploying in a Windows environment I would go with .NET, but mainly because I just like it better. If you want to deploy in Windows and Linux I would use Java. I am not sure how far Mono has come on the Linux platform and if you do not use C# mono would not help you anyway.It's not a bug, i...

C#.NET Web services: Manipulating XML
Hi, I am developing a web service in C#.Net1.1 and a new bee to .NET. I have developed a web method to retrieve the data from database and I want to sent the response in the form of XML.I want to manipulate the dataset to get the desired XML.But I dont know how to do that? Can somebody help me in formatting the XML. Also, once I will format the XML, what return type I should use in web method to get XML file as output. Thanks in advance. First of all, I'm sure you already knnow that .NET 1.1 is rather old. At any rate, make sure you're using the latest service pack for .NET 1.1...

Consuming .net xml web service in PHP
I have developed .net xml web service. I want a develope php client to access this web service. I dont have much knowledge about PHP. The web service i wrote accepts two string parameters FirstName and LastName, and returns string like Welcome (FisrstName)__(LastName) to web service. The sample php client code i am trying is as below: <?php require_once('nusoap.php'); $parameters = array ("FirstName"=>"Russel", "LastName"=>"Arnold"); // Create a new Soap object $soapclient = new soapclient('http://testwebservice/Servi...

Best Practice for .Net Web Service access to a Web Service on a Test and Production Servers
Hello All, What is the best way to control a .Net web service to be able to access a remote server for testing and then point to another remote server to access the web service in production? Do I need to generate and maintain 2 different proxy objects? TIA, Bob Bob // first create the proxy if not isvalid( i_service) then i_service = create fundtraderproxy_TradeServicesClient_BasicHttpBinding_ITradeServices end if ///You'll see code something like this in the constructor of your proxy //dynamically set the endpoint url with the user supplied value - //r...

Web resources about - How to get a .net web service to return JSON not XML - asp.net.xml-web-services

United States Department of Health and Human Services - Wikipedia, the free encyclopedia
The United States Department of Health and Human Services ( HHS ) is a Cabinet department of the United States government with the goal of protecting ...

Walmart continues to resist Apple Pay, announces its own Walmart Pay service
... mobile application, which the company says has more than 22 million active monthly users. Much like the recently announced Chase Pay service ...

NBC Streaming Service Seeso to Launch in January
Seeso, the comedy-centric streaming service from NBCUniversal, will officially launch Jan. 7. The service will be ad-free, thus will cost you ...

Popular streaming music service Pandora arrives on the Apple TV
Apple Music isnt the only game in town on the new Apple TV. Popular music streaming service Pandora has just arrived on the tvOS App Store. ...

Here’s when Verizon says you'll get 5G wireless service that’s 200 times faster than today
Wireless phones are due for a big speed boost, when new 5G, or fifth generation, wireless service rolls out. When is it coming? According to ...

Thursday: Unemployment Claims, Q3 Quarterly Services, Q3 Flow of Funds
... be released. The consensus is for 270 thousand initial claims, up from 269 thousand the previous week. • At 10:00 AM, the Q3 Quarterly Services ...

Google Play Music Now Offering Six-Person Family Plan, Free YouTube Red Service
After two months of testing a family plan for its streaming music service, Google announced that it would make the six-person program a permanent ...

Apple’s plan to deliver live TV service is ‘on hold’
Apple has reportedly suspended plans to add an Internet-based live television service for Apple TV, maintaining its focus on providing media ...

Park Service Looking for Next Ansel Adams
The Department of the Interior has announced an opportunity to join the likes of iconic landscape photographer Ansel Adams as an official NPS ...

Amazon Gives Prime Members Access to Other Streaming Services -
... recent rumors , Amazon this week announced that it will begin giving its Amazon Prime customers bundled access to streaming video services from ...

Resources last updated: 12/10/2015 11:39:57 AM