1

I need to call a receive activity in my workflow from javascript passing the parameters as json and i need the response as json format too..

I tried everything that i found but nothing works.

Hope you can help me... thanks

Greivin
  • 11
  • 1

2 Answers2

2

The Receive activity only supports SOAP requests and at the moment there is no way to do REST style communications with it. One work around would be to create a regular WCF REST service as a wrapper for your workflow and have the JavaScript client go through this wrapper.

Maurice
  • 27,582
  • 5
  • 49
  • 62
  • Thank you very much for your answer. I will do it, i found this page "http://msmvps.com/blogs/theproblemsolver/" and now i know how keep the receive activities because i was not clear if i should remove them from my workflow or keep it... – Greivin Dec 22 '10 at 00:20
0

Thank you very much for your answer. I will do it, i found this page "http://msmvps.com/blogs/theproblemsolver/" and now i know how keep the receive activities because i was not clear if i should remove them from my workflow or keep it... Here is a litle piece of code that show how to.

var factory = new ChannelFactory(new BasicHttpBinding(),
    new EndpointAddress("http://localhost:9199/Service1.xamlx"));
var proxy = factory.CreateChannel();
var response = proxy.GetData(new GetDataRequest() { Value = 42 });
Console.WriteLine(response.Value); 
Devin Burke
  • 13,642
  • 12
  • 55
  • 82