.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

List of Objects in Declarative Service

Posted By:      Posted Date: September 02, 2010    Points: 0   Category :Windows Application
I am trying to create a WCF workflow service that accepts requests from a user to add a new user.  I want to add this "user to be approved" to a list of users List<PendingUsers> and wait until an approver approves one. Then the workflow will remove the approved user from the list and add it to the database. Requirements: 1. Pending users should not be added to the database, they should be maintained in a variable until approved. 2. The second ReceiveAndSendReply will return the list of all pending users.   I have created a service with a flowchart that has a flowchart variable that is the list of pending users. The problem is after each call it is lost. I am assuming the workflow is unloading. Is there another approach I can take or some way to keep the List of Users from unloading between calls.

View Complete Post

More Related Resource Links

Update SharePoint List item using UpdateListItem web service with javascript

I'm using the Custom_AddListMenuItems function in a CEWP to add a menu item to each list item to Archive that item. This is achieved by updating a choice field in the item to 'Archived'. I'm trying to do this using the web service UpdateListItem web service to update the item using Javascript, but I can not find the correct code that updates the list item. I'm using this code:     var ctx=currentCtx;     var ciid=currentItemID;     var xmlHttp=null;     if (confirm("Are you sure you want to Archive this item?"))     {         var soapRequest = '<?xml version="1.0" encoding="utf-8"?>'+             '<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">'+             '    <soap:Body>'+             '        <UpdateListItems xmlns="http://schemas.microsoft.com/sharepoint/soap/">'+         

Error calling WCF service that is returning list.".Debugging resource strings are unavailable ......

Ok.this is just making me frustrated... Here is step by step of what I am trying to do (& not able to) 1. I am calling WCF service hosted in a SharePoint 2010 site from a silverlight app in same domain (So no cross doman I guess). 2. I use Linq to Sharepoint for querying the DB. 3. I am having a list "machines" in Sharepoint 2010 that is having a lookup column from Other list called "part" 4. My WCF method GetAllMachines() works perfectly well when it skips the lookup column "partname" & returns List of type machineitem. 5. But problem occurs when I add machineitemobject.parts.partsname in my Linq to Sharepoint query . My service gives the error not found Async_ExceptionOccurred] Arguments: Debugging resource strings are unavailable." 6. Note that return type of my Method is List<machinesitem> 7. The point to note here is that I use SPMETAL tool to generate the LINQ class that maps the lists . So When I try to query the lookup column it tries to add List item of the type class & that is what causing the error. Is it because I am not using datacontract in my service (but it returns the strings & all private members of machines list e.g. name,title etc) Is it making the attribute Serialisable will solve the error ??? I am kind of lost in it ...Plss help!!   Thanks

How to query for id's of the fields with List Data Retrival Services Query() web service

Since i marked a post as answer in my previous topic, it seems that people dont visit the topic anymore as they see it as "answered" while it actually is only partially answered. So i guess i have to ask again in a different topic.    I need to get data from Sharepoint Server (3.0 i belive) for my Integration Services project. For that i use Sharepoint's webservices. I've read tutorials and downloaded sample programs to talk to WSS web services. I realise i have two ways to get items in a list: Use Query() or GetListItems(). Problem is, GetListItems() has a mandatory "Row limit" field and i might have to import ALOT of fields, so i thought Query() is better for me.  But, when using GetListItems(), the WSS returns the ID of the fields (for example, for a field of type user, something like "395;Ivanov Ivan Ivanovich" is returned) but when using Query() for the same list, WSS returns only the field value ("Ivanov Ivan Ivanovich") without the ID. I need it to return the ID as well. How can i set it up, on my side or server side, so i would receive the ID's, not only the values of the fields that are actually linking to something by ID when i use Query() web service?     

Cannot delete rows in a list via Lists web service's UpdateListItems-function, even though I am abl

Hi all, I'm trying to delete some rows in a SharePoint 2010 Foundation list via Lists.asmx -web service's UpdateListItems. The web service is called from BizTalk. I am able to create rows, but for some reason delete fails. I also use "GetListItems"-function without problems. The exception I get is Microsoft.SharePoint.SoapServer.SoapServerException. The message is "Cannot access a closed Stream." The updates-element of the UpdateListItems-function is as follows (well, a part of it, the real one has more Method-elements, but you get the gist..): <Batch OnError="Continue" ListVersion="1"> <Method ID="1" Cmd="Delete"> <Field name="ID">1900</Field> <Field name="IMEI">GFA-687</Field> </Method> <Method ID="2" Cmd="Delete"> <Field name="ID">1901</Field> <Field name="IMEI">OVG-567</Field> </Method> <Method ID="3" Cmd="Delete"> <Field name="ID">1902</Field> <Field name="IMEI">OXI-570</Field> </Method> </Batch> I've also tried that Batch without the IMEI-information, as well as with a valid ViewName. Why cannot I delete when I can clearly modify/create rows - what's up with th

