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

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

Using SendAndReceiveReply Activity

Posted By:      Posted Date: May 22, 2011    Points: 0   Category :JQuery

Hey Guys,

Is this possbile to use SendAndReceiveReply activity if we are only given Uri and Action name with required parameters?

Or in another words is it possible to use SvcUtil for generating Client code with contract and compile it and use it at run time?

My requirement is that User will design a workflow, he is only aware of webservice/WCF uri and action name which will return him a response (may be a simple type or a complex type). So then can I design a workflow to use that uri, call service and return him response?





Software Engineer

View Complete Post

More Related Resource Links

SendAndReceiveReply Activity's Response is Encoded


Hey Guys,

When I am calling a service from my Workflow's activity SendAndReceiveReply then response is coming in encoded form. See below


POST /SimpleService/Service1.svc HTTP/1.1
Content-Type: text/xml; charset=utf-8
VsDebuggerCausalityData: uIDPo7uM8LKhpuVKvVOaNvNdHBwAAAAAkhnq3uHnrk2NaMJxups1cUWgrhRM7rRKgoA37jPcmpAACQAA
SOAPAction: "http://tempuri.org/IService1/GetData"
Host: localhost:8081
Content-Length: 159
Expect: 100-continue
Accept-Encoding: gzip, deflate
Connection: Keep-Alive

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><GetData xmlns="http://tempuri.org/"><value>500</value></GetData></s:Body></s:Envelope>


HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Encoding: gzip
Vary: Accept-Encoding
Server: Microsoft-IIS/7.5
X-Powered-By: ASP.NET
Date: Wed, 18 May 2011 16:18:52 GMT
Content-Length: 238


same thing works fine from a ASP.NE

A Simple XML-driven Tool: Monitor Your Web Site's Activity with COM and Active Scripting


This article describes a simple Web site monitoring tool built with XML, JScript, Windows Script Host, and COM objects. Although it is not intended to replace complete Web site monitoring software products, it has many useful features that help to keep Web servers up and running. An XML configuration file specifies which Web sites to monitor and the actions to be taken if the site isn't functioning properly. In addition, the tool can be scheduled to run at any specified interval using the Windows Task Scheduler. Functions that probe the sites, log events, and send e-mail notifications are written in JScript.

Panos Kougiouris

MSDN Magazine July 2000

System.NullReferenceException: At Createtask Activity



I created  Approval Workflow application(.net3.0), it has successfully deployed at sharepoint server, but when executing  workflow at createTask activity, the following errror has occured.

System.NullReferenceException: Object reference not set to an instance of an object.     at BasicApprovalWorkflow.Workflow2.createApprovalTask_MethodInvoking(Object sender, EventArgs e)

below is the code :



void createApprovalTask_MethodInvoking(object sender, EventArgs e)



How to Cancel a Workflow Activity - LogToHistoryListActivity


How can I cancel a LogToHistoryListActivity? I don't understand how to get access to the ActivityExecutionContext. I guess one way is to add an IfElse before entry to avoid the activity completely. Casting the sender object does not work. Help anyone?

  private void logToHistoryListActivity_WorkflowActivated_MethodInvoking(object sender, EventArgs e)
   LogToHistoryListActivity log = (LogToHistoryListActivity)sender;
   string msg = string.Format("Work Request has been SAVED by {0}. Awaiting submittal.", workflowProperties.Originator);
   WFHelper.LogMessageToHistoryList(log, msg, null);

C# - Creating web client for automating user activity on a HTTPS site

I've been wracking my brain for a couple of weeks on this.  I need to create a web client (I don't want to use the webBrowser control because I need this to be as lightweight as possible) to log in to a secure web site, and then effectively click links and fill in fields to get the data that would normally be displayed in the web browser.  I'm then going to parse the data and perform other actions with it. I have been working with HttpWebRequest and HttpWebResponse and many permutations of suggestions I have found while Googling my issue, but I can't get rid of my problem:  Sometimes when I effictively click the ultimate link that I need to click to get to my data, I get what I am looking for.  However, MOST of the timel, I get a response page that tells me my connection timed out and that I need to log in again.  I have tried messing with cookies and such, but to no avail. I know it's good form to post my code, but it is so sloppy and screwed up right now from tweaking this and trying that, that I'd rather not take the approach of fixing what's there, rather I'd like to start with solid, clean code to begin with. Your help will be greatly appreciated. Thanks, ALo

SQL Server 2008 - Job Activity Monitor Failing

I recently began migrating to Windows 2008. One of the first servers is a server which we install our tools on. This is a new server which currently is only running the SQL Server management tools. On this server I installed the SQL Server 2008 R2 management tools, prior to this install there were no other SQL Server tools installed on this server. The majority of the functionality works and I can connect and manage multiple databases servers from SQL Server version 2000 through 2008. But when I try to bring up the Job Activity monitor I get an error ==> Can not show requested dialog. From Windows XP Windows Server 2003 SP2 this functionality works. I get this error if I connect to a SQL Server 2005 or 2008 database instance. I have tried re-installing the client tools but I still get this error..... any ideas?

Is all this activity wasted

I support a third party application that is absolutely terrible.  Most of the bad I understand, but my SQL Profiler comes back with these types of entries RPC:Starting declare @p1 int set @p1=-1 exec sp_prepare @p1 output,NULL,N'SELECT * FROM Payments',1 select @p1 SP:Statement complete SELECT * FROM Payments RPC:complete declare @p1 int set @p1=-1 exec sp_prepare @p1 output,NULL,N'SELECT * FROM Payments',1 select @p1 Even when their is an SP_sqlexecute, they don't pass the plan handle and the SQL is more select * from payments where customer = 111 What are they trying to do   Thanks for any replies   mark      

Properties of a child activity are null when the activity executes

I have an activity library containing several activites; one of my activities, let's call it MainActivity, contains another one, InnerActivity. A code block in MainActivity sets some properties of InnerActivity, but then when InnerActivity is executed, these properties are null. Some of these properties being set are dependency properties, other are "plain" properties. I had done the same thing in another activity and had got no problems at all. Any hints why this is happening? Thanks, PaoloPaolo Tedesco - http://cern.ch/idm

TFS 2010:Testing Workflow 4.0 activity

Hi EveryOne, Is there any way to test the workflow activity with out queing the new build?Usually while working with TFS2008, we ll test the particular class  through console application by passing parameters. In TFS 2010 ,i need to test the workflow ?is there any way some thing like creating an object for workflow and calling through console application? Please  suggest me. Thanks & Regards, eswar reddy 

Should I Use an Extenal Activity

I have a windows services hosted 3.5 Workflow. It mostly wakes up periodically makes a call to a secure service and retreives NOTAMS for the period it was sleeping. This works fine. Now I need to alter this by adding a new branch, If it is a certain time of day I need to retreive a list of NOTAMS and check to see if My process has gotten everything I'm supposed to have. I then take the result set of missing Notams and iteratively call the sercure service to retreive the missing NOTAMS one at a time. This is where my process breaks as I am unable to serialize the Certificate that the secure service requires as part of the https request object. Would this be a target for an external Data exchange? Thanks

Creating a Validator class for a custom activity

I created a new Workflow Activity Library and then added a new Activity called BindForm2Activity. After that I added a new class called BindForm2Validator and then placed an attribute to the BindForm2Activity to link it to the validator class.   Here is the code for each of the classes:   BindForm2Activity.xoml.cs: Code Snippet   using System;using System.ComponentModel;using System.ComponentModel.Design;using System.Collections;using System.Drawing;using System.Linq;using System.Workflow.ComponentModel.Compiler;using System.Workflow.ComponentModel.Serialization;using System.Workflow.ComponentModel;using System.Workflow.ComponentModel.Design;using System.Workflow.Runtime;using System.Workflow.Activities;using System.Workflow.Activities.Rules; using FormsCollection;using Utils; namespace ActivityLibrary{    [ActivityValidator(typeof(BindForm2Validator))] public partial class BindForm2Activity : SequenceActivity {        public static DependencyProperty FormToBindProperty = System.Workflow.ComponentModel.DependencyProperty.Register("FormToBind", typeof(FormsCollection.Form2), typeof(BindForm2Activity));         [Description("Form to bind a datasource to it ")]        [Category("BindForm2ToDataSource")]        [Browsable(true)]        [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]        public FormsCollection.Form2 Form

Sequential Workflow project unable to compile referencing x64 Workflow Activity Library

Folks -   I have an sequential workflow project targeting x64 that will not compile if the workflow activity library that it references is compiled for x64 (it will compile if the activity library targets x86).  The compile error I receive is: Compilation failed. Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information. [project name]   Any thoughts on how to figure this out?   Thanks.

How to get this.Parent in execute method of activity.

Hi, Inside execute "protected override void Execute" of the NativeActivity i want to get its parent.    protected override void Execute     (     NativeActivityContext context     )       { this.Parent Actually my problem is that i want to check if this activity is in sequence or parallel during execution. Please help me.    ilogik

Can anyone please tell me how to Change DisplayName of the activity

Can anyone please tell me how to Change DisplayName of the activity. For example my activity name is MyActivity when i drop it to designer its ok its name appear as MyActivity, but when i drop it second time in that work flow its DisplayName should be MyActivity1. Similary third and fourth instance should be named as MyActivity2 and MyActivity3.ilogik

Freeform Custom Activity Designers using ICompositeView

Hello,   I'm using code posted here http://blogs.msdn.com/b/tilovell/archive/2009/12/31/freeform-custom-activity-designers-using-icompositeview.aspx hosted in a designer taken from Windows Communication Foundation (WCF) and Windows Workflow Foundation (WF) Samples for .NET Framework 4( UsingWorkflowItemPresenter.sln). However, I can't drag & drop Activity1 given as sample into Canvas or any other kind of activity for that matter. Could you tell me what I'm doing wrong, please? Also, I would like to know how I could make the Canvas activity fill the WorkflowDesigner and not being able to be deleted. Thank you

Increase timeout on Send Activity

I am using Send activity to call another Workflow service. I am getting the following error: The HTTP request to 'http://fulfillment.odp.skinit.com/OrderWorkflowService/AssemblyWorkFlow/ReleasePhysicalAssetsWithArt.xamlx' has exceeded the allotted timeout of 00:01:00. The time allotted to this operation may have been a portion of a longer timeout. How do I increase the timeout in the Send Activity? Thanks.

tracking composite activity

If I have a composite activity, I do not get any ActivityInstanceEvents of the contained activities. Is this by design, or can I configure something that those activities get tracked?
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