VS 2005 - Sending A List To Web Service

Aug 30, 2012

I have an object that contains a list of Email addresses and EmailIDs.

Code:
public class DataObjects
{
public class UserEmails
{
private string _Email;
public string Email

[Code] ....

And I populate it like this:

Code:
protected void GetEmails()
{
DataAccess da = new DataAccess(); //this is a separate Data Access class with loads of methods to access the database
List<DataObjects.UserEmails> myUserEmailsList = new List<DataObjects.UserEmails>(); //create a list of UserEmails objects
myUserEmailsList = da.getUserEmails(1); //this passes in a UserID to the data access function that returns me a list of emails for this user
myPassedList(myUserEmailsList); //I pass the list to another function just to prove the data is there and can be retrieved.
}

The last line in GetEmails passes the list to myPassedList

Code:
protected void myPassedList(IList EmailsList)
{
foreach (DataObjects.UserEmails myUserEmails in EmailsList) //loop through the list to prove it is populated etc.
{
int EmailID = myUserEmails.EmailID;
string Email = myUserEmails.Email;
}
}

Everything above works fine. Here's the question. When I am at the point where I have populated the List of UserEmails - I need to pass it to a web service for someone else to access the data.

I pass my list to a function and I can loop through it by writing:

foreach (DataObjects.UserEmails myUserEmails in EmailsList)

which is fine, for me, because my application knows what DataObjects.UserEmails means ... the people receiving the list won't. They are just getting a list.

Can they loop through the list I pass them without knowing the structure of the object in the list and just extract the data?

View 1 Replies


Similar Messages:

SMS Sending Service?

Mar 8, 2010

I want to develop a website which provides the facility of sending free sms to any mobile. the technology which i want to use is asp.net with c#.How should i move further?

View 1 Replies

C# - Why Does Silverlight Reference To Wcf Service Blow Up When Add Method To The Wcf Service That Returns Generic List

Aug 17, 2010

I have built a WCF Service that is being consumed by a Silverlight app. At first I created one method that was very simple:

public String SfTest()
{
return "SF Test";
}

No poblem. My silverlight app references my service and displays "SF Test" in a textbox. Now I add a method to my wcf service like this:

public List<String> GetTest()
{
List<String> list = new List<string>();
String a = "a";
list.Add(a);
String b = "b";
list.Add(b);
return list;
}

I update the reference to the service in my Silverlight app and the using statement in my xaml cs page throws an error like the service doesn't even exist although it is there. I am assuming the problem has to do with datatypes or serialization or something like that but it is driving me up the wall. Why can't I consume a simple generic list in my Silverlight app through the WCF service.

View 1 Replies

C# - Sending A TXT File Via Web Service?

Dec 28, 2010

I want to have a web service which creates CSV data and writes it to a plain txt file on the client side. I was thinking of something like a GetData() method which returns a StringBuilder which contains the file content. The client of the service writes that into a file on the clients machine. Everything transfered needs to be secured, the web service runs together with a web app which is hosted on a https server...is calling the service secured then, too?

View 2 Replies

Can't Get WCF Service's Operations List With Web Service Studio Client

Jan 21, 2011

I've created a simple WCF service hosted by ASP.NET web site:

[Code]....

I can add references to this service as to WCF service, as to WebService.WcfTestClient application successfully recognized service and its methods.

But "Web Service Studio" [URL] can't get a list of operations... Why? How to diagnose/resolve that?

P.S. I work under VS 2008 using .NET 3.5

View 2 Replies

WCF / ASMX :: Service For Sending Emails?

Mar 15, 2011

i am developing a project wich sends massive amounts of emails. Lets say 200-300 emails per query. And each user can conduct multiple search querys. So at times it gets relly great number of emails to send.So this is what i need:1. a webservice with a fireAndForget type method, that i can pass in single or multiple email messages

View 1 Replies

Sending Form Data To Web Service

Oct 13, 2010

i have some web service in outsource server (not on the form server) and i need to send to this web service few text boxes fill by the user (text only - no files) i need to send the data + the number 1 + some guid string (that not changing - the same guid always) is anyone have an idea how im doing that? ( all the data need to be sending to asmx file.

View 5 Replies

WCF / ASMX :: Web Service For Sending Email?

Oct 14, 2010

I have different web applications and I want to ask if it's advisable to create a web service to send emails through it so all my web applications will go there instead of having the Mail class or code in every web application...

View 1 Replies

Sending And Receiving Data Through SOAP Web Service In .Net?

Jan 20, 2010

I am working on a client - server application and in which I used to send and receive data through SOAP web service.

Now after sometimes I have heard from someone that I might lost some data while this process on soap service created in ASP.net. So now I have decided to send and receive data through batches like first I will send List of 50 objects and then next 50 and so on...

Now I am new to web services and all.

So my question is "Is it true that we can lost some data sometimes while transferring it through SOAP web service?"

View 6 Replies

C# - Validating Call To Web Service Against Schema Before Sending Request?

Apr 21, 2010

I am calling a web service (written in Java) in my web app. I use the WSDL to generate proxy classes using the wsdl.exe command line tool.

Everything is working fine.

However, I have found out that the web service is not doing any data validation at all when they receive a request from my app. Hence, if I happen to send one minute piece of data that isn't exactly what they want, I receive a general fault error in return, with no specifics at all of what the incorrect (if any) piece of data is.

So, before I make the request, I'd like to validate my request against the schema they have provided. Is this possible, and if so, how do I go about this?

View 1 Replies

Web Forms :: Sending Scheduled EMail From Web Application As External Service?

Dec 27, 2010

As indicated in the Subject, I have a web application (say APP) that should feature an e-Mail Notification Service (ENS). Activation of the Service is controlled by a Button in a dedicated page where some parameters are also included to set running Period (FromTime - ToTime), Interval, Recipients, etc.

When said button is clicked, it should maintain those parameters into database then launch ENS. Since ENS is expected to run for good according to set parameters, it logically should run as an external application/service, independent from APP.

When ENS starts, it needs to consult database to fetch parameters, then schedules its Timer to periodically check database for some transactions that when found, should trigger ENS to dispatch e-Mails to concerned Recipient(s).

CHALLENGES:

1. Launch ENS as an external application on button click from APP.Achieved by using System.Diagnostics.Process class. However, I encountered a problem in verifying if the process is already running before starting it. The root of the problem lies in
ProcessName property. Since ALL web applications must be launched via IE, hence, have
iexplore as their ProcessName, which is also applicable to all processes started through IE, it is very likely to have multiple processes utilising IE. How to check which is which? I couldn't figure out that.

Eventually, I ended up with a workaround: when the Process is started from APP, capture its ID and save it to database, then use this ID with GetProcessById() method for later verification. When the Process is terminated, reset stored ID in database.

2. What sort of application should ENS be: Windows Application or Web Application?

In either way however, ENS will always run invisible in the background being a Process. If this is the case, how about creating it as a Windows Service instead?

I did a lot of reading but still confused. However, the choice is limited now to either Web Application or Windows Service. Which one is more convenient to the task in hand?

3. What Timer to use?

I tried System.Timers.Timer in a test web application but it didn't fire! Then I used ASP AJAX Timer and it worked pretty well (I still need though to try running it from APP to judge its functionality). I came across some recommendations to use System.Threading.Timer but haven't tested that yet. Would it worth the trial?

4. ENS as a Windows Service.

If I create ENS as a Windows Service, would I be able to communicate with database? How would this influence the Timer to use?

View 4 Replies

Sending Individual Emails To List In Db?

May 26, 2010

We were just asked to create something that would query a db and send an individual email to each email returned in the query.

how to do this.. and its not alot of emails.. probably about 50 to 100 but each email will be customized to each receipient as they are our vendors.

View 4 Replies

Debug Web Service 2008 From 2005?

Sep 1, 2010

I have two applicaitons. One is web service written in VS2008 and the other one is Windows CE 5.0 application written in VS2005.

This CE application will use web service to talk to the database. After I build and compile the web service successfully, I publish one copy to my localhost and this CE application point to my localhost and consume the web service.

I'm finding a way to debug the web service. I want to step into web service every time CE application make a connection with web service (like we put a breakpoint in windows application go step by step)

However, When I run the web service, it starts with some virtual port. And so my Ce application call didn't come to this running Web service (run by VS2008).

View 2 Replies

VS 2005 - Retrieving XML Document From A Service

Feb 9, 2013

I am trying to create a simple web service that returns xml that is being called from SQL server. If I return a simple string like "Test", it returns it. Whe I change that to return an xmlelement and then create an xml document inside the function and then try to return the xmldocument output. document element it returns Null even though the object is not null.

View 1 Replies

Visual Studio 2005 - Sending An Email To User Input Email?

Feb 23, 2011

i have an aspx page, that takes in user data (name, number & email) after that information gets submitted to me, I need to send an email to their input email, with a message of confirmation.

View 1 Replies

Web Forms :: Sending Mail To Multiple List Items?

Dec 20, 2010

I've done a thousand searches today and am at a total dead end. I am creating a mailing list where users can add their Email address, and Admin can delete addresses and send Email. I am using streamreader to edit the text file and was hoping that I could simply send specify the Bcc recipients by either referencing the list items or the content of the text file. I cannot get it to work either way, nor can I actually get the form to send an Email to multiple addresses by manually editing the code. I tried commas, colons, triangular brackets... the best I can get is the last Email address included being sent the Email, all addresses before do not receive an Email?!?

I know you can create multiple instances of Email.Bcc.Add and include every Email address uniquely, but I have no idea how I'd go about adding anything that creates a new string for every Email address in the text file. Also - I plan on using the standard 'to' field as the site's own Email address - part confirmation that the Email has sent.

[Code]....

View 8 Replies

VS 2005 Network Service Account And Access Denied Exception

Mar 10, 2010

First, I felt I had a clear understanding of how the Network Service account work. It is the default account ASP.Net runs under and has very limited access. I have verified in the Application Pool that ASP.Net is running under the Network Service Account. I have a UNC file share that is located on another server, let us say "\myservermyfiles". I have logged on to "MyServer" and right-clicked on the shared folder "myfiles" and just for the sake of testing, went to the Shared Tab->Permissions and added the Network Service account and gave it "change and read" access. I then went to the Security Tab, added the Network Service account and gave it all permissions. For some reason, I am still getting an "access denied" exception. I know impersonation is an option at some point, but I would really like to know why my ASP.Net application cannot copy a file to this share just for my own personal understanding given the fact that I gave the Network Service account the proper access. Like always, I will continue to research.

IIS 6
ASP.Net 2.0

View 24 Replies

SQL Server :: Trying To Install Express 2005 On Windows XP Service Pack 2?

Sep 8, 2010

This may seem simple but for some reason I am having a problem.

I am trying to install SQL Server Express 2005 on Windows XP Service Pack 2 which has not been online for a while.

Everytime I've tried it has told me that it doesn't meet the minimum requirements. I am not sure if its because I am sick and dazed out.

View 1 Replies

Data Controls :: OLEDB Provider List Is Empty In VS 2005

Aug 8, 2013

I am in a middle of an windows application  in C#, i have used sql server as database. Now the issue is that i am using a crystal report from VS 2005, when i am working with  databse expert. The OLEDB Provider list is empty.

View 1 Replies

Declaring List In Web Service?

Jan 9, 2010

Why is it that I cannot declare List in my web service using asp.net just like what I got on a certain site.

Code:

List<string> responses = new List<string>();

View 1 Replies

WCF / ASMX :: Returning List From Wcf Service?

Sep 19, 2010

How is it possible to return some kind of list from a wcf serivce, this the method in my wcf service
my interface:

[Code]....

and this how my GetRootLocations looks like, It returns IQueryable, I wounder if I can maybee return Iqueryable from my svc-service?

[Code]....

View 5 Replies

List All Countries In Dropdownlist Where To Get That Web Service?

Feb 9, 2010

I want to list all the countries in my dropdown list. where can i get all the names? from service right? How to do this?

View 4 Replies

WCF Service Return And Array Instead Of A List <T>?

Mar 26, 2010

In the web servce I say

public List<Customer> GetCustomers()
{
PR1Entities dc = new PR1Entities();
var q = (from x in dc.Customers
select x).ToList();
return q;
}
(customer is a entity object)

Then I generate the proxy when I add the service.. and in the reference.cd it say

public wcf1.ServiceReference1.Customer[] GetCustomers() {
return base.Channel.GetCustomers();
}

WHY IS IT AN ARRAY? I asked for a List.

View 4 Replies

SQL Reporting :: Username And Password Of Http://localhost/Reports To Access SQL SERVER 2005 Reporting Service?

Feb 8, 2010

what would be the user name and password of http://localhost/Reports to access SERVER 2005 Reporting service

View 7 Replies

WCF / ASMX :: Returning List From A Web Method In A Web Service?

Mar 25, 2010

I'm using a web service and I want to return a list to my client. I am nearly newby at web services and I can't return a List<String> object to my client. But when i call the method it says "Unable to cast object of type 'System.Collections.Generic.List`1[System.String]' to type 'System.String[]'" What should I do?

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved