Web service access from remote web server

Hi,
I have a web application that allows the client to generate news items. If this app sits on http://www.appserver.com/ I can happily create a web service that allows the client to pull content from it. This web service will be sat at http://www.appserver.com/public/services/iNewsExtract.asmx
The C# file sat in AppCode contains the following: 
using System;
using System.Web;
using System.Collections;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;


/// <summary>
/// Summary description for iNewsExtract
/// </summary>

[WebService(Namespace = "http://www.appserver.com/public/services/iNewsExtract")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class iNewsExtract : System.Web.Services.WebService {

public iNewsExtract () {

//Uncomment the following line if using designed components
//InitializeComponent();

}

[WebMethod(CacheDuration=3600,Description="
Returns iNews items")]
public DataTable getNewsItems() {
String thisCustomerID = ConfigurationManager.AppSettings["
customerID"].ToString();
String strSQL = "
SELECT TOP 10 * FROM tbl_inews_item_summary ORDER BY articleID DESC;";
return ControlPanelAccess.execSQL(strSQL, thisCustomerID);
}

}
I'm having problems with the data that is returned from this.
My client app has a web reference defined as iNewsExtractSvc which contains the three files - iNewsExtract.disco, iNewsExtract.discomap and iNewsExtract.wsdl and I reference this in my client code as follows:

 
    protected void Page_Load(object sender, EventArgs e)
{
iNewsExtractSvc.iNewsExtract getItems = new iNewsExtractSvc.iNewsExtract();
}
My question is, what comes next? I've drawn a blank completely.
Naturally I want to define some kind of a repeater to display these news items but I can't seem to take the next step.
Also, is there a problem serialising a DataTable?
The data is returned off my App as a DataTable. Does it need to be in a different format?

Sorry for a being a bit vague but hopefully somebody can give me a nudge.!!


Many thanks
MarkW.
0
mwilcox
5/15/2006 3:46:45 PM
asp.net.xml-web-services 7071 articles. 0 followers. Follow

0 Replies
1018 Views

Similar Articles

[PageSpeed] 7
Get it on Google Play
Get it on Apple App Store

Reply:

Similar Artilces:

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...

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....

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...

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...

Problem with web service only on remote web server
  Hello! I have a web service that I have created. on my computer, the web service works fine. but on the web server (hosting service with asp.net 2.0) I get the following error: Parser Error Message: Could not create type 'Service'.Source Error: Line 1: <%@ WebService Language="C#" CodeBehind="~/App_Code/Service.cs" Class="Service" %> what can be the problem? it works on my computer, so what is the problem with server?  thanks! Dekel C. Did you deployed all your dlls under the bin directory? Did you deploy all your dlls under the bin directory? I gues...

Web Site Project: How to configure web service URL in web.config (web service defined in a referenced DLL)
I have a web site that references a business logic DLL project. In the business logic project, there is a web service defined in its app.config file something like this: <applicationSettings>  <MyNamespace.BLL.Properties.Settings>    <setting name="MyNamespace_BLL_MyServer_ServiceName" serializeAs="String">    <value>http://blah.blah.blah.asmx</value>  </setting>  </MyNamespace.BLL.Properties.Settings></applicationSettings> When the web site is published, the web ...

web web web
Name: bahadir Email: sensiz_olmuyor_t1_at_hotmail.com Product: Firefox 2 Beta 2 Summary: web web web Comments: web sayfası yapmak Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; tr; rv:1.8.1b2) Gecko/20060821 Firefox/2.0b2 ...

Is web services a part of web Service?
  I have a question: Is web services a part of web server?? And when the client calls web service, it means that client calls web server?? Or is it a different entity in itself which communicates separately both with client and server and acts as middleware application.. I am very confused.. Can someone explain me the architecture...??? Thanks..Dont forget to click "Mark as Answer" on the post that helped you.This credits the member,earns you a point & marks your thread as Resolved so that new users will know where to search for their queries. When you build and dep...

what are web services and what are the advantages of web services?
 Hello  i am new to this .net stuff and i was ask on the job interview what a web services is?and if i did not know given that i had a project ( as a project manager,  or a web developer)   what  is it? how do i start a >NET project on it? what are the main advantages is?  HOW DO I START THIS IN THE INTERVIEW>  and what basic books do i buy?   Hi There, There plenty of source on the net about webservice Definiton: http://en.wikipedia.org/wiki/Web_service http://www.codeproject.com/Purgatory/Defining_Web_Services.asp...

Calling a Web Service from a Web Service
Hello,I was looking for some feedback on calling a web service from within a web service. I've heard that it's not good practice (or not possible). I have a scenario where I think it might make some sense.Within our infrastructure, we've created a web service that handles incoming updates on the statuses of all processes. This has proven to be a good thing since it allows applications to communicate across server to make status updates. It's also used by third party developers and applications to communicate with our infrastructure.Along these lines ... we are planning to create a new compon...

What action by a web service requires an app to update their web reference to a Web Service
I create a web reference to a web service in my aspx web application which returns an XML object. If the owner of the web service makes a change to their object am I required to do an update web reference? What if I dont use the information from the new object? thanks Larry You should make the change only if the contract b/w the two has changed (e.g. parameters, return values), etc.-Mathew Nolton Website=www.cybral.com Email=mnolton@cybral.com Blog=weblogs.asp.net/mnolton If the web service now returns a new element and my class reference doesn't match their new class ref...

Remote Access of Web Service enabled web application
Hello evrbdy, I am having webservices reference in my web applcation, when i am running it from localhost it will run fine, but when the same application is deployed on my server(Server is configured with Virtual directory) and try to acces it remotly(from another macine) it shows error.how to configure the web service reference, so that it can be accessible from Server. ThnxBe Different Act Normal... Hi, What kind of error do you get? You can set a web reference dynamic or static this is an option you can see at the properties pane of your webreference. Regards,Dennis v...

"Visual Web Developer Web Server" and Web Services
I like the new "Visual Web Developer Web Server" (Do you want suggestions for a longer name!) but I have an issue with using it to host a Web Service. Whenever the Web Service is recompiled and run it ends up with a different port number. Therefore, it seems that any references to that WS in other applications are invalidated and need to be re-established when it's run again. Is there a way of pinning the port number, or am I missing something? CheersNick Grattan, MSDN Regional Director, Ireland. Software Paths Limited. Hi Nick, the internal server is used for local...

Web resources about - Web service access from remote web server - 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 ...

This Chinese Public Service Ad Brought to You By a Talking Fetus
The environment, especially air pollution, can be a sensitive topic in China. So it's interesting to see a public service message from the state-owned ...

Researchers poke hole in custom crypto protecting Amazon Web Services
... cryptographic software, academic researchers recently uncovered a potentially game-over weakness in a code library protecting Amazon Web Services. ...

Ultimate pirate TV streaming service returns with hundreds of channels and new features
This past May, we were among the first to tell the world about a pirate TV service called cCloud TV . The service made a name for itself by collecting ...

5 Services That'll Keep the Men in Your Life Looking Effortlessly Dapper
Use these services and you'll have the sharpest-looking man in the neighborhood. Whether it's for a business trip or the upcoming holidays, ...

Alphabet is reportedly going to make its subsidiaries pay for Google's services
... to do their own recruiting or build their own technical infrastructure if they feel up to it. But if they want to use the established services ...

Report: Juniper Is Eating Cisco's Lunch In U.S. Service Provider Routing Market
Report: Juniper Is Eating Cisco's Lunch In U.S. Service Provider Routing Market CRN Juniper Networks appears to be on a comeback in the U.S. ...

Global spending on smart health services to grow at CAGR of 60% during 2016-2018, says TrendForce
... propel strong growth in industries related to smart healthcare in 2016. According to TrendForce, worldwide spending on smart healthcare services ...

Frontier To Launch IPTV Service in Durham in January -
... in January, the company has announced. It's notable for the fact that it's the first time that Frontier has offered fixed-line TV services outside ...

CBS' streaming video service comes to Amazon's Fire TV
... a cord-cutting device... at least, if you watch a lot of CBS shows. The TV network has launched an Amazon-native app for its All Access service, ...

Resources last updated: 11/25/2015 9:51:38 AM