How to use SharePoint 2007 list data in Reporting Service (Visual Studio) 2008?

Jeez - I have been googling left and right, and tried all the suggestions. No luck in getting it to work. I am using Reporting Service 2008 tools in my VS2008, trying to create a simple report using SharePoint 2007 data (from a simple list). Here is what I've been doing: Created a simple SharePoint list in a test site - only one column (Title) with one record of data. Started Visual Studio 2008 and created a new Report Server Project Wizard project. I named the data source "dsTest". Type: "XML". As connection string I used: http://site/subsite/subsite/_vti_bin/lists.asmx. Credentials: "Use Windows Authentication (Integrated Security)". Clicked Next and arrived at the "Design the Query" form. I entered this in the Query string box: <Query> <Method Namespace="http://schemas.microsoft.com/sharepoint/soap/" Name="GetListItems" /> <SoapAction>http://schemas.microsoft.com/sharepoint/soap/GetListItems</SoapAction> </Query> Clicking Next I get this error: An error occurred while the query design method was being saved. Failed to execute web request for the specified URL. Soap Fault: Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown. Now if I view the Details when trying it inside the Query Builder I get this: <errorstring xmlns="http://schemas.mi

sorting a list by properties of its objects

I have a list that contains several instances of a custom class and I want to sort it by properties of the custom class it containseg  heres the classpublic class Theclass { public long ID { get; set; } public DateTime Date { get; set; } public int Sequence { get; set; } }List<TheClass> lst = new List<TheClass>();lst.add(instance1 of 'TheClass')lst.add(instance2 of 'TheClass')etc, etcso I could end up with a lst object containing many instances of 'TheClass'how could I subseqently sort this list by sequence within IDor by Date within ID

