473,441 Members | 1,623 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Simple question re. web service

I'm trying to create a web service in C# to populate a drop down in MS
InfoPath with Active Directory users. How do I return what's found (if
possble please provide code)?

Not sure ift's the right group to ask my second question, if not I'll try
the InfoPath group but I'll throw it in anyways. From the InfoPath side,
I've seen a couple different ways to receive the data such as:

http://support.microsoft.com/?id=826994
http://blogs.msdn.com/davfries/archi...29/169043.aspx
or adding a data connection

Any thoughts on the best method to to recevive the data?
=======================================
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Web;
using System.Web.Services;
using System.DirectoryServices;
namespace getUserInfo_June10_Ver1
{
/// <summary>
/// Summary description for Service1.
/// </summary>

[WebService(Namespace="http://www.on.ca")]
public class Service1 : System.Web.Services.WebService
{
public Service1()
{
//CODEGEN: This call is required by the ASP.NET Web Services Designer
InitializeComponent();
}

#region Component Designer generated code

//Required by the Web Services Designer
private IContainer components = null;

/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
}

/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if(disposing && components != null)
{
components.Dispose();
}
base.Dispose(disposing);
}
#endregion

[WebMethod]
public ???? getAdUsers()
{
DirectoryEntry entryAllUsers = new
DirectoryEntry("LDAP://ou=people,ou=peeps,dc=gov,dc=on,dc=ca");
DirectorySearcher dsAllUsers = new DirectorySearcher(entryAllUsers);
string [] strAttrs = new
string[]{"givenName","sn","mail","telephoneNumber"};
dsAllUsers.Filter = "(objectClass=user)";
dsAllUsers.PropertiesToLoad.AddRange(strAttrs);
return "???????";
}
}
}
Nov 17 '05 #1
0 1271

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: mjcsfo | last post by:
I can't seem to find a reference nor any helpful threads on this topic. I've gotten the following error in two circumstances: 1. A complex type has nested within it another complex type, in the...
4
by: Daniel Frey | last post by:
Hello, Maybe you know howto. I want to have an element which takes a subelement. Depending on an attribute within this subelement, a second subelement may have different attributes allowed: ...
17
by: savesdeday | last post by:
In my beginnning computer science class we were asked to translate a simple interest problem. We are expected to write an algorithm that gets values for the starting account balance B, annual...
1
by: Derrick | last post by:
I have the below simple class - public class MyClass { protected string m_stName; protected string m_stCode; protected int m_iId; public MyClass() {}
1
by: Maik Thiele | last post by:
Hey, I have following simple ftpService class with a method download. When I run the class not as a web service it works fine. But when I run the class as a web service the FtpGetFile() method...
9
by: Andrew | last post by:
Hi, I implemented a simple WMI Provider in C#. It is a service which expose 10 instances of a simple WMI Class. The WMI class pnly expose 4 public properties (Value,Min,Max,StdValue) which...
0
by: Kevin Burton | last post by:
Thist is probably very simple for many of you but I am just catching on that a major change has taken place in the way web projects work and I cannot get it to work so please indulge me. First,...
2
by: heddy | last post by:
Howdy folks. I am trying to build a web service using the following configuration: I have Windows 2003 Server running in VMware. I have IIS set up on it. I installed the .NET 2.0 package on...
10
by: Phillip Taylor | last post by:
Hi guys, I'm looking to develop a simple web service in VB.NET but I'm having some trivial issues. In Visual Studio I create a web services project and change the asmx.vb file to this: Imports...
5
by: sayeo87 | last post by:
Hi, I am quite new to JSP so please forgive me if I ask really simple things... I am trying to run system commands on the server and display the output on a webpage. This is what I've got: <%@...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.