How to pass param type List<> to WCF service?

 I have a WCF Method likes this:public bool SaveStudents(List<Student> students) { //save to the database; return true; }[DataContract]public class Student{[DataMember]public string Name{get;set;}public string Major {get;set;}} At html page, i have a form allows create one more than a student at a time and save all student to database.I using jquery ajax call.Now, I don't how to pass data (in json format) so that SaveStudents can parse and understand json object from client and parse it to List<Student>Please help me!!!

WCF Routing service with Backup List not working with MSMQ

Hi I developed routing service for round robin routing. I added backup lists to this routing service in round robin pattern in config file. My configuration is as below. <services>       <service behaviorConfiguration="routingConfiguration" name="System.ServiceModel.Routing.RoutingService">         <host>           <baseAddresses>             <add baseAddress="net.tcp://localhost/FDPRoutingService/router"/>           </baseAddresses>         </host>         <!--Set up the inbound endpoints for the Routing Service-->         <!--first create the general router endpoint-->         <endpoint address="" binding="netTcpBinding"                   name="NetTcpBinding_IFDService" contract="System.ServiceModel.Routing.ISimplexDatagramRouter"/>       </service>     </services>  &nbs

SharePoint 2007 - Survey list - Getting user's Windows account ID from a web service using display

Surveys...grrrr.   I am developing a .NET console application that accesses survey data from a single survey list using the MOSS web service "Lists".   I am able to enumerate the survey list and get to the items except for the author of the survey response.  When I get to the column ows_Author, it appears to be a lookup value formatted like this:  "1066;#JOHN DOE".   How can I, using web services alone, lookup the corresponding Windows login ID of that user?  If I go to the survey in SharePoint and click on the name in the view, it takes me to a site-based user profile page that does show the account ID I want.  The page that displays appears to be a virtualized page like this "_layouts/userdisp.aspx?ID=1066".   What I really need is JOHN DOE's account ID like "domain\id". Can I get to this with the data I have available? Thanks

the list cannot be imported because a windows sharepoint service-compatible spreadsheet application

I have googled this for 3 days now, without any solution. I have install, reinstall services and ms office, save as web the excel file for import, without any results, have anyone encounter this error. I need help.

Update custom list of sharepoint using web service

I need update an colunm of list sharepoint using web services. The code used is: private void button1_Click(object sender, EventArgs e)         {             try             {                   WSLists.Lists listService = new Lists();                 listService.Credentials = new System.Net.NetworkCredential("Usuario1", "Password", "Dominio");                 System.Xml.XmlDocument doc = new System.Xml.XmlDocument();                 System.Xml.XmlNode ndListView = listService.GetListAndView("LIST_Test ", "");                 string strListID = ndListView.ChildNodes[0].Attributes["Name"].Value;                 string strViewID = ndListView.ChildNodes[1].Attributes["Name"].Value;         

Passing List to WCF Service

Hi, All, I'm not sure this has been covered before.  I did search, but not sure that any of those responses apply: I'm relatively new to WCF. I have the following classes:  PostAddress, EmailAddress, PhoneNumber, ContactInformation and, Person.  The ContactInformation contains each a List<PostAddress>, List<EmailAddress>, List<PhoneNumber> property.  The Person class has a ContactInformation property. When I pass my Person object to my WCF service, my ContactInformation Lists values are null.  For example: I create an address with: street, city, state, zip, country and add it to my List<PostAddress> I add the list to the Person's ContactInformation's List<PostAddress> Property I pass it to the WCF Service.  At that time, I have this: Person.ContactInformation.Addresses.Count = [the number of addresses in the list] Person.ContactInformation.Addresses[index].property = null My service inferface looks like this (I haven't fully sketched it all out yet): [   ServiceContract]     public interface IMyService { [   OperationContract]     bool FoundDuplicate( Person p ); [   OperationContract]     void SubmitNewMembership( Person p, Membership m ); } I'm using Visual Studio Ultimate 2010/.NET 4 on Windows 7 Professional Edition if that

Problem when ajax enabled WCF Service returns EDM Objects

Hi there, Could you please help me with the following problem? - I have ajax enabled WCF service. It returns Customer Entity Type.  For example: [OperationContract]             public List<Customer> GetCustomers()        {            using (NorthwindEntities context = new NorthwindEntities())            {                return context.Customers.Take(10).ToList();            }        }  - But AJAX Client Library cannot display Customer( as Entity). I cannot see data in browser. Even it hits the breakpoint and returns 10 customers. - But if I make a plain class called "Customer2" with same fields and copy all the "Customer" into "Customer2" then it works. In this case I return List<Customer2>. Then it works like a champ and I can see customer in AJAX/DataView/List. - Why I need to create a class? Is this JSON problem? DataView accepts JSON data format. - I use VS2010, AJAX 4.0. - Do I need to add something else along with [OperationContract].   Regards, Rajan  

Need advice on preformance (web service returns list items on 20000 rows list)

Greetings I need to write a web service that will return sharepoint list items (default web services of sharepoint are no use to me since they just suck when the site is not in english).  Since we have lists with 20k+ items, the return xml might get large. Query web service did manage to do it, yet it took some time to output the xml with those 20k rows.  I am affraid that my custom made web service will preform poorly since it wont be "native" to sharepoint. I am asking for your judgement, did i fell into common pitfalls or something or is there any way to improve preformance of my code? My own web service code looks like this:   [WebMethod] public XmlDocument GetListItems(string siteurl, string listguid,string querytext,string rowlimit) { InitSchemaExporter(siteurl); SPQuery query = new SPQuery(); query.RowLimit = rowlimit.Length==0?10:Convert.ToUInt32(rowlimit); query.Query=querytext; return SchemaExporter.GetListItems(listguid, query); } public void InitSchemaExporter(string siteurl) { SchemaExporter.SetSite(siteurl); SchemaExporter.IgnoreField = ConfigurationSettings.AppSettings["IgnoreField"].Split(new string[1] { "\r\n" }, System.StringSplitOptions.None).ToList<string>(); ; SchemaExporter.IgnoreList = ConfigurationSettings.AppSettings["IgnoreList"].Split(new string[

Item Not inserted into sharepoint list via web service.

Hi all, I am developing a silverlight application. In that application I want to insert data into sharepoint list using Lists.asmx web service. I am retrieving data from grid view and storing data into sharepoint list using method  UpdateListItemsAsync(). But some time all the data from all the eight grid view rows get inserted properly, whereas some time only for rows get inserted, sometime only three. I am not understadding this asynchronous behaviour. Can anyone explain what I have to do to insert all eight rows every time. Thanks,   -Kaustubh

wcf returning a list from wcf service - I have lots of locations and I want to return the locations


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

    [WebInvoke(Method = "GET",
        ResponseFormat = WebMessageFormat.Json,
        BodyStyle = WebMessageBodyStyle.Wrapped,
        UriTemplate = "Locations")]
    IList<Location> GetLocations();

 public IList<Location> GetLocations()
        Pazar.Data.Repositories.LocationRepository locRepository = new Pazar.Data.Repositories.LocationRepository();
        return locRepository.GetRootLocations().ToList<Location>();

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

public IQueryable<Location> GetRootLocations()
        IQueryable<Location> locations = GetAll().Where(p => !p.ID_Parent.HasValue).OrderBy(p => p.Sequence);
        return locations;

WebControl - Declarative List


I would like to create the following control to do the following:

<asp:SomeControl id="someCustomWebControl" runat="server">
      <add key="Data1" Value="Test String" />
      <add key="Data2" Value="Another Test String"/>
      <add key="Data3" Value="Another String" />


The code I have so far is:

[ParseChildren(true, "Data")]
    public class CustomWebControl: WebControl
        public NameValueCollection Data
        public CustomWebControl()
            this.Variables= new NameValueCollection();

